Creates an assortment file to be processed asynchronously.
Creates an assortment file identified by a customer_number
(in this context the customer number here works more like an "assortment ID"). The file is processed asynchronously, i.e. the file is not processed right after posted.
The file
argument must be the file binary content encoded in UTF-8. The file content must be an array of objects, where each object contains a product/article. The object fields are the following:
Field name | Type | Constraints | Required |
---|---|---|---|
third_party_id | String | Alphanumeric, 50 chars | Yes |
shared_id | String | Alphanumeric, 50 chars | No |
name | String | Alphanumeric, 300 chars | Yes |
brand | String | Alphanumeric, 150 chars | No |
description | String | Alphanumeric | No |
package_type | String | Alphanumeric, 50 chars | No |
price | Decimal | Up to 3 decimal places | No |
price_type_code | Integer | Either 0 (per package) or 1 (per unit).Default: 0 . | No, unless price_unit is set (then price_type_code=1 ). |
price_unit | String | Must be one of our supported units. | No, unless price_type_code=1 |
orderable | Boolean | Default: true . | No |
package_description | Object | Please check below. | Yes |
lead_time | String | Duration in the format: [DD] [HH:[MM:]]ss[.uuuuuu] | No |
weighted | Boolean | Default: false . | No |
The package_description
is a nested object representing the product content. The innermost object contains the following fields:
Field name | Type | Constraints | Required |
---|---|---|---|
quantity | Integer | N/A | Yes |
unit_name | String | Must be one of our supported units . | Yes |
gtin | String | Accepted formats: EAN-13, EAN-8, UPC (12-digit) and GTIN (EAN-14). | No |
The other object levels contains the fields below:
Field name | Type | Constraints | Required |
---|---|---|---|
quantity | Decimal | Up to 6 decimal places. | Yes |
package | Object | An object which the data is either the innermost object (table above) or another level (this table). | Yes |
gtin | String | Accepted formats: EAN-13, EAN-8, UPC (12-digit) and GTIN (EAN-14). | No |
For example, a Coca-Cola pack of 12 units of 1.5 liters each would be a 2-levels object:
{
"gtin": "6415600501828",
"quantity": 12,
"package": {
"gtin": "6415600501811",
"quantity": 1.5,
"unit_name": "L"
}
}
Please consult our guide for more details about the assortment data.