Updating Customers
You can update customer information including personal details, contact information, and identification documents. The response will provide confirmation of the update status.
Headers
- Authorization:
Bearer YOUR_SECRET_KEY
- Your API secret key prefixed with "Bearer". - Content-Type:
application/json
- Specifies the format of the request body.
Path Parameters
- customer_id or customer_reference:
string
(required) - Either the unique identifier for the customer you want to update or your own reference ID for the customer.
Body Parameters
first_name
Optional - The updated first name of the customer.
last_name
Optional - The updated last name of the customer.
street
Optional - The updated street address of the customer.
city
Optional - The updated city of the customer.
state
Optional - The updated state or province of the customer.
country
Optional - The updated country of the customer.
postal_code
Optional - The updated postal code of the customer.
customer_reference
Optional - Your own reference ID for the customer. This can be used to identify the customer in your system.
emails
Optional - Array of email objects to update for the customer.
- email_id: ID of the email to update
- email_address: Updated email address
- is_primary: Boolean indicating if this is the primary email
phones
Optional - Array of phone objects to update for the customer.
- phone_id: ID of the phone to update
- phone_number: Updated phone number
- is_primary: Boolean indicating if this is the primary phone
identifications
Optional - Array of identification objects to update for the customer.
- id_doc_id: ID of the identification document to update
- id_type: Type of identification (e.g., passport, national_id)
- id_number: Identification number
- issuing_country: Country that issued the identification
- expiry_date: Expiration date of the identification
Sample Request to Update a Customer
curl -X PUT "https://api.zuripay.app/v1/customer/update/19cba441-439a-4f58-87e6-6f723ffc32a8" \ -H "Authorization: Bearer zp_test_26PHem9AhJZvU623DfE1x4sd" \ -H "Content-Type: application/json" \ -d '{ "first_name": "John", "last_name": "Smith", "street": "123 Main Street", "city": "Harare", "state": "Harare Province", "country": "Zimbabwe", "postal_code": "00263", "customer_reference": "CUST-12345", "emails": [ { "email_id": "c46d977a-96a8-4b80-8051-07964d873392", "email_address": "[email protected]", "is_primary": true } ], "phones": [ { "phone_id": "5ce58935-498a-4285-bdf1-78be25373564", "phone_number": "+2637712345678", "is_primary": true } ], "identifications": [ { "id_doc_id": "0d51d49a-204a-47ea-8b74-fa6a15081c86", "id_type": "passport", "id_number": "AB123456", "issuing_country": "Zimbabwe", "expiry_date": "2030-01-01" } ] }'
Or using customer reference:
curl -X PUT "https://api.zuripay.app/v1/customer/update/CUST-12345" \ -H "Authorization: Bearer zp_test_26PHem9AhJZvU623DfE1x4sd" \ -H "Content-Type: application/json" \ -d '{ "first_name": "John", "last_name": "Smith", "street": "123 Main Street", "city": "Harare", "state": "Harare Province", "country": "Zimbabwe", "postal_code": "00263", "emails": [ { "email_id": "c46d977a-96a8-4b80-8051-07964d873392", "email_address": "[email protected]", "is_primary": true } ], "phones": [ { "phone_id": "5ce58935-498a-4285-bdf1-78be25373564", "phone_number": "+2637712345678", "is_primary": true } ], "identifications": [ { "id_doc_id": "0d51d49a-204a-47ea-8b74-fa6a15081c86", "id_type": "passport", "id_number": "AB123456", "issuing_country": "Zimbabwe", "expiry_date": "2030-01-01" } ] }'
Sample Responses
{ "result": "success", "customer_id": "19cba441-439a-4f58-87e6-6f723ffc32a8", "customer_reference": "CUST-12345", "message": "Customer updated successfully." }