curl --request PATCH \
--url https://api.example.com/v1/sdk/customers/{reference} \
--header 'Content-Type: application/json' \
--data '
{
"externalRef": "auth_user_12345"
}
'{
"email": "customer@example.com",
"name": "John Doe",
"reference": "cus_3c4d5e6f7g8h",
"externalRef": "auth_user_12345",
"purchases": [
{
"amount": 9900,
"currency": "GBP",
"productName": "API Gateway Manager",
"reference": "pur_1A2B3C4D",
"startDate": "2025-10-27T10:00:00Z",
"status": "active",
"cancellationReason": "Customer request",
"cancelledAt": "2025-10-28T10:00:00Z",
"endDate": "2025-11-27T10:00:00Z",
"exchangeRate": 1.32,
"originalAmount": 7500,
"planRef": "pln_abc123",
"planSnapshot": {},
"productRef": "prd_abc123"
}
]
}Updates an existing customer identified by reference. Use this to backfill or change fields such as externalRef, name, or email. Only the fields supplied in the body are modified.
curl --request PATCH \
--url https://api.example.com/v1/sdk/customers/{reference} \
--header 'Content-Type: application/json' \
--data '
{
"externalRef": "auth_user_12345"
}
'{
"email": "customer@example.com",
"name": "John Doe",
"reference": "cus_3c4d5e6f7g8h",
"externalRef": "auth_user_12345",
"purchases": [
{
"amount": 9900,
"currency": "GBP",
"productName": "API Gateway Manager",
"reference": "pur_1A2B3C4D",
"startDate": "2025-10-27T10:00:00Z",
"status": "active",
"cancellationReason": "Customer request",
"cancelledAt": "2025-10-28T10:00:00Z",
"endDate": "2025-11-27T10:00:00Z",
"exchangeRate": 1.32,
"originalAmount": 7500,
"planRef": "pln_abc123",
"planSnapshot": {},
"productRef": "prd_abc123"
}
]
}Customer reference identifier
"cus_3c4d5e6f7g8h"
Fields to update (all optional)
Customer updated successfully
Customer email address
"customer@example.com"
Customer full name
"John Doe"
Customer reference identifier
"cus_3c4d5e6f7g8h"
External reference ID from your auth system (if set during creation or update)
"auth_user_12345"
Active purchases
Show child attributes