Customer Service
Manages customers.
Endpoints
Create Customer
POST /customers
Create a new customer.
Request Body
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
| externalId | string | Yes | External customer ID for integration with external systems. | "customer-external-id-123" |
| status | enum | Yes | Customer status. Must be one of: active, inactive, deleted, suspended. | "active" |
Example Request:
{
"externalId": "customer-external-id-123",
"status": "active"
}
Success Response
Returns the created customer object.
{
"id": "c1d2e3f4-5678-90ab-cdef-1234567890ab",
"externalId": "customer-external-id-123",
"status": "active",
"createdAt": "2025-11-18T12:34:56.789Z"
}
Error Responses
- 400 Bad Request: Validation failed (missing or invalid fields)
- 409 Conflict: Duplicate externalId
List Customers
GET /customers
Retrieve all customers.
Success Response
Returns an array of customer objects.
[
{
"id": "c1d2e3f4-5678-90ab-cdef-1234567890ab",
"externalId": "customer-external-id-123",
"status": "active",
"createdAt": "2025-11-18T12:34:56.789Z"
}
// ...more customers
]
Get Customer
GET /customers/:id
Retrieve details for a specific customer.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | uuid | Yes | Customer unique ID |
Success Response
{
"id": "c1d2e3f4-5678-90ab-cdef-1234567890ab",
"externalId": "customer-external-id-123",
"status": "active",
"createdAt": "2025-11-18T12:34:56.789Z"
}
Error Responses
- 404 Not Found: Customer not found
- 400 Bad Request: Invalid customer ID format
Update Customer
PUT /customers/:id
Update the status of an existing customer.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | uuid | Yes | Customer unique ID |
Request Body
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
| status | enum | Yes | Customer status to update. Must be one of: active, inactive, deleted, suspended. | "active" |
Example Request:
{
"status": "active"
}
Success Response
Returns the updated customer object.
{
"id": "c1d2e3f4-5678-90ab-cdef-1234567890ab",
"externalId": "customer-external-id-123",
"status": "active",
"createdAt": "2025-11-18T12:34:56.789Z"
}
Error Responses
- 400 Bad Request: Validation failed
- 404 Not Found: Customer not found
Get All Addresses for Customer
GET /customers/:id/accounts/addresses
Retrieve all blockchain addresses for all accounts associated with a customer.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | uuid | Yes | Customer unique ID |
Success Response
Returns an array of addresses.
[
"0x1234567890abcdef...",
"0xabcdef1234567890..."
]
Error Responses
- 404 Not Found: Customer not found
- 400 Bad Request: Invalid customer ID format
Delete Customer
DELETE /customers/:id
Note: Customer deletion is not permitted. This endpoint will always return a
405 Method Not Allowederror.
Error Response
- 405 Method Not Allowed: Customer deletion is not permitted
Error Format
All error responses follow this format:
{
"error": {
"code": "ERROR_CODE",
"message": "Description of the error",
"details": [
{
"field": "fieldName",
"message": "Field-specific error message"
}
]
}
}
Field Descriptions
| Field | Type | Description |
|---|---|---|
| id | uuid | Unique identifier for the customer |
| externalId | string | External customer ID |
| status | enum | Customer status (see CustomerStatus enum) |
| createdAt | string | ISO8601 timestamp of customer creation |
For enum values, see CustomerStatus definition.