Skip to main content
PUT
Use this endpoint to edit the customer details such as name, email and contact details. When editing a customer’s details, ensure that the combination of the values in the email and contact attributes is unique for every customer.

Path Parameters

string
required
The unique identifier linked to the customer.

Request Parameters

string
Customer’s name. Alphanumeric, with period (.), apostrophe (’), forward slash (/), at (@) and parentheses allowed. The name must be between 3-50 characters in length. For example, Gaurav Kumar.
string
The customer’s phone number. A maximum length of 15 characters. For example, +919876543210.
string
The customer’s email address. A maximum length of 64 characters. For example, gaurav.kumar@example.com.

Response Parameters

string
Unique identifier of the customer. For example, cust_1Aa00000000004.
string
Indicates the type of entity.
string
Customer’s name. Alphanumeric, with period (.), apostrophe (’) and parentheses allowed. The name must be between 3-50 characters in length.
string
The customer’s phone number. A maximum length of 15 characters including country code.
string
The customer’s email address. A maximum length of 64 characters.
string
GST number linked to the customer. For example, 29XAbbA4369J1PA.
object
This is a key-value pair that can be used to store additional information about the entity. It can hold a maximum of 15 key-value pairs, 256 characters (maximum) each. For example, "note_key": "Beam me up Scotty”.
integer
UNIX timestamp, when the customer was created. For example, 1234567890.
object
The customer’s shipping address. An address object with line1, line2, city, state, country, and zipcode fields. Empty when none is set.

Errors

Code: 4xxThe API credentials passed in the API call differ from the ones generated on the Dashboard. Possible reasons:
  • Different keys for test mode and live modes.
  • Expired API key.
Solution: The API keys must be active and entered correctly with no whitespace before or after the keys.
Code: 400The contact number is less than 8 digits.Solution: Enter a contact number that meets the validation criteria. It should have at least 8 digits, including the country code.
Code: 400The customer_id passed is invalid.Solution: Use a valid customer_id.
Code: 400The customer_id passed in the URL is well-formed but does not exist or does not belong to the requesting merchant.Solution: Use a valid customer_id returned from POST /v1/customers. Confirm by fetching the customer before retrying.
Code: 400The contact or email passed in the edit request matches an existing customer of this merchant other than the one being edited.Solution: Use a different contact / email, or edit the matching customer record directly.
Code: 400The value passed for email is not in a valid email format.Solution: Pass a valid email address (for example, user@example.com).
Code: 400The contact value contains characters other than digits and the + symbol (for example, letters, hyphens or spaces).Solution: Pass contact using only digits and an optional leading + for the country code.
Code: 400The name value exceeds the 50-character limit.Solution: Keep the name to 50 characters or fewer.
Code: 400The name value contains characters outside the allowed set. Allowed characters are letters, numbers and a limited set of punctuation (', -, ., _, (, ), @, / and spaces). The name must start and end with a letter, number, . or ).Solution: Pass name using only the allowed characters and ensure it starts and ends with a letter, number, . or ).
Code: 400The gstin value is not a valid Indian GSTIN. A GSTIN is a 15-character alphanumeric code in the format <state-code><PAN><entity-code><check-digit>.Solution: Pass a valid 15-character GSTIN.
Code: 400One of the values inside the notes object exceeds the 512-character limit per value.Solution: Keep each notes value under 512 characters.