Update an existing customer
Update a customer and their integration data by public identifier.
Updates an existing customer and their integration data by public identifier. The customer must belong to the authenticated company and environment.
Send only the fields you want to change. Omitted fields keep their current
value. For optional text fields, sending null or an empty value clears the field.
The identifier and CPF or CNPJ stay the same; this request does not create a customer.
The metadata map is updated by key. See how to add or remove values in
Additional integration data.
The address is also updated by field. Changing zip_code does not automatically
fill in or replace the street, neighborhood, city or state; send the address fields
you want to change. See the update rules in
Update an existing customer.
Path Params
The customer's public ID in Raims, returned when the customer is created or listed.
Up to 100 characters
Headers
Unique key chosen by your system to identify this request. When retrying, send the same key and parameters. Without this header, the request is processed normally. See the idempotency guide for retention and handling pending or uncertain responses.
1 to 255 characters
Body Params
Applying an example replaces the body fields.
Payer's full name. Omit it to keep the current value; send null or empty text to remove it.
Up to 120 characters
Payer's email. Updating the email does not send a message. Omit it to keep the current value; send null or empty text to remove it.
Up to 254 characters
International dialing code. Can be provided without phone_local. Omit it to keep the current value; send null or empty text to remove it.
Up to 5 characters
Phone number without the dialing code, with or without punctuation. Can be provided without dial_code. Omit it to keep the current value; send null or empty text to remove it.
Up to 20 characters
Address postal code, with or without a hyphen. Updating the postal code does not fill in other address fields. Omit it to keep the current value; send null or empty text to remove it.
Up to 15 characters
Address street. Omit it to keep the current value; send null or empty text to remove it.
Up to 120 characters
Address number. Omit it to keep the current value; send null or empty text to remove it.
Up to 10 characters
Address complement. Omit it to keep the current value; send null or empty text to remove it.
Up to 40 characters
Address neighborhood. Omit it to keep the current value; send null or empty text to remove it.
Up to 80 characters
Address city. Omit it to keep the current value; send null or empty text to remove it.
Up to 80 characters
State abbreviation, such as SP. Omit it to keep the current value; send null or empty text to remove it.
Up to 5 characters
Customer identifier in your system. Omit it to keep the current reference; send null or empty text to remove it. Use external_reference in the customer list to search for this value.
Up to 120 characters
Integration data associated with the resource. Provide key and text pairs. Keys are case-sensitive. Omitting it or sending {} keeps the data; null removes all pairs, and null for a key removes only that key. Empty text is a valid value.
Up to 32 entries, Keys: up to 40 characters, Values: up to 500 characters, JSON: up to 8192 UTF-8 bytes
Responses
Response Body
Customer record updated. If no value changes, updated_at remains unchanged.
Public customer identifier.
Customer's full name.
Customer's first name.
Rest of the customer's name.
Customer's email.
Customer's CPF or CNPJ.
Tax ID type: cpf or cnpj.
Phone's international dialing code.
Phone number without the dialing code, digits only.
Address postal code.
Street.
Address number.
Address complement, when provided.
Neighborhood.
City.
State abbreviation.
Creation time in Unix UTC seconds.
Record update time in Unix UTC seconds.
Customer identifier in your system, when provided.
Integration data associated with the resource. Returns {} when there are no values. This map is not used as a search filter or automatically included in webhook events.
Response Body
Invalid JSON, ID or fields. Check error.details for the field, code and message explaining the correction. CPF/CNPJ cannot be changed in this request.
Code and explanation of the error returned by the API.
Stable error code.
Error explanation in English. For validation errors, it summarizes the category; details identify the corrections. Use the codes to handle the response.
Invalid fields or references submitted in the body, with the field, code and explanation. Omitted for general errors and when there is no field correction to indicate.
Public name of the JSON field, query parameter, path parameter or header related to the error. Nested fields and lists retain their path and index. $ represents the root of the JSON body.
Reason for the field error, such as REQUIRED, INVALID_TAXID, UNKNOWN_FIELD, DUPLICATE_FIELD or INVALID_TYPE.
Explanation in English of the problem with this field or parameter and the available correction. Do not use the text to determine your integration flow.
Response Body
No customer was found for the given id in the authenticated company and environment. Check the ID.
Code and explanation of the error returned by the API.
Stable error code.
Error explanation in English. For validation errors, it summarizes the category; details identify the corrections. Use the codes to handle the response.
Invalid fields or references submitted in the body, with the field, code and explanation. Omitted for general errors and when there is no field correction to indicate.
Public name of the JSON field, query parameter, path parameter or header related to the error. Nested fields and lists retain their path and index. $ represents the root of the JSON body.
Reason for the field error, such as REQUIRED, INVALID_TAXID, UNKNOWN_FIELD, DUPLICATE_FIELD or INVALID_TYPE.
Explanation in English of the problem with this field or parameter and the available correction. Do not use the text to determine your integration flow.
For common errors, see HTTP response codes.