Sections
Our CSV order file format consists of two sections:
- Customer order information
- Ordered items
Both sections have the same number of columns, so that the file can always be opened manually for human inspection. The two sections are separated by a line consisting only by column separators.
Make sure to split the file and process the order information separate from the item information.
File format
- Encoding:
utf-8
orlatin1
(ISO 8859-1
) - Newline:
\n
- Delimiter:
,
(comma) - Quoting: Cells with special characters like
,
and\n
are quoted with"
- Escapes: The
"
sign is escaped as a double""
and the cell is quoted
Example: abc " def
will become "abc "" def"
The user supplied message on the delivery in the first section is likely to contain newlines, while the message on the order items is a single line string.
If the file encoding is
utf-8
(the default setting), the file contains a byte order mark.
Row types
Each of the two sections has a header row. The first section has exactly one data row and the second section has one data row per order item.
- Order header row
- Order data row
separator
- Items header row
- Item data row 1
- Item data row 2
- Item data row 3
Order header and data row columns
Delivery ID
: The order identifierType
: One of"DELIVERY"
or"RETURN"
Customer ID
: The customer IDCompany
: The requesting company nameCost Center
: The cost centerAddress
: The delivery addressZip
: The ZIP codeCity
: The city nameCountry
: The ISO country codeUser name
: The name of the user who sent the orderUser email
: The email address of the user who sent the orderScheduled date
: The desired schedule date in the formatYYYY-MM-DD
Scheduled time
: The optional desired schedule time in the formatHH:mm
Message
: An optional message for the delivery provided by the user
Item header and data row columns
Delivery ID
: The order identifier – this is the same as theDelivery ID
in the header and is repeated on each item rowItem ID
: The product identifierItem name
: The product nameVessel size
: The size of the product vessel in the specified unitVessel unit
: One of"l"
,"dl"
,"cl"
,"ml"
,"kg"
,"g"
or"quantity"
Order by
: One of"vessel"
or"kg"
Item count
: The count of bundles, vessels or kilos ordered. Always a whole number, unlessOrder by
is set to"kg"
Bundle ID
: The bundle identifier, if availableBundle type
: One of"box"
,"pack"
,"carton"
,"tray"
or"pallet"
Bundle size
: The number of vessels in the bundleVessel count
: The total count of vessels (Item count * Bundle size
)Price
: The expected unit price, e.g.1234.56
Price per
: One of"vessel"
,"l"
,"kg"
or"100g"
Message
: An optional message for the item provided by the user