Skip to content

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

ParameterLocationTypeRequiredDescriptionAllowed values / Notes
x-api-keyheaderstringyesYour ECDP API key for authenticationObtained 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.

ParameterTypeDescription
statusintegerResponse status code. 0 indicates success.
dataarrayArray 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.

ParameterTypeDescription
idinteger (int32)Unique identifier of the customer attribute. Visible in Settings > Customers > Custom attributes.
namestringName of the attribute as configured in Settings > Customers > Custom attributes.
typestringData 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:

TypeDescription
StringShort text value (single line)
TextLong text value (multi-line)
NumberNumeric value (integer or decimal)
MoneyCurrency value with decimal precision
DateDate value without time component (YYYY-MM-DD)
DateTimeDate and time value (ISO-8601 format)
SingleSelectSingle selection from predefined options
BooleanTrue/false value
UrlURL/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

CodeStatusDescription
200SuccessRequest processed successfully. Response contains the list of custom customer attributes.
401UnauthorizedAPI key is missing, invalid, or expired. Verify your API key in Settings > API.
403ForbiddenAPI key does not have permission to access this resource.
500Internal Server ErrorServer-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

https://api.ecdp.app/swagger/index.html