Show Customer
2/16/25Less than 1 minute
Show Customer
Description
This API allows client to retrieve details of a specific customer by its ID.
Endpoint
- URL:
/v1/customers/{customerId}
- Method:
GET
Required Headers
{
"Authorization": "Bearer JWT_TOKEN",
"X-MerchantApiKey": "MERCHANT_API_KEY",
"Content-Type": "application/json"
}
Example API Call (Using Fetch)
fetch("https://api.shopsynch.com/v1/customers/679f8f5a3b5f2173201c2582", {
method: "GET",
headers: {
"Authorization": "Bearer JWT_TOKEN",
"X-MerchantApiKey": "MERCHANT_API_KEY",
"Content-Type": "application/json"
}
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error("Error:", error));
✅ Sample 200 Response (Success)
{
"data": {
"id": "67b20a5edd84ed390426c09f",
"email": "customer@yopmail.com",
"fullName": null,
"phoneNumber": null,
"address": null,
"createdAt": "2025-02-16T16:55:10.289",
"updatedAt": "2025-02-16T16:55:10.289"
},
"message": "Customer retrieved successfully",
"status": true
}
❌ Sample 404 Response (Not Found Error)
{
"status": false,
"message": "Customer not found"
}
Next Steps
- Learn more about Register a New Customer
- Learn more about Updating a Customer
- Learn more about Deleting a Customer