v1

latestOpenAPI 3.0.0Apache 2.02026-07-143281,4552.1 MB
OrderCustomAttributes

RetrieveOrderCustomAttribute

Retrieves a custom attribute associated with an order.

You can use the with_definition query parameter to also retrieve the custom attribute definition in the same call.

To retrieve a custom attribute owned by another application, the visibility setting must be VISIBILITY_READ_ONLY or VISIBILITY_READ_WRITE_VALUES. Note that seller-defined custom attributes also known as custom fields) are always set to VISIBILITY_READ_WRITE_VALUES.

get/v2/orders/{order_id}/custom-attributes/{custom_attribute_key}

Path parameters

order_idstring required

The ID of the target order.

custom_attribute_keystring required

The key of the custom attribute to retrieve. This key must match the key of an existing custom attribute definition.

Query parameters

versioninteger

To enable optimistic concurrency control, include this optional field and specify the current version of the custom attribute.

with_definitionboolean

Indicates whether to return the custom attribute definition in the definition field of each custom attribute. Set this parameter to true to get the name and description of each custom attribute, information about the data type, or other definition details. The default value is false.

Response

Success

Example response

{
  "custom_attribute": {
    "created_at": "2022-11-22T21:27:33.429Z",
    "key": "cover-count",
    "updated_at": "2022-11-22T21:28:35.721Z",
    "value": "6",
    "version": 1,
    "visibility": "VISIBILITY_READ_WRITE_VALUES"
  }
}