# Upload list of sales orders

**POST** `https://api.zoined.com/salesOrders?dryRun=false&separator=%3B&encoding=utf-8`

Endpoint: POST /salesOrders
Security: bearerAuth

## Security:

  - `bearerAuth` (unknown)
    http bearer token

## Query parameters:

  - `dryRun` (boolean, required)
    Only validate the request without storing the data

  - `separator` (string, required)
    Column separator used when loading CSV data

  - `encoding` (string, required)
    Character encoding used in the CSV data (default is utf-8)

## Request fields (application/json):

  - `transaction_id` (string, required)
    Unique ID for the transaction
    Example: er/232/f31

  - `line_item_id` (string, required)
    Secondary transaction identifier
    Example: 1

  - `customer_id` (string)
    Customer ID for identified customer
    Example: 32

  - `delivery_customer_id` (string)
    Delivery Customer ID for identified customer
    Example: 32

  - `product_id` (string, required)
    Product ID
    Example: XYZ

  - `product_quantity` (number, required)
    Sold quantity
    Example: 2

  - `delivered_quantity` (number)
    Delivered quantity
    Example: 1

  - `planned_quantity` (number)
    Planned quantity
    Example: 2

  - `product_unit_price` (number, required)
    Unit price for single product
    Example: 10

  - `sales_value` (number, required)
    Total sales amount including tax
    Example: 20

  - `sales_value_wo_vat` (number)
    Total sales amount without tax
    Example: 20

  - `rebate` (number)
    Amount of rebate given including tax
    Example: 0

  - `rebate_wo_vat` (number)
    Amount of rebate given without tax
    Example: 0

  - `rebate_code_id` (string)
    Rebate Code ID
    Example: 3313V

  - `sales_currency` (string)
    Sales currency as ISO 4217 currency code. Required if multiple currencies are used.
    Example: EUR

  - `payment_method` (string)
    Payment method
    Example: Invoice 30

  - `tender_amount` (number)
    Amount paid with tender in 'payment method'.
    Example: 20

  - `deposit_amount` (number)
    Amount of deposit paid for this order item.
    Example: 10

  - `supplier_id` (string)
    Supplier ID
    Example: 221

  - `parent_product_id` (string)
    Parent Product ID
    Example: 123

  - `purchase_price` (number)
    Total purchase price including tax
    Example: 5

  - `purchase_price_wo_vat` (number)
    Total purchase price without tax
    Example: 5

  - `purchase_currency` (string)
    Purchase currency as ISO 4217 currency code. Required if multiple currencies are used.
    Example: EUR

  - `organisation_id` (string)
    Organisation unit ID
    Example: 540

  - `department_id` (string)
    Department ID
    Example: 54011

  - `salesperson_id` (string)
    Sales person ID
    Example: 5402101

  - `cancel_id` (string)
    Transaction ID of cancelled receipt
    Example: er/232/f2

  - `delivery_date` (string)
    Delivery date (yyyy-mm-dd)
    Example: 2016-01-01

  - `delivery_time` (string)
    Delivery time (HH:mm:ss)
    Example: 15:00:00

  - `order_date` (string, required)
    Order date (yyyy-mm-dd)
    Example: 2016-01-01

  - `order_time` (string, required)
    Order time (HH:mm:ss)
    Example: 15:00:00

  - `invoice_date` (string)
    Invoice date (yyyy-mm-dd)
    Example: 2016-01-01

  - `invoice_time` (string)
    Invoice time (HH:mm:ss)
    Example: 15:00:00

  - `arrival_date` (string)
    Arrival date (yyyy-mm-dd)
    Example: 2016-01-03

  - `arrival_time` (string)
    Arrival time (HH:mm:ss)
    Example: 15:00:00

  - `order_status` (number, required)
    Order status. 1=Open, 2=Reserved, 3=Invoiced, 4=Cancelled
    Example: 1

  - `order_type` (string)
    Order type.
    Example: Wholesale

  - `customer_order_number` (string)
    Customer internal order ID
    Example: 1234-5

  - `sales_offer_id` (string)
    ID that refers to respective sales offer if applicable
    Example: 1234

  - `sales_offer_line_id` (string)
    ID that refers to respective sales offer line if applicable
    Example: 1

  - `custom_field_1` (string)
    Custom field 1
    Example: EU only

  - `custom_field_2` (string)
    Custom field 2
    Example: EU only

  - `custom_field_3` (string)
    Custom field 3
    Example: EU only

  - `custom_field_4` (string)
    Custom field 4
    Example: EU only

  - `custom_field_5` (string)
    Custom field 5
    Example: EU only

  - `custom_field_6` (string)
    Custom field 6
    Example: EU only

  - `custom_field_7` (string)
    Custom field 7
    Example: EU only

  - `custom_field_8` (string)
    Custom field 8
    Example: EU only

  - `custom_field_9` (string)
    Custom field 9
    Example: EU only

  - `custom_field_10` (string)
    Custom field 10
    Example: EU only

  - `custom_field_11` (string)
    Custom field 11
    Example: EU only

  - `custom_field_12` (string)
    Custom field 12
    Example: EU only

  - `custom_field_13` (string)
    Custom field 13
    Example: EU only

  - `custom_field_14` (string)
    Custom field 14
    Example: EU only

  - `custom_field_15` (string)
    Custom field 15
    Example: EU only

  - `custom_metric_1` (number)
    Custom metric 1
    Example: 1

  - `custom_metric_2` (number)
    Custom metric 2
    Example: 100

  - `custom_metric_3` (number)
    Custom metric 3
    Example: 2.2

  - `custom_metric_4` (number)
    Custom metric 4
    Example: 1.05

  - `custom_metric_5` (number)
    Custom metric 5
    Example: 10000

  - `source_system` (string)
    Identifier of the source system this data is from. Needed when mapping between source system identifiers and master identifiers are used.
    Example: ABCDEF

## Response 200:

  - `200` (unknown)
    Request has been processed successfully.
**Headers**
- `Content-Type: application/json`

## Response 200 fields (application/json):

  - `status` (string, required)
    Status of the operation OK / Not OK
    Example: OK

  - `msg` (string, required)
    Message describing result of operation
    Example: 1 entity added

## Response 400:

  - `400` (unknown)
    Invalid, malformed or missing JSON-data in request
**Headers**
- `Content-Type: application/json`

## Response 400 fields (application/json):

  - `status` (string, required)
    Status of the operation OK / Not OK
    Example: Not OK

  - `msg` (string, required)
    Message describing result of operation
    Example: Reason for error

## Response 401:

  - `401` (unknown)
    Missing or invalid authorization token in header
**Headers**
- `Content-Type: application/json`

## Response 401 fields (application/json):

  - `status` (string, required)
    Status of the operation OK / Not OK
    Example: Not OK

  - `msg` (string, required)
    Message describing result of operation
    Example: Unauthorized

## Response 500:

  - `500` (unknown)
    Internal error or exception
**Headers**
- `Content-Type: application/json`

## Response 500 fields (application/json):

  - `status` (string, required)
    Status of the operation OK / Not OK
    Example: Not OK

  - `msg` (string, required)
    Message describing result of operation
    Example: Reason for error

## Response 200 examples:

  - `response` (unknown)

## Response 400 examples:

  - `response` (unknown)

## Response 401 examples:

  - `response` (unknown)

## Response 500 examples:

  - `response` (unknown)

