Update a company location
Authorizations
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
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.
Body
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.
Must not be blank. Omit the key to leave it unchanged.
Requires write_pricing in addition to write_companies, whether it is being set or cleared. Must name a customer group in this store.
Send null to clear it.
Send null to clear it.
Send null to clear it.
Send null to clear it.
Send null to clear it.
Send null to clear it.
Send null to clear it.
Send null to clear it.
Send null to record that no terms are agreed and 0 to record due on receipt. The two are different commercial facts.
x >= 0Setting it true demotes whichever location currently holds the flag, in the same transaction.
Response
Success
