Update Customer Profile
/api/v1/customer/{customer_id}Update an existing customer profile. All fields in the request body are optional; only the provided fields will be updated.
Bearer token. Get token →Path Parameters
| Field | Details |
|---|---|
customer_idstringrequired | Unique identifier of the customer in the Pine Labs Online database. |
Header Parameters
| Field | Details |
|---|---|
Request-Timestampstringdate-time | ISO 8601 UTC timestamp of the request. Used for idempotency and audit. |
Request-IDstring | Use a global unique identifier [GUID] for the request. Constraints Minimum length: 1 characterMaximum length: 50 characters |
Request Bodyrequired
| Field | Details |
|---|---|
merchant_customer_referencestring | Unique customer reference assigned by the merchant. Constraints Minimum length: 1 characterMaximum length: 50 characters |
first_namestring | Customer's first name. Constraints Minimum length: 1 characterMaximum length: 50 characters |
last_namestring | Customer's last name. Constraints Minimum length: 1 characterMaximum length: 50 characters |
country_codestring | Country code of the registered mobile number. Constraints Maximum length: 5 characters |
mobile_numberstring | Customer's mobile number. Constraints Minimum length: 10 charactersMaximum length: 20 characters Pattern: ^[0-9]+$ |
email_idstring | Customer's email address. Constraints Maximum length: 50 characters |
billing_addressobject10 nested fields | Physical address. |
shipping_addressobject10 nested fields | Physical address. |
statusstring | Customer status to set. Allowed values: ACTIVEINACTIVESUSPENDEDDELETED |
Response
| Field | Details |
|---|---|
customer_idstring | Unique identifier of the customer in the Pine Labs Online database. Constraints Maximum length: 50 characters |
merchant_customer_referencestring | Unique identifier entered while creating the customer. Constraints Minimum length: 1 characterMaximum length: 50 characters |
first_namestring | Customer's first name. Constraints Maximum length: 50 characters |
last_namestring | Customer's last name. Constraints Maximum length: 50 characters |
country_codestring | Country code of the registered mobile number. |
mobile_numberstring | Customer's mobile number. Constraints Minimum length: 10 charactersMaximum length: 20 characters |
email_idstring | Customer's email address. Constraints Maximum length: 50 characters |
billing_addressobject10 nested fields | Physical address. |
address1string | Address line 1. Constraints Maximum length: 100 characters |
address2string | Address line 2. Constraints Maximum length: 100 characters |
address3string | Address line 3. Constraints Maximum length: 100 characters |
pincodestring | Postal/ZIP code. Constraints Minimum length: 3 charactersMaximum length: 11 characters Pattern: ^[a-zA-Z0-9 \-]*$ |
citystring | City name. Constraints Maximum length: 50 characters Pattern: ^[\p{L}\p{M}\p{Nd}\s\-'&.()]*$ |
statestring | State or province. Constraints Maximum length: 50 characters Pattern: ^[\p{L}\p{M}\p{Nd}\s\-'&.]*$ |
countrystring | Country name. Constraints Maximum length: 50 characters Pattern: ^[\p{L}\p{M}\p{Nd}\s\-'&.]*$ |
full_namestring | Full name of the address holder. Constraints Maximum length: 100 characters Pattern: ^[\p{L}\p{M}\p{Nd}\s/\-,.'_]*$ |
address_typestring | Type of address (e.g., Home, Office). Constraints Maximum length: 20 characters |
address_categorystring | Category of the address. Allowed values: billingshippingConstraints Maximum length: 20 characters |
shipping_addressobject10 nested fields | Physical address. |
gstinstring | Customer's unique GSTIN. |
merchant_metadataobject | Arbitrary key-value pairs for merchant use. Maximum 10 pairs, 256 characters each. Constraints Maximum properties: 10 Additional properties: string · Maximum length: 256 characters |
statusstring | Customer status. Allowed values: INACTIVEACTIVESUSPENDEDDELETED |
created_atstringdate-time | ISO 8601 UTC timestamp when the customer was created. |
updated_atstringdate-time | ISO 8601 UTC timestamp when the customer was last updated. |
Status Codes
200 | Customer updated successfully. |
400 | The request was malformed or missing required fields. |
401 | Authentication failed — missing, expired, or invalid Bearer token. |
403 | The authenticated client does not have permission for this operation. |
404 | The requested resource does not exist. |
500 | An unexpected error occurred on the server. |
curl --request PATCH \
--url https://pluraluat.v2.pinepg.in/api/v1/customer/cust-v1-0811030624-aa-RBDgpR \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--header 'Content-Type: application/json' \
--header 'Request-ID: a1b2c3d4-e5f6-7890-abcd-ef1234567890' \
--header 'Request-Timestamp: 2024-10-01T10:30:00Z' \
--data '{
"merchant_customer_reference": "82d57572-057c-4826-5775-385a52150554",
"first_name": "Kevin",
"last_name": "Bob",
"country_code": "91",
"mobile_number": "9876543210",
"email_id": "kevin@example.com",
"billing_address": {
"address1": "10 Downing Street Westminster London",
"address2": "Oxford Street Westminster London",
"address3": "Baker Street Westminster London",
"pincode": "51524036",
"city": "Westminster",
"state": "Westminster",
"country": "London",
"full_name": "Kevin Bob",
"address_type": "Home",
"address_category": "billing"
},
"shipping_address": {
"address1": "10 Downing Street Westminster London",
"address2": "Oxford Street Westminster London",
"address3": "Baker Street Westminster London",
"pincode": "51524036",
"city": "Westminster",
"state": "Westminster",
"country": "London",
"full_name": "Kevin Bob",
"address_type": "Home",
"address_category": "billing"
},
"status": "ACTIVE"
}'{
"customer_id": "cust-v1-0811030624-aa-RBDgpR",
"merchant_customer_reference": "82d57572-057c-4826-5775-385a52150554",
"first_name": "Kevin",
"last_name": "Bob",
"country_code": "91",
"mobile_number": "9876543210",
"email_id": "kevin@example.com",
"billing_address": {
"address1": "10 Downing Street Westminster London",
"address2": "Oxford Street Westminster London",
"address3": "Baker Street Westminster London",
"pincode": "51524036",
"city": "Westminster",
"state": "Westminster",
"country": "London",
"full_name": "Kevin Bob",
"address_type": "Home",
"address_category": "billing"
},
"shipping_address": {
"address1": "10 Downing Street Westminster London",
"address2": "Oxford Street Westminster London",
"address3": "Baker Street Westminster London",
"pincode": "51524036",
"city": "Westminster",
"state": "Westminster",
"country": "London",
"full_name": "Kevin Bob",
"address_type": "Home",
"address_category": "billing"
},
"gstin": "28ABCDE1234F2Z6",
"merchant_metadata": {
"clientId": "DD",
"transactionReferenceNo": "pine-1223",
"merchantId": "1234",
"tid": "9000990",
"acquirerName": "HDFC_FSS",
"isOfferDisplayRequired": "true",
"OfferData": "UHJvZHVjdF9Db2RlPSIgIiZQcm9kdWN0X05hbWU9IiImUGF5bWVudF9Nb2RlPUJhbmsgRU1JJkNhcmRfVHlwZT1EZWJpdCBDYXJkJkJhbmtfTmFtZT1IREZDIERlYml0JkVNSV9UZW51cmU9NiZJbnRlcmVzdF9SYXRlPTkuMCZJbnRlcmVzdF9BbW91bnQ9MTM4MTQwJk1vbnRobHlfSW5zdGFsbG1lbnQ9ODk0NjkwJkF1dGhvcml6YXRpb25fQW1vdW50PTEwMCZMb2FuX2Jvb2tpbmdfQW1vdW50PTUyMzAwMDAmSW50ZXJlc3RfQ2FzaGJhY2tfQW1vdW50PTAmSW50ZXJlc3RfQ2FzaGJhY2tfVHlwZT1EZWZlcnJlZCZBZGRpdGlvbmFsX0Nhc2hiYWNrPSIiJkFkZGl0aW9uYWxfQ2FzaGJhY2tfVHlwZT0iIiZEZXNjcmlwdGlvbj1CYW5rIEVNSSZQcm9kdWN0X1ZhbHVlPTUyMzAwMDA",
"tenant_id": "PGATPOS",
"is_offer_validation_required": "true"
},
"status": "ACTIVE",
"created_at": "2024-10-04T13:11:29.645591Z",
"updated_at": "2024-10-04T13:11:29.645657Z"
}