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
| Parameter | Location | Type | Required | Description | Allowed values / Notes |
| x-api-key | header | string | yes | API 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:
| Parameter | Type | Description |
| status | integer | Response status code. 0 indicates success. |
| data | array | Array 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:
| Parameter | Type | Description |
| id | integer (int32) | Unique identifier for the order attribute. Visible in Settings > Orders > Order attributes. |
| name | string | Display name of the attribute as configured in Settings > Orders > Order attributes. Max 256 characters. |
| type | string | Data 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:
| Type | Description |
| String | Short text field, typically up to 255 characters. |
| Text | Long text field for extended content. |
| Number | Numeric value (integer or decimal). |
| Money | Currency value with decimal precision. |
| Date | Date without time component (YYYY-MM-DD). |
| DateTime | Date with time component (ISO-8601 format). |
| SingleSelect | Predefined list of allowed values. |
| Boolean | True/false value. |
| Url | Valid URL string. |
Response codes
| Code | Description |
| 200 | Success. Returns the list of order attributes (may be empty). |
| 401 | Unauthorized. API key is missing, invalid, or lacks permission to access this resource. |
| 403 | Forbidden. The API key does not have access to this business unit. |
| 500 | Internal 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