CSV Order Format

Sections

Our CSV order file format consists of two sections:

  1. Customer order information
  2. 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 or latin1 (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.

  1. Order header row
  2. Order data row
  3. separator
  4. Items header row
  5. Item data row 1
  6. Item data row 2
  7. Item data row 3

Order header and data row columns

  1. Delivery ID: The order identifier
  2. Type: One of "DELIVERY" or "RETURN"
  3. Customer ID: The customer ID
  4. Company: The requesting company name
  5. Cost Center: The cost center
  6. Address: The delivery address
  7. Zip: The ZIP code
  8. City: The city name
  9. Country: The ISO country code
  10. User name: The name of the user who sent the order
  11. User email: The email address of the user who sent the order
  12. Scheduled date: The desired schedule date in the format YYYY-MM-DD
  13. Scheduled time: The optional desired schedule time in the format HH:mm
  14. Message: An optional message for the delivery provided by the user

Item header and data row columns

  1. Delivery ID: The order identifier – this is the same as the Delivery ID in the header and is repeated on each item row
  2. Item ID: The product identifier
  3. Item name: The product name
  4. Vessel size: The size of the product vessel in the specified unit
  5. Vessel unit: One of "l", "dl", "cl", "ml", "kg", "g" or "quantity"
  6. Order by: One of "vessel" or "kg"
  7. Item count: The count of bundles, vessels or kilos ordered. Always a whole number, unless Order by is set to "kg"
  8. Bundle ID: The bundle identifier, if available
  9. Bundle type: One of "box", "pack", "carton", "tray" or "pallet"
  10. Bundle size: The number of vessels in the bundle
  11. Vessel count: The total count of vessels (Item count * Bundle size)
  12. Price: The expected unit price, e.g. 1234.56
  13. Price per: One of "vessel", "l", "kg" or "100g"
  14. Message: An optional message for the item provided by the user