Customers
Get Customer
Get a specific customer by its ID.
| Verb | GET |
| URL | https://api.s.unit.sh/ready-to-launch/customers/:customerId |
| Required Scope | customers |
| Timeout (Seconds) | 5 |
Example Request:
curl -X GET 'https://api.s.unit.sh/ready-to-launch/customers/10014' \
-H "Authorization: Bearer ${TOKEN}"
Response
Returns customer details including the list of associated user IDs.
Response is a JSON:API document.
200 OK
| Name | Type | Description |
|---|---|---|
| id Required | string | Identifier of the customer resource. |
| type Required | string | Type of the customer resource. Always customer. |
| attributes Required | JSON Object | JSON object representing the customer data. |
Attributes
| Name | Type | Description |
|---|---|---|
| createdAt Required | string | The date the customer was created. |
| status Required | string | The status of the customer (Active or Archived). |
| customerType Required | string | The type of the customer (individual or business). |
| userIds Required | array | List of user IDs associated with this customer. |
Example Response:
{
"data": {
"type": "customer",
"id": "10014",
"attributes": {
"createdAt": "2023-10-20T10:15:22.123Z",
"status": "Active",
"customerType": "individual",
"userIds": ["user_12345", "user_67890"]
}
}
}
List Customers
Get a list of customers.
| Verb | GET |
| URL | https://api.s.unit.sh/ready-to-launch/customers |
| Required Scope | customers |
| Timeout (Seconds) | 5 |
Query Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| filter[customerId] | string | (empty) | Optional. Filter customers by customer ID. |
| filter[userId] | string | (empty) | Optional. Filter customers by user ID. |
Example Request:
curl -X GET 'https://api.s.unit.sh/ready-to-launch/customers' \
-H "Authorization: Bearer ${TOKEN}"
Response
Returns a list of customers with their details.
Response is a JSON:API document.
200 OK
| Name | Type | Description |
|---|---|---|
| data Required | Array of customers | Array of customer resources. |
Attributes
| Name | Type | Description |
|---|---|---|
| createdAt Required | string | The date the customer was created. |
| status Required | string | The status of the customer (Active or Archived). |
| customerType Required | string | The type of the customer (individual or business). |
| userIds Required | array | List of user IDs associated with this customer. |
Example Response:
{
"data": [
{
"type": "customer",
"id": "10014",
"attributes": {
"createdAt": "2023-10-20T10:15:22.123Z",
"status": "Active",
"customerType": "individual",
"userIds": ["user_12345", "user_67890"]
}
},
{
"type": "customer",
"id": "10016",
"attributes": {
"createdAt": "2023-11-05T14:30:00.000Z",
"status": "Active",
"customerType": "business",
"userIds": ["user_11111"]
}
}
]
}