Skip to content

Purchase orders

This end point can be used to record purchase orders into Zoined service.

Upload list of purchase orders

Request

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

Security
bearerAuth
Query
dryRunbooleanrequired

Only validate the request without storing the data

Example:dryRun=false
separatorstringrequired

Column separator used when loading CSV data

Example:separator=;
encodingstringrequired

Character encoding used in the CSV data (default is utf-8)

Example:encoding=utf-8
Body
Any of:
transaction_idstringrequired

Unique ID for the transaction

Example:"er/232/f31"
line_item_idstringrequired

Secondary transaction identifier

Example:"1"
product_idstringrequired

Product ID

Example:"XYZ"
organisation_idstringrequired

Organisation unit ID

Example:"540"
department_idstring

Department ID

Example:"54011"
purchaser_idstring

Purchaser ID

Example:"5400"
supplier_idstring

Supplier ID

Example:"221"
parent_product_idstring

Parent Product ID

Example:"123"
order_datestringrequired

Order date (yyyy-mm-dd)

Example:"2016-01-01"
order_timestringrequired

Order time (HH:mm:ss)

Example:"15:00:00"
ordered_quantitynumberrequired

order quantity

Example:2
delivery_datestring

Delivery date (yyyy-mm-dd)

Example:"2016-01-01"
delivery_timestring

Delivery time (HH:mm:ss)

Example:"15:00:00"
delivered_quantitynumber

quantity that is delivered

Example:2
arrival_datestring

Arrival date (yyyy-mm-dd)

Example:"2016-01-03"
arrival_timestring

Arrival time (HH:mm:ss)

Example:"15:00:00"
order_statusnumberrequired

Order status. 1=Open, 2=Reserved, 3=Invoiced, 4=Cancelled

Example:1
order_typestring

Order Type

Example:"Express"
purchase_pricenumber

Total purchase price including tax

Example:5
purchase_price_wo_vatnumber

Total purchase price without tax

Example:4
rebatenumber

Amount of rebate given including tax

Example:0
rebate_wo_vatnumber

Amount of rebate given without tax

Example:0
retail_valuenumber

Total retail (sales) value including tax

Example:10
retail_value_wo_vatnumber

Total retail (sales) value without tax

Example:8
purchase_currencystring

Purchase currency as ISO 4217 currency code. Required if multiple currencies are used.

Example:"EUR"
sales_unitstring

Sales unit

Example:"KPL"
cancelledbooleanrequired

cancelled. true=cancelled transaction false=not cancelled transaction

Example:false
cancel_idstring

Transaction ID of cancelled receipt

Example:"er/232/f2"
gross_weightnumber

Gross weight of ordered products.

Example:0
custom_field_1string

Custom field 1

Example:"EU only"
custom_field_2string

Custom field 2

Example:"EU only"
custom_field_3string

Custom field 3

Example:"EU only"
custom_field_4string

Custom field 4

Example:"EU only"
custom_field_5string

Custom field 5

Example:"EU only"
custom_field_6string

Custom field 6

Example:"EU only"
custom_field_7string

Custom field 7

Example:"EU only"
custom_field_8string

Custom field 8

Example:"EU only"
custom_field_9string

Custom field 9

Example:"EU only"
custom_field_10string

Custom field 10

Example:"EU only"
custom_metric_1number

Custom metric 1

Example:1
custom_metric_2number

Custom metric 2

Example:100
custom_metric_3number

Custom metric 3

Example:2.2
custom_metric_4number

Custom metric 4

Example:1.05
custom_metric_5number

Custom metric 5

Example:10000
source_systemstring

Identifier of the source system this data is from. Needed when mapping between source system identifiers and master identifiers are used.

Example:"ABCDEF"
curl -i -X POST \
  'https://zapi-api.zoined.com/_mock/purchaseOrders?dryRun=false&separator=%3B&encoding=utf-8' \
  -H 'Authorization: Bearer <YOUR_token_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "transaction_id": "er/232/f31",
    "line_item_id": "1",
    "product_id": "XYZ",
    "organisation_id": "540",
    "department_id": "54011",
    "purchaser_id": "5400",
    "supplier_id": "221",
    "parent_product_id": "123",
    "order_date": "2016-01-01",
    "order_time": "15:00:00",
    "ordered_quantity": 2,
    "delivery_date": "2016-01-01",
    "delivery_time": "15:00:00",
    "delivered_quantity": 2,
    "arrival_date": "2016-01-03",
    "arrival_time": "15:00:00",
    "order_status": 1,
    "order_type": "Express",
    "purchase_price": 5,
    "purchase_price_wo_vat": 4,
    "rebate": 0,
    "rebate_wo_vat": 0,
    "retail_value": 10,
    "retail_value_wo_vat": 8,
    "purchase_currency": "EUR",
    "sales_unit": "KPL",
    "cancelled": false,
    "cancel_id": "er/232/f2",
    "gross_weight": 0,
    "custom_field_1": "EU only",
    "custom_field_2": "EU only",
    "custom_field_3": "EU only",
    "custom_field_4": "EU only",
    "custom_field_5": "EU only",
    "custom_field_6": "EU only",
    "custom_field_7": "EU only",
    "custom_field_8": "EU only",
    "custom_field_9": "EU only",
    "custom_field_10": "EU only",
    "custom_metric_1": 1,
    "custom_metric_2": 100,
    "custom_metric_3": 2.2,
    "custom_metric_4": 1.05,
    "custom_metric_5": 10000,
    "source_system": "ABCDEF"
  }'

Responses

Request has been processed successfully.

Headers

  • Content-Type: application/json
Bodyapplication/json
statusstringrequired

Status of the operation OK / Not OK

Example:"OK"
msgstringrequired

Message describing result of operation

Example:"1 entity added"
Response
{ "status": "OK", "msg": "1 entity added" }