Customers – get a list of customer attributes
This GET method retrieves all custom customer attributes configured in your business unit in Settings > Customers > Custom attributes.
To send a request using this method, it must include:
Endpoint
The endpoint for GET requests is: https://api.ecdp.app/customerattributes
Request parameters
| Parameter | Location | Type | Required | Description | Allowed values / Notes |
| x-api-key | header | string | yes | Your ECDP API key for authentication | Obtained from Settings > API |
This endpoint accepts no query parameters or request body. The API key in the header is the only required input.
Response
The response contains a status indicator and an array of customer attribute definitions.
| Parameter | Type | Description |
| status | integer | Response status code. 0 indicates success. |
| data | array | Array of customer attribute objects. Empty array if no custom attributes are defined. See Customer attribute data structure below. |
Customer attribute data
Each parameter in the data array represents one customer attribute.
| Parameter | Type | Description |
| id | integer (int32) | Unique identifier of the customer attribute. Visible in Settings > Customers > Custom attributes. |
| name | string | Name of the attribute as configured in Settings > Customers > Custom attributes. |
| type | string | Data type of the attribute. It determines what values it can store. See the data types. |
Data types
The data type field contains one of the following values:
| Type | Description |
| String | Short text value (single line) |
| Text | Long text value (multi-line) |
| Number | Numeric value (integer or decimal) |
| Money | Currency value with decimal precision |
| Date | Date value without time component (YYYY-MM-DD) |
| DateTime | Date and time value (ISO-8601 format) |
| SingleSelect | Single selection from predefined options |
| Boolean | True/false value |
| Url | URL/web address value |
Example requests and responses
Get all custom customer attributes
Response (200 OK):
{
"status": 0,
"data": [
{
"id": 1,
"name": "Loyalty tier",
"type": "SingleSelect"
},
{
"id": 2,
"name": "Preferred language",
"type": "String"
},
{
"id": 3,
"name": "Birth date",
"type": "Date"
},
{
"id": 4,
"name": "Newsletter signup date",
"type": "DateTime"
},
{
"id": 5,
"name": "lifetime_value",
"type": "Money"
}
]
}No custom attributes are available
When no custom attributes have been configured, the endpoint returns an empty data array.
Response (200 OK):
{
"status": 0,
"data": []
}Response codes
| Code | Status | Description |
| 200 | Success | Request processed successfully. Response contains the list of custom customer attributes. |
| 401 | Unauthorized | API key is missing, invalid, or expired. Verify your API key in Settings > API. |
| 403 | Forbidden | API key does not have permission to access this resource. |
| 500 | Internal Server Error | Server-side error occurred. Retry the request or contact support if the issue persists. |
Validation and behavior rules
- This endpoint returns only custom attributes. System attributes (email, phone, etc.) are not included.
- Attribute IDs are stable and do not change after creation.
Reference documentation
Swagger – Customer attributes