API Docs
Fetching Customers
You can fetch a customer using the customer ID. The response will provide detailed information about the customer including their contact details and identification documents.
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 fetch or your own reference ID for the customer.
Sample Request to Fetch a Customer
curl -X GET "https://api.zuripay.app/v1/customer/fetch/93955f5a-9d21-48c7-bab7-cfac20cf426e" \ -H "Authorization: Bearer zp_test_26PHem9AhJZvU623DfE1x4sd" \ -H "Content-Type: application/json"
Or using customer reference:
curl -X GET "https://api.zuripay.app/v1/customer/fetch/CUST-12345" \ -H "Authorization: Bearer zp_test_26PHem9AhJZvU623DfE1x4sd" \ -H "Content-Type: application/json"
Response Parameters
- result:
string
- Indicates whether the request was successful ("success") or not ("error"). - customer:
object
- Contains the details of the fetched customer with the following properties:- customer_id:
string
- Unique identifier for the customer. - customer_reference:
string
- Your own reference ID for the customer (if provided during creation). - first_name:
string
- Customer's first name. - last_name:
string
- Customer's last name. - city:
string
- City where the customer is located. - country:
string
- Country where the customer is located. - emails:
array
- List of customer's email addresses with verification status:- email_id:
string
- Unique identifier for the email record. - email_address:
string
- The email address. - is_primary:
boolean
- Whether this is the primary email. - is_verified:
boolean
- Whether the email has been verified. - date_created:
string
- Date when the email was added.
- email_id:
- phones:
array
- List of customer's phone numbers with verification status:- phone_id:
string
- Unique identifier for the phone record. - phone_number:
string
- The phone number. - is_primary:
boolean
- Whether this is the primary phone number. - is_verified:
boolean
- Whether the phone number has been verified. - date_created:
string
- Date when the phone was added.
- phone_id:
- identifications:
array
- List of customer's identification documents:- id_doc_id:
string
- Unique identifier for the identification document. - id_type:
string
- Type of identification document (e.g., "passport", "national_id"). - id_number:
string
- Identification document number. - issuing_country:
string
- Country that issued the identification document. - expiry_date:
string
- Expiration date of the document (YYYY-MM-DD format). - document_link:
string
- URL to access the document. - is_verified:
boolean
- Whether the document has been verified. - status:
string
- Verification status of the document (e.g., "verified", "pending"). - date_created:
string
- Date when the document was added.
- id_doc_id:
- customer_id:
Sample Responses
{ "result": "success", "customer": { "customer_id": "93955f5a-9d21-48c7-bab7-cfac20cf426e", "customer_reference": "CUST-12345", "first_name": "John", "last_name": "Doe", "city": "New York", "country": "US", "emails": [ { "email_id": "email_6789abcdef", "email_address": "[email protected]", "is_primary": true, "is_verified": true, "date_created": "2023-01-15 14:30:45" }, { "email_id": "email_1234567890", "email_address": "[email protected]", "is_primary": false, "is_verified": false, "date_created": "2023-02-20 09:15:22" } ], "phones": [ { "phone_id": "phone_abcdef12345", "phone_number": "+1234567890", "is_primary": true, "is_verified": true, "date_created": "2023-01-15 14:32:18" } ], "identifications": [ { "id_doc_id": "id_doc_passport123", "id_type": "passport", "id_number": "AB123456", "issuing_country": "US", "expiry_date": "2030-05-15", "document_link": "https://example.com/documents/passport.pdf", "is_verified": true, "status": "verified", "date_created": "2023-01-16 10:45:30" }, { "id_doc_id": "id_doc_license456", "id_type": "drivers_license", "id_number": "DL987654", "issuing_country": "US", "expiry_date": "2028-11-30", "document_link": "https://example.com/documents/license.pdf", "is_verified": false, "status": "pending", "date_created": "2023-02-22 16:20:15" } ] } }