Update Customer
Update an existing customer's information.
POST
https://api.uprails.com/customers/:customer_idUpdates the specified customer by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
customer_id | string | Required. The ID of the customer to update. |
Request Example
curl -X POST https://api.uprails.com/customers/cus_1234567890abcdef \
-H "Content-Type: application/json" \
-H "api-key: snd_YOUR_API_KEY" \
-d '{
"email": "newemail@example.com",
"description": "VIP customer",
"metadata": {
"tier": "premium"
}
}'Request Body
emailstringCustomer email address
namestringCustomer full name
phonestringCustomer phone number
phone_country_codestringPhone country code
descriptionstringAn arbitrary string for your own purposes
addressobjectCustomer address information
metadataobjectSet of key-value pairs for storing additional information
Response
200OK
{
"customer_id": "cus_1234567890abcdef",
"merchant_id": "mer_xyz789",
"email": "newemail@example.com",
"name": "John Doe",
"phone": "+1234567890",
"phone_country_code": "+1",
"description": "VIP customer",
"address": {
"line1": "123 Main Street",
"line2": "Apt 4B",
"city": "San Francisco",
"state": "CA",
"postal_code": "94102",
"country": "US"
},
"metadata": {
"user_id": "usr_12345",
"tier": "premium"
},
"created": "2024-01-15T10:00:00Z",
"updated": "2024-01-16T14:30:00Z"
}