Update customer location
https://carchost.fieldcontrol.com.br/customers/{customerId}/locations/{locationId}Updates a location of the customer. The primary location cannot be archived or moved to another customer.
Requires the
X-Api-Key,User-AgentandContent-Type: application/jsonheaders. Limit: 1 request per second (learn more).
Request
Path parameters
customerIdstringrequiredCustomer identifier.
locationIdstringrequiredLocation identifier.
Headers
User-AgentstringrequiredIdentification of your application.
Example: MinhaIntegracao/1.0.
Request body
JSON, sent with the Content-Type: application/json header.
namestringrequiredLocation name.
notesstringLocation notes.
Accepts: null.
archivedbooleanArchives the location. The primary location cannot be archived.
addressobjectrequiredFields of address
postalCodestring8-digit postal code (CEP), digits only.
Accepts: null.
streetstringAccepts: null.
numberstringAccepts: null.
neighborhoodstringAccepts: null.
citystringrequiredstatestringrequiredcomplementstringAccepts: null.
coordsobjectrequiredFields of coords
latitudenumberrequiredFrom -90 to 90.
longitudenumberrequiredFrom -180 to 180.
Responses
- 200
Location updated.
- 401
API key missing (
Missing API Key) or invalid (Invalid API Key). See Authentication. - 403
Account blocked (
Account blocked), expired (Account expired) or on a plan that does not allow integration (Account plan not allowed). See Authentication. - 404
Resource not found. The response body is empty.
- 422
Invalid location, or primary location rule violated (
cannotArchivePrimaryLocation,cannotChangeCustomerOfPrimaryLocation).cannotArchivePrimaryLocation→ - 429
Limit of 1 request per second exceeded. See Rate limit.
- 500
Unexpected server error.