Skip to content

Orders – get a list of order attributes

This GET method retrieves all order attributes configured in your business unit in Settings > Orders > Order attributes.

Endpoint

The endpoint (server address) for this request is https://api.ecdp.app/orderattributes

Request parameters

ParameterLocationTypeRequiredDescriptionAllowed values / Notes
x-api-keyheaderstringyesAPI key for authentication. Found in Settings > API.Must be valid ECDP API key.

This endpoint does not accept query parameters or a request body. It returns all order attributes configured in the current business unit.

Response

The response contains the following parameters:

ParameterTypeDescription
statusintegerResponse status code. 0 indicates success.
dataarrayArray of order attribute data. Empty array if no attributes are configured. See Order attribute data structure below.

Order attribute data

Each object in the data array contains the following prameters:

ParameterTypeDescription
idinteger (int32)Unique identifier for the order attribute. Visible in Settings > Orders > Order attributes.
namestringDisplay name of the attribute as configured in Settings > Orders > Order attributes. Max 256 characters.
typestringData type of the attribute. Determines validation rules and storage format. See the data types.

Data types

The type field returns one of the following values:

TypeDescription
StringShort text field, typically up to 255 characters.
TextLong text field for extended content.
NumberNumeric value (integer or decimal).
MoneyCurrency value with decimal precision.
DateDate without time component (YYYY-MM-DD).
DateTimeDate with time component (ISO-8601 format).
SingleSelectPredefined list of allowed values.
BooleanTrue/false value.
UrlValid URL string.

Response codes

CodeDescription
200Success. Returns the list of order attributes (may be empty).
401Unauthorized. API key is missing, invalid, or lacks permission to access this resource.
403Forbidden. The API key does not have access to this business unit.
500Internal Server Error. An unexpected error occurred on the server.

Example requests and responses

Get a list of order attributes

Response (200 OK):

{
  "status": 0,
  "data": [
    {
      "id": 1,
      "name": "Payment method",
      "type": "SingleSelect"
    },
    {
      "id": 2,
      "name": "Shipping carrier",
      "type": "String"
    },
    {
      "id": 3,
      "name": "Order notes",
      "type": "Text"
    },
    {
      "id": 4,
      "name": "Is gift",
      "type": "Boolean"
    },
    {
      "id": 5,
      "name": "Estimated delivery",
      "type": "Date"
    }
  ]
}

Response when no attributes are configured

{
  "status": 0,
  "data": []
}

Validation and behavior rules

  • This endpoint returns only order attributes configured in the current business unit in in Settings > Orders > Order attributes.
  • Attribute IDs are stable and do not change after creation.
  • Attribute names may be modified by administrators in the ECDP interface; always reference attributes by id for reliable integration.

Reference documentation

Swagger – Order attributes

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