Get Customer by Email
https://sandboxapi.onbrails.com/api/v2/customers/get-by-email (opens in a new tab)
Retrieve details of a single customer using their email address.
Body Parameters
| Parameter | Type | Required |
|---|---|---|
string | ✅ |
Request
Customers/Get Customer by Email [POST]
curl --request POST \
--url https://sandboxapi.onbrails.com/api/v2/customers/get-by-email \
--header 'Authorization: Bearer YOUR_SECRET_KEY' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
"email": "customerEmail@mail.com"
}'Responses
🟢 200 - Result example
{
"status": true,
"message": "successfully fetched customer",
"data": {
"id": "4bf15cb3-97a6-4072-9683-aa3c6d7233df",
"createdAt": "2023-08-15T14:20:45.746Z",
"updatedAt": "2023-08-15T14:20:45.746Z",
"firstName": null,
"lastName": null,
"email": "customerEmail@mail.com",
"phone": null,
"countryCode": null,
"blacklisted": false,
"businessName": null,
"isDefault": false
}
}