Customers: Update
La référence API est disponible en anglais uniquement.
POST/customers/{customer_id}
Updates the customer's details in a customer object.
Path parameters
customer_idstringrequiredThe unique identifier for the Customer
Request body CustomerUpdateRequest (object)
namestring, nullableThe customer's name
emailstring, nullableThe customer's email address
phonestring, nullableThe customer's phone number
descriptionstring, nullableAn arbitrary string that you can attach to a customer object.
phone_country_codestring, nullableThe country code for the customer phone number
addressAddressDetails (object), nullableAddress details
Show 10 child attributes
citystring, nullableThe city, district, suburb, town, or village of the address.
countrystring (enum), nullablePossible values:
AF,AX,AL,DZ,AS,AD,AO,AI,AQ,AG,AR,AMand 237 moreline1string, nullableThe first line of the street address or P.O. Box.
line2string, nullableThe second line of the street address or P.O. Box (e.g., apartment, suite, unit, or building).
line3string, nullableThe third line of the street address, if applicable.
zipstring, nullableThe zip/postal code for the address
statestring, nullableThe address state
first_namestring, nullableThe first name for the address
last_namestring, nullableThe last name for the address
origin_zipstring, nullableThe zip/postal code of the origin
metadataobject, nullableYou can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long. Metadata is useful for storing additional, structured information on an object.
tax_registration_idstring, nullableCustomer's tax registration ID
document_detailsCustomerDocumentDetails (object), nullableShow 2 child attributes
document_typestring (enum)requiredRepresents the type of identification document used for validation.
Possible values:
cpf,cnpjdocument_numberstringrequiredThe customer's document number Length of the document number depends upon the document_type. For CPF/CNPJ it is typically 11/14 digits long
Responses
200Customer was Updated404Customer was not found
Request
curl --request POST \
--url https://sandbox.cardencer.com/customers/{customer_id} \
--header 'Content-Type: application/json' \
--header 'api-key: snd_...' \
--data '{
"email": "guest@example.com",
"name": "John Doe"
}'Response
{
"customer_id": "cus_y3oqhf46pyzuxjbcn2giaqnb44",
"created_at": "2023-01-18T11:04:09.922Z"
}