Skip to main content

Update a customer

PUThttps://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-Agent and Content-Type: application/json headers. Limit: 1 request per second (learn more).

Request​

Path parameters

idstringrequired

Customer identifier.

Example: NTc4NTQ1OjIyOTE1.

Headers

User-Agentstringrequired

Identification of your application.

Example: MinhaIntegracao/1.0.

Request body

JSON, sent with the Content-Type: application/json header.

namestringrequired

Customer name. Texts longer than 120 characters are truncated.

At least 5 characters.

codestring

Customer code.

Up to 50 characters.Accepts: null.

notesstring

Customer notes.

Up to 2000 characters.Accepts: null.

documentNumberstring

Valid CPF or CNPJ, digits only (no dots, dashes or slashes). Must be unique in the account.

Accepts: null.

externalobject
Fields of external
idstring

Customer identifier in your system.

Up to 100 characters.Accepts: null.

archivedboolean

Whether the customer is archived.

Default: false.

addressobjectrequired

Customer address. Also used to create the primary location.

Fields of address
zipCodestring

8-digit postal code (CEP), digits only.

Accepts: null.

streetstring

Street. Texts longer than 50 characters are truncated.

Accepts: null.

numberstring

Number. Texts longer than 10 characters are truncated.

Accepts: null.

neighborhoodstring

Neighborhood. Texts longer than 50 characters are truncated.

Accepts: null.

complementstring

Address complement. Texts longer than 50 characters are truncated.

Accepts: null.

citystringrequired

City. Texts longer than 50 characters are truncated.

statestringrequired

State. Texts longer than 30 characters are truncated.

coordsobjectrequired

Address coordinates. No geolocation? See the Geolocation services guide.

Fields of coords
latitudenumberrequired

From -90 to 90.

longitudenumberrequired

From -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 documentNumber already 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.