Update customer
const url = 'https://api.pipevest.com/v1/customers/clx0a1b2c3d4e5f6g7h8i9j0k';const options = { method: 'PATCH', headers: { 'X-Idempotency-Key': '2489E9AD-2EE2-8E00-8EC9-32D5F69181C0', Authorization: 'Bearer <token>', 'x-client-id': '<x-client-id>', 'Content-Type': 'application/json' }, body: '{"firstName":"example","lastName":"example","msisdn":"example","isActive":true,"identificationNumber":"example","identificationType":"SSN","referenceId":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.pipevest.com/v1/customers/clx0a1b2c3d4e5f6g7h8i9j0k \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'X-Idempotency-Key: 2489E9AD-2EE2-8E00-8EC9-32D5F69181C0' \ --header 'x-client-id: <x-client-id>' \ --data '{ "firstName": "example", "lastName": "example", "msisdn": "example", "isActive": true, "identificationNumber": "example", "identificationType": "SSN", "referenceId": "example" }'Partial update — send only the fields you want to change.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Example
clx0a1b2c3d4e5f6g7h8i9j0kCustomer identifier (CUID string).
Header Parameters
Section titled “Header Parameters”Idempotency key (UUID) scoped to your credential. Mandatory on this
endpoint in Sandbox (UAT) and Production alike — a request without one is
rejected with 400 "X-Idempotency-Key header is required for this request". Retrying with the same key replays the stored response
verbatim rather than re-running the operation.
Request Bodyrequired
Section titled “Request Bodyrequired”All fields optional; nullable fields may be cleared with null.
object
Responses
Section titled “Responses”Customer updated
object
object
Example
{ "message": "Customer updated successfully", "data": { "id": "clx0a1b2c3d4e5f6g7h8i9j0k", "organizationId": "clorgb2c3d4e5f6g7h8i9j0k1", "firstName": "John", "lastName": "Doe", "msisdn": "260971234567", "isActive": true, "identificationType": "SSN" }}Request failed schema validation, or the mandatory X-Idempotency-Key
header is missing.
object
object
object
Examples
{ "error": "Validation failed", "details": [ { "field": "firstName", "message": "First name is required" } ]}{ "error": "Bad Request", "message": "X-Idempotency-Key header is required for this request"}Authentication failed
object
Example
{ "error": "Unauthorized", "message": "Invalid organization authentication token"}Resource not found
object
Example
{ "error": "Not found", "message": "Customer not found"}A request with this X-Idempotency-Key is still in progress
object
Example
{ "error": "Conflict", "message": "A request with this X-Idempotency-Key is already in progress"}The X-Idempotency-Key was already used with a different body
object
Example
{ "error": "Unprocessable Entity", "message": "X-Idempotency-Key was already used with a different request payload"}Rate limit exceeded. POST /oauth/token has its own stricter limiter and
its own message.
object
Examples
{ "error": "Too Many Requests", "message": "Too many requests. Please slow down and try again shortly."}{ "error": "Too Many Requests", "message": "Too many authentication attempts. Please try again in a few minutes."}