cURL
curl -sS -X GET 'https://apipub.firstbasehq.com/api/v1/offices?page=1&size=100' \
-H 'Authorization: ApiKey YOUR_API_KEY' \
-H 'Accept: application/json'import requests
url = "https://apipub.firstbasehq.com/api/v1/offices"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://apipub.firstbasehq.com/api/v1/offices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));[
{
"id": "ed92d1a0-a8ee-4768-bbcb-26dd4bfdf8a4",
"name": "HQ Office",
"address": {
"street1": 123,
"street2": "Suite 100",
"city": "San Francisco",
"province": "California",
"postalCode": 94105,
"countryCode": "US",
"phoneNumber": "+15551234567"
},
"active": true,
"contactName": "Jane Doe"
}
]{
"errors": [
{
"detail": "Invalid request",
"source": "request"
}
]
}{
"errors": [
{
"detail": "Invalid request",
"source": "request"
}
]
}{
"errors": [
{
"detail": "Invalid request",
"source": "request"
}
]
}{
"errors": [
{
"detail": "Invalid request",
"source": "request"
}
]
}Offices
List offices
Returns a paginated list of offices belonging to the caller’s organization. Supports pagination. Active and inactive offices are both returned unless filtered.
GET
https://apipub.firstbasehq.com
/
api
/
v1
/
offices
cURL
curl -sS -X GET 'https://apipub.firstbasehq.com/api/v1/offices?page=1&size=100' \
-H 'Authorization: ApiKey YOUR_API_KEY' \
-H 'Accept: application/json'import requests
url = "https://apipub.firstbasehq.com/api/v1/offices"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://apipub.firstbasehq.com/api/v1/offices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));[
{
"id": "ed92d1a0-a8ee-4768-bbcb-26dd4bfdf8a4",
"name": "HQ Office",
"address": {
"street1": 123,
"street2": "Suite 100",
"city": "San Francisco",
"province": "California",
"postalCode": 94105,
"countryCode": "US",
"phoneNumber": "+15551234567"
},
"active": true,
"contactName": "Jane Doe"
}
]{
"errors": [
{
"detail": "Invalid request",
"source": "request"
}
]
}{
"errors": [
{
"detail": "Invalid request",
"source": "request"
}
]
}{
"errors": [
{
"detail": "Invalid request",
"source": "request"
}
]
}{
"errors": [
{
"detail": "Invalid request",
"source": "request"
}
]
}Authorizations
Prefix the value with "ApiKey" to indicate the custom authorization type
Query Parameters
The page number to request (1 based)
Example:
1
The number of results to return in a page
Example:
100
Response
Paginated list of offices
Unique identifier for this office
Example:
"ed92d1a0-a8ee-4768-bbcb-26dd4bfdf8a4"
Display name of the office
Example:
"HQ Office"
Physical address of this office, used for equipment deliveries and returns
Show child attributes
Show child attributes
Whether this office is currently active. Inactive offices cannot receive new orders or returns
Example:
true
Name of the contact person at this office, used for shipping and logistics
Example:
"Jane Doe"