cURL
curl -sS -X PATCH 'https://apipub.firstbasehq.com/api/v1/offices/{officeId}' \
-H 'Authorization: ApiKey YOUR_API_KEY' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"active": false
}'import requests
url = "https://apipub.firstbasehq.com/api/v1/offices/{officeId}"
payload = { "active": False }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({active: false})
};
fetch('https://apipub.firstbasehq.com/api/v1/offices/{officeId}', 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 Main Street",
"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
Modify office
Partially update an office. Modifiable fields: name, contactName, address (full-object replace when present), active. Setting active=false soft-deletes the office. Reactivation (active=true) is not supported and returns 400. Business-rule rejections (active inventory, active return orders, default-office-for-package) return HTTP 409 with source="office" envelope.
PATCH
https://apipub.firstbasehq.com
/
api
/
v1
/
offices
/
{officeId}
cURL
curl -sS -X PATCH 'https://apipub.firstbasehq.com/api/v1/offices/{officeId}' \
-H 'Authorization: ApiKey YOUR_API_KEY' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"active": false
}'import requests
url = "https://apipub.firstbasehq.com/api/v1/offices/{officeId}"
payload = { "active": False }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({active: false})
};
fetch('https://apipub.firstbasehq.com/api/v1/offices/{officeId}', 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 Main Street",
"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
Body
application/json
Partial update payload for an office (FBS-3322)
Response
Office updated
An office location belonging to the organization