Update a customer
https://carchost.fieldcontrol.com.br/customers/{id}Updates a customer. Send the full customer: the body follows the same rules as creation.
Requires the
X-Api-Key,User-AgentandContent-Type: application/jsonheaders. Limit: 1 request per second (learn more).
Request
Path parameters
idstringrequiredCustomer identifier.
Example: NTc4NTQ1OjIyOTE1.
Headers
User-AgentstringrequiredIdentification of your application.
Example: MinhaIntegracao/1.0.
Request body
JSON, sent with the Content-Type: application/json header.
namestringrequiredCustomer name. Texts longer than 120 characters are truncated.
At least 5 characters.
codestringCustomer code.
Up to 50 characters.Accepts: null.
notesstringCustomer notes.
Up to 2000 characters.Accepts: null.
documentNumberstringValid CPF or CNPJ, digits only (no dots, dashes or slashes). Must be unique in the account.
Accepts: null.
externalobjectFields of external
idstringCustomer identifier in your system.
Up to 100 characters.Accepts: null.
archivedbooleanWhether the customer is archived.
Default: false.
addressobjectrequiredCustomer address. Also used to create the primary location.
Fields of address
zipCodestring8-digit postal code (CEP), digits only.
Accepts: null.
streetstringStreet. Texts longer than 50 characters are truncated.
Accepts: null.
numberstringNumber. Texts longer than 10 characters are truncated.
Accepts: null.
neighborhoodstringNeighborhood. Texts longer than 50 characters are truncated.
Accepts: null.
complementstringAddress complement. Texts longer than 50 characters are truncated.
Accepts: null.
citystringrequiredCity. Texts longer than 50 characters are truncated.
statestringrequiredState. Texts longer than 30 characters are truncated.
coordsobjectrequiredAddress coordinates. No geolocation? See the Geolocation services guide.
Fields of coords
latitudenumberrequiredFrom -90 to 90.
longitudenumberrequiredFrom -180 to 180.
Responses
- 200
Customer 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 body or
documentNumberalready registered for another customer in the account (reason: document number already exists).resourceValidationErr→ - 429
Limit of 1 request per second exceeded. See Rate limit.
- 500
Unexpected server error.