Get Customer
This GET endpoint retrieves detailed information about a specific customer using their unique customer ID.
Endpoint
- URL:
/customers/{customer_id} - Method:
GET
Path Parameters
| Parameter | Type | Description |
|---|---|---|
customer_id | string | The unique identifier of the customer to retrieve. |
Authentication
- Header:
accessToken - Type: Bearer Token
- Value:
<ACCESS-TOKEN>
Request Headers
| Header | Type | Description |
|---|---|---|
accessToken | string | Access token for authentication. (required) |
Request Body
No request body is required for this GET operation.
Response
- Status Code: 200 OK
Success Response Body
A successful response will return detailed information about the customer:
Main Response Fields
| Field | Type | Description |
|---|---|---|
success | boolean | Indicates if the request was successful. |
data | object | Contains the details of the customer. |
Customer Object (data)
| Field | Type | Description |
|---|---|---|
email | string | Email address of the customer. |
firstName | string | First name of the customer. |
lastName | string | Last name of the customer. |
phoneNumber | string | Contact number of the customer. |
role | string | Role ID associated with the customer. |
company | string | Company ID related to the customer. |
status | string | Current status of the customer (e.g., "pending"). |
verifiedEmail | boolean | Indicates if the customer's email is verified. |
newsletter | boolean | Indicates subscription to the newsletter. |
isB2B | boolean | Indicates if the customer is a business customer. |
metaFields | array | Additional metadata related to the customer. |
createdBy | object | Information about who created the customer entry. |
createdAt | string (ISO 8601) | Timestamp of when the customer was created. |
updatedAt | string (ISO 8601) | Timestamp of the last update to the customer data. |
id | string | Unique identifier for the customer. |
address | object | Address information of the customer. |
Error Responses
| Status Code | Description |
|---|---|
| 401 Unauthorized | The access token is invalid or missing. |
| 403 Forbidden | You do not have permission to access this resource. |
| 404 Not Found | No customer matches the specified customer_id. |
| 500 Internal Server Error | An error occurred on the server. |
Notes
- Ensure the
customer_idin the URL is replaced with the actual ID of the customer you wish to view. - Confirm your access token is valid and has permissions to access customer data.
- This endpoint returns detailed customer information for authorized users.