Update customer
PATCH
/customers/{id}
const url = 'https://api.pipevest.com/v1/customers/clx0a1b2c3d4e5f6g7h8i9j0k';const options = { method: 'PATCH', headers: { 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-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”id
required
string
Example
clx0a1b2c3d4e5f6g7h8i9j0kCustomer identifier (CUID string).
Header Parameters
Section titled “Header Parameters”X-Idempotency-Key
string format: uuid
Idempotency key (UUID) for safely retrying mutating requests. Enforcement is being rolled out during onboarding.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
All fields optional; nullable fields may be cleared with null.
object
firstName
string
lastName
string
msisdn
string
isActive
boolean
identificationNumber
string
identificationType
string
referenceId
string
Responses
Section titled “Responses”Customer updated
Media typeapplication/json
object
message
string
data
object
id
string
organizationId
string
firstName
string
lastName
string
msisdn
string
isActive
boolean
identificationNumber
string
identificationType
string
referenceId
string
createdAt
string format: date-time
updatedAt
string format: date-time
Example
{ "message": "Customer updated successfully", "data": { "id": "clx0a1b2c3d4e5f6g7h8i9j0k", "organizationId": "clorgb2c3d4e5f6g7h8i9j0k1", "firstName": "John", "lastName": "Doe", "msisdn": "260971234567", "isActive": true, "identificationType": "SSN" }}Request failed schema validation
Media typeapplication/json
object
error
string
details
Array<object>
object
field
string
message
string
Example
{ "error": "Validation failed", "details": [ { "field": "firstName", "message": "First name is required" } ]}Authentication failed
Media typeapplication/json
object
error
string
message
string
Example
{ "error": "Unauthorized", "message": "Invalid organization authentication token"}Resource not found
Media typeapplication/json
object
error
string
message
string
Example
{ "error": "Not found", "message": "Customer not found"}