Перейти к содержимому

Getting a list of customer attributes 

You can pull a complete list of customer attributes from ExpertSender. This won’t include system attributes – just the ones you’ve set up in Settings > Customers > Custom attributes.

Want to learn more about setting these up? Check out our Custom attributes guide.

GET method 

Use the GET method to grab all your current customer attributes along with their properties.

Endpoint

The endpoint for GET requests is: https://api.ecdp.app/customerattributes

Request parameters

ParameterRequiredTypeUsed inDescription
x-api-keyyesstringheaderYour API key, which you can find in Settings > API.

What data will be included in the response? 

The response to a correctly submitted query contains the following data: 

Parameter Type Description 
id Integer($int32) Customer attribute’s identification number visible under Settings > Customers > Customer attributes. 
name string Customer attribute’s name assigned by you in Settings > Customers > Customer attributes. 
type string Attribute type with its properties: String, Text, Number, Money, Date, DateTime, SingleSelct, Boolean, Url. 

Response codes

200: Success 

Your request worked perfectly, and the server sent back your data.

Sample response:

{
  "status": 0,
  "data": [
    {
      "id": 0,
      "name": "string",
      "type": "string"
    }
  ]
}

401: Unauthorized 

Something went wrong with your credentials – either your API key is missing or you’re trying to access information you don’t have permission for.

Sample response:

{
  "type": "string",
  "title": "string",
  "status": 0,
  "substatus": "CustomerInvalidModelState",
  "detail": "string",
  "instance": "string"
}