Create a customer
Create or update a customer in the authenticated company and environment.
Creates or updates a customer by CPF or CNPJ in the company and environment of your API key. An existing tax ID updates the customer and keeps the same identifier.
When only zip_code is provided for the address, Raims can fill in
street, neigh, city and uf using the postal code data. To use this
feature, leave street, neigh, city, uf, street_number and
complement empty. Any value in these fields prevents automatic completion;
empty fields or fields containing only spaces do not. If the postal code is
not found, the customer can still be registered.
See Create a customer for the registration rules. Use the reference in your system to associate this customer with the identifier used in your integration.
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.
Up to 120 characters
Valid CPF or CNPJ, with or without periods, slash, hyphen and spaces.
1 to 20 characters
Payer's email. Registering the email does not send a message.
Up to 254 characters
International dialing code. Can be provided without phone_local.
Up to 5 characters
Phone number without the dialing code, with or without punctuation. Can be provided without dial_code.
Up to 20 characters
Address postal code, with or without a hyphen. If street, neigh, city, uf, street_number and complement are empty, the postal code can fill in the street, neighborhood, city and state. Completion does not include number or address complement.
Up to 15 characters
Address street.
Up to 120 characters
Address number.
Up to 10 characters
Address complement.
Up to 40 characters
Address neighborhood.
Up to 80 characters
Address city.
Up to 80 characters
State abbreviation, such as SP.
Up to 5 characters
Customer identifier in your system. For an existing customer, omit it to keep the reference or 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 updated with the same identifier.
Public customer identifier to reuse in subsequent requests.
Returned resource type.
Customer's CPF or CNPJ.
Customer's tax ID type: cpf or cnpj.
Creation 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
Customer created.
Public customer identifier to reuse in subsequent requests.
Returned resource type.
Customer's CPF or CNPJ.
Customer's tax ID type: cpf or cnpj.
Creation 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 request. INVALID_JSON indicates malformed JSON. INVALID_FIELDS indicates invalid fields; check the field and reason in error.details.
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.