# Upload list of purchase orders

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

Endpoint: POST /purchaseOrders
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

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

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

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

  - `purchaser_id` (string)
    Purchaser ID
    Example: 5400

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

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

  - `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

  - `ordered_quantity` (number, required)
    order quantity
    Example: 2

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

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

  - `delivered_quantity` (number)
    quantity that is delivered
    Example: 2

  - `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: Express

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

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

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

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

  - `retail_value` (number)
    Total retail (sales) value including tax
    Example: 10

  - `retail_value_wo_vat` (number)
    Total retail (sales) value without tax
    Example: 8

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

  - `sales_unit` (string)
    Sales unit
    Example: KPL

  - `cancelled` (boolean, required)
    cancelled. true=cancelled transaction false=not cancelled transaction
    Example: false

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

  - `gross_weight` (number)
    Gross weight of ordered products.
    Example: 0

  - `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_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)

