PATCH
Update a company location

Authorizations

Authorization
string
header
required

A secret API key. Publishable keys cannot reach this API. A key may carry an expiry, and an expired key is refused exactly like an unknown one, with a 401 that names no reason; check the key's expires_at in the dashboard rather than inferring it from a response. When a merchant rolls a key's secret they choose a grace window of up to 3 days, and for its duration BOTH the new secret and the one it replaced authenticate, so an integration moves over on its own deploy schedule instead of at the instant the button is pressed. Move before the window closes: after it, the old secret is refused. Nothing else about this contract moves with a roll. The key keeps its id and its scopes, so the only thing an integration updates is the credential itself.

Headers

Idempotency-Key
string
required

A unique key per logical write. Replaying a request with the same key returns the first response byte for byte instead of applying the write twice.

Path Parameters

companyId
string
required
companyLocationId
string
required

Body

application/json

An omitted key keeps its stored value and an explicit null clears the column. The merge starts from the STORED row, so a patch that only corrects a postcode carries customer_group_id, the payment terms and the tax registration forward untouched. customer_group_id is the exception worth reading twice: naming it OR sending null for it requires write_pricing in addition to write_companies, because clearing the pointer drops this location back to the store's ordinary prices, and removing a negotiated rate is a repricing just as surely as setting one. A patch that does not mention the key needs no pricing scope at all, so an address correction from a logistics integration is never refused for a reason that has nothing to do with addresses.

name
string

Must not be blank. Omit the key to leave it unchanged.

customer_group_id
string | null

Requires write_pricing in addition to write_companies, whether it is being set or cleared. Must name a customer group in this store.

address_line_1
string | null

Send null to clear it.

address_line_2
string | null

Send null to clear it.

city
string | null

Send null to clear it.

region
string | null

Send null to clear it.

postal_code
string | null

Send null to clear it.

country_code
string | null

Send null to clear it.

phone
string | null

Send null to clear it.

tax_registration_id
string | null

Send null to clear it.

payment_terms_days
integer | null

Send null to record that no terms are agreed and 0 to record due on receipt. The two are different commercial facts.

Required range: x >= 0
is_default
boolean

Setting it true demotes whichever location currently holds the flag, in the same transaction.

Response

Success

data
object