v1

latestOpenAPI 3.1.02026-07-241080412.6 KB

Update customer

Use this endpoint to update a customer's data, for example first name, last name.

patch/customers/{customerId}

Path parameters

customerIdstring required

the identifier of Cleeng customer

Headers

Content-Typestring

Request body

firstNamestring

New customer first name

lastNamestring

New customer last name

countrystring

New customer country

emailstring

New customer email

externalIdstring

Customer's external ID

externalDatastring

Custom data in JSON format

lastUserIpstring

Customer IP address. Both IPv4 and IPv6 addresses are accepted.

lastLoginDateinteger

Customer's last login date as unix timestamp

localestring

Defines language and text formatting for the user. E.g. "en_US", "fr_FR"

currencystring

Customer's currency. E.g. "USD", "EUR" (see the list of supported currencies).

passwordstring

New customer password. String containing at least one letter and one digit or special character (!@#$%^&), length - 8-80 characters. Using this parameter will update the customer password without triggering email communication.

taxIdentifierstring

The customer's tax identification number, e.g. a Brazilian CPF. Length 2–20. Example: 39053344705

phoneNumberstring

The customer's contact phone number. Length 2–20. Allowed characters only: digits and + - space ( ) . Example: +55 11 91234-5678

addressstring

First line of the customer's street address. Non-empty when supplied. Example: Avenida Paulista 1578

address2string

Second line of the customer's address (apartment, suite, unit, etc.). Non-empty when supplied. Example: Conjunto 42

dependentLocalitystring

District within the city. Length 2–100. Example: Bela Vista

citystring

City or town of the address. Example: São Paulo

statestring

State, province, or region. Length 2–50. Example: BR-SP

postalCodestring

Postal / ZIP code of the address. Length 2–20, upper-cased, validated against the country sent in the same request. Example: 01310-100

Response

200

successboolean
messagestring

Example response

{
  "success": true,
  "data": {
    "id": 112616266,
    "email": "example@domain.com",
    "country": "PL",
    "regDate": "2020-11-19 08:06:58",
    "lastLoginDate": "2020-11-26 13:30:25",
    "lastUserIp": "230.253.87.52",
    "currency": "USD",
    "locale": "en_US",
    "firstName": "John",
    "lastName": "Doe",
    "externalId": "123456789"
  },
  "message": "Customer updated successfully"
}