Skip to main content

Order data object

Description

Order data object is used in order import requests.

ParameterTypeExampleRequiredDescription
external_idstring"123456"YesOrder additional ID
matchingstring"email"NoSubscriber search mode.
By default – email

For each type of matching, certain fields must be passed in the request body. You can learn more about these fields here.
endpointstring"website"YesTouchpoint ID
tagsarray
[
"one",
"two"
]
NoList of tags
statusstring"new"
"delivered"
"paid"
"canceled"
"part_refunded"
YesOrder status ID
delivery_coststring"200"NoCost of delivery
total_pricestring"3000"YesTotal cost of the order.

It consists of the cost of each item in the order and the cost of delivery.
currencystring"USD"YesThe currency that is used to indicate the cost of the order.

Currencies are configured in the platform interface: MarketSettingsOther. If the request passes a currency that is not set in the platform, an error will occur.
create_timestring"2006-01-25"
"2006-01-25 15:04:05"
NoOrder creation date (RFC 3339 format)
update_timestring"2006-01-25"
"2006-01-25 15:04:05"
NoOrder update date (RFC 3339 format)
custom_fieldsobject
{
"order_field_id_1": "data",
"order_field_id_2": 123
}
NoCustom order fields
"[field ID]": "[field value]"
regionstring"region_external_id"NoRegion additional ID.
You can create a region and get its identifier in the platform interface: MarketSettings.
linesarray
[
{
"external_id": "7777",
"product": "product_external_id",
"base_price_per_item": "600",
"min_price_per_item": "300",
"final_price_per_item": "500",
"count": 5
}
]
YesOrder item data. At least one position.

See below.

Object structure

[
{
"external_id": "123456",
"matching": "email",
"email": "johndoe@example.com",
"endpoint": "endpoint_external_id",
"tags": [
"one",
"two"
],
"status": "new",
"delivery_cost": "100",
"total_price": "1000",
"currency": "USD",
"custom_fields": {
"order_field_id_1": "data",
"order_field_id_2": 123
},
"region": "region_external_id",
"lines": [
{
"external_id": "1234000",
"status": "new",
"sku": "sku_external_id",
"base_price_per_item": "900",
"min_price_per_item": "900",
"final_price_per_item": "900",
"count": 5,
"custom_fields": {
"line_field_id_2": "data",
"line_field_id_1": 123
}
}
]
}
]

Lines object

Description

lines is the array of objects. It contains objects with data about order items. One object stores one order item.

ParameterTypeExampleRequiredDescription
external_idstring"1235678"YesItem additional ID
statusstring"new"NoOrder item status ID:
  • delivering
  • processing
  • new
  • refunded
  • canceled
  • delivered
  • or custom status id
skustringIPhone_Red_128GbDo not pass it in the request if you pass the product parameterSKU additional ID. If the product is represented as a product - specify the product ID, if the product is represented as its variety - specify only the SKU ID.
productstringMP3_player_BassProDo not pass it in the request if you pass the sku parameterProduct additional ID
base_price_per_itemstring"600"YesBase price
min_price_per_itemstring"300"YesMinimum price
final_price_per_itemstring"500"YesFinal price
countint5YesQuantity of products or SKUs in the order item
custom_fieldsobject
{
"line_field_id_2": 123,
"line_field_id_2": "data"
}
NoValue of custom fields for the order item

Object stucture

[
{
"external_id": "12345",
"status": "new",
"product": "MP3_player_BassPro",
"base_price_per_item": "600",
"min_price_per_item": "300",
"final_price_per_item": "500",
"count": 5,
"custom_fields": {
"lot_number": 123,
"imported": true
}
}
]

Example of SKU:

[
{
"external_id": "76543",
"status": "processing",
"sku": "IPhone_Red_128Gb",
"base_price_per_item": "1000",
"min_price_per_item": "700",
"final_price_per_item": "850",
"count": 13,
"custom_fields": {
"lot_number": 93,
"localization": "RU"
}
}
]