Uprails
Customers/Update

Update Customer

Update an existing customer's information.

POSThttps://api.uprails.com/customers/:customer_id

Updates the specified customer by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

Path Parameters

ParameterTypeDescription
customer_idstringRequired. 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

emailstring

Customer email address

namestring

Customer full name

phonestring

Customer phone number

phone_country_codestring

Phone country code

descriptionstring

An arbitrary string for your own purposes

addressobject

Customer address information

metadataobject

Set 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"
}