Goto APIs

Purchase orders API

General:

Basics:

Base-URL: https://capi.lagerkoll.com/v1/purchase_orders/
Parameters in the url should all be encoded and all data sent should be UTF-8

MAX number of requests per minute is set to 200.
When the limit is hit an error with code 429 is returned, with the header "Retry-After" containing the number of seconds you have to wait for your next request.

Headers:

There are 2 ways to be authenticated when using this API. in both ways you add headers to the request.
1) Use an API-key together with store-id. This would be used when communicating machine to machine and no real person is involved. The API-key is available from where you activated the API. The store-id is also available in the same place.
2) Use a user_id and user_token together with a store-id. You get these values from the login-request. The values are connected to a person and are gained when an actual login to the system has been made.
store: <<STORE>>
user_id: <<USER_ID>>
user_token: <<USER_TOKEN>>
api_key: <<API_KEY>>
Accept: application/json
Content-Type: application/json

Errors:

Code Description
900001 Credentials don't match
900101 Common error
900429 Too many requests
901101 Error when getting purchase order
901102 Error when creating a purchase order
901103 Error when updating a purchase order
{
  "errorCode" : 900101,
  "errorMessage" : "Something went wrong on the server",
  "errorField" : null,
  "errorData" : null
}

Purchase orders API:

Delivery

Deliver article

POSTUrl: /{order_id}/deliver
Headers:
Accept: application/json or application/xml
Content-type: application/json or application/xml
Mark article as delivered for a purchase order. If article has already been delivered, the deliveryArticle-object will add to the already delivered amount
Body:

{ "deliveredAmount": "0", "batches": [{ "deliveredAmount": "1", "serialNr": "serialNr", "bestBefore": 7717, "batchId": "batchId", "barcode": "barcode" }], "id": 199 }
Successfull response:

{ "deliveredAmount": "0", "batches": [{ "deliveredAmount": "1", "serialNr": "serialNr", "bestBefore": 2559, "batchId": "batchId", "barcode": "barcode" }], "id": 3419 }

Deliver all articles

POSTUrl: /{order_id}/deliver_all
Headers:
Accept: application/json or application/xml
Content-type: application/json or application/xml
Mark all articles as delivered for a purchase order, with the ordered amount
Body:
Successfull response:

Deliver purchase order

PUTUrl: /{id}/deliver
Headers:
Accept: application/json or application/xml
Content-type: application/json or application/xml
Update purchase order state to delivered. If the order is Pick-n-pack the connected customer order is marked as delivered.

Valid parameters:

Parameter Description Default value Allowed values
delivered_date

Body:
Successfull response:

{ "paymentTermsDescription": "paymentTermsDescription", "deliveryPhone": "deliveryPhone", "supplierOrderId": "supplierOrderId", "supplierId": 6120, "productionOrderId": 7008, "deliveryTermsDescription": "deliveryTermsDescription", "customerOrderId": 4427, "contactPerson": "contactPerson", "deliveryZip": "deliveryZip", "productCount": 8017, "orderValue": 9868.56912208869, "confirmedDeliveryDate": 1721582812694, "externalInvoiceReference": "externalInvoiceReference", "orderValueCurrency": "orderValueCurrency", "deliveredDate": 1721582812694, "deliveryAddress": "deliveryAddress", "orderSentDate": 1721582812694, "deliveryContact": "deliveryContact", "id": 1855, "state": 8042, "deliveryDate": 1721582812694, "paymentTerms": "paymentTerms", "supplierName": "supplierName", "deliveryCity": "deliveryCity", "deliveryTerms": "deliveryTerms", "goodsMarking": "goodsMarking", "contactEmail": "contactEmail", "isPickNPack": "false", "deliveryAddress2": "deliveryAddress2", "orderValueStore": 309.6731931875363, "storeId": 3484, "deliveryCompany": "deliveryCompany", "message": "message", "deliveryCountry": "deliveryCountry", "comment": "comment", "articles": [{ "deliveredAmount": "0", "articleName": "articleName", "purchasePriceMisc": "0", "barcodeType": "EAN", "articleId": "articleId", "description": "description", "purchasePrice": "0", "units": [{ "unit": { "name": "name", "externalId": "externalId", "id": 5212 }, "articleId": "articleId", "storegroupId": 7202, "convert": 8287.898580174637, "barcode": "barcode" }], "type": "type", "batches": [{ "deliveredAmount": "1", "serialNr": "serialNr", "bestBefore": 8438, "batchId": "batchId", "orderedAmount": "1" }], "unit": "unit", "availableAmount": "0", "rate": 5071.995071051879, "supplierArticleId": "supplierArticleId", "purchasePriceShipment": "0", "id": 5145, "orderedAmount": "0", "stock": false, "barcode": "barcode", "orderedAmountWithUnits": "orderedAmountWithUnits", "stockWarning": "0" }], "poReference": "poReference" }

Print

Print purchase order verification

GETUrl: /{id}/verification/print
Headers:
Accept: application/pdf or application/json
Print a purchase order verification based on order id
Body:
Successfull response:

Print purchase order

GETUrl: /{id}/print
Headers:
Accept: application/pdf or application/json
Content-type: application/json or application/xml
Print purchase order
Body:
Successfull response:

Print labels

GETUrl: /{id}/print_labels
Headers:
Accept: application/pdf or application/json
Content-type: application/json or application/xml
Print purchase order labels

Valid parameters:

Parameter Description Default value Allowed values
ordered false

Body:
Successfull response:

Purchase orders

Get purchase order batch products

GETUrl: /{id}/products/{article_id}/batches
Headers:
Accept: application/json or application/xml
Get a list of all batches for a product in a purchase orders
Body:
Successfull response:

{ "deliveredAmount": "1", "serialNr": "serialNr", "bestBefore": 893, "batchId": "batchId", "orderedAmount": "1" }

Get purchase orders

GETUrl:
Headers:
Accept: application/json or application/xml
Get a list of purchase orders based on query

Valid parameters:

Parameter Description Default value Allowed values
supplier_id
query
state -1 -1,0,1,2,3,4
order asc asc,desc
sort_column po_ref id,po_ref,delivery_date,confirmed_delivery_date,delivered_date,supplier
page 0
limit 50

Body:
Successfull response:

{ "ordersCount": 2103, "pages": 7801, "pageSize": 2229, "orders": [{ "paymentTermsDescription": "paymentTermsDescription", "deliveryPhone": "deliveryPhone", "supplierOrderId": "supplierOrderId", "supplierId": 3519, "productionOrderId": 1253, "deliveryTermsDescription": "deliveryTermsDescription", "customerOrderId": 6955, "contactPerson": "contactPerson", "deliveryZip": "deliveryZip", "productCount": 2361, "orderValue": 1115.3460211393085, "confirmedDeliveryDate": 1721582812702, "externalInvoiceReference": "externalInvoiceReference", "orderValueCurrency": "orderValueCurrency", "deliveredDate": 1721582812702, "deliveryAddress": "deliveryAddress", "orderSentDate": 1721582812702, "deliveryContact": "deliveryContact", "id": 4888, "state": 9701, "deliveryDate": 1721582812702, "paymentTerms": "paymentTerms", "supplierName": "supplierName", "deliveryCity": "deliveryCity", "deliveryTerms": "deliveryTerms", "goodsMarking": "goodsMarking", "contactEmail": "contactEmail", "isPickNPack": "false", "deliveryAddress2": "deliveryAddress2", "orderValueStore": 7692.07699214767, "storeId": 6437, "deliveryCompany": "deliveryCompany", "message": "message", "deliveryCountry": "deliveryCountry", "comment": "comment", "articles": [{ "deliveredAmount": "0", "articleName": "articleName", "purchasePriceMisc": "0", "barcodeType": "EAN", "articleId": "articleId", "description": "description", "purchasePrice": "0", "units": [{ "unit": { "name": "name", "externalId": "externalId", "id": 8162 }, "articleId": "articleId", "storegroupId": 5442, "convert": 7574.586173519986, "barcode": "barcode" }], "type": "type", "batches": [{ "deliveredAmount": "1", "serialNr": "serialNr", "bestBefore": 967, "batchId": "batchId", "orderedAmount": "1" }], "unit": "unit", "availableAmount": "0", "rate": 5279.531806217613, "supplierArticleId": "supplierArticleId", "purchasePriceShipment": "0", "id": 2809, "orderedAmount": "0", "stock": true, "barcode": "barcode", "orderedAmountWithUnits": "orderedAmountWithUnits", "stockWarning": "0" }], "poReference": "poReference" }], "page": 8570 }

Get purchase orders with article

GETUrl: /article/{article_id : .+}
Headers:
Accept: application/json or application/xml
Get a list of purchase orders that contains a specific article. It´s also possible to filter article on batch or serialnumber

Valid parameters:

Parameter Description Default value Allowed values
batch
serialnumber
max_state
order asc asc,desc
sort_column id id,po_ref,delivery_date,confirmed_delivery_date,delivered_date,supplier,state
page 0
limit 50

Body:
Successfull response:

{ "ordersCount": 6105, "pages": 3443, "pageSize": 3089, "orders": [{ "paymentTermsDescription": "paymentTermsDescription", "deliveryPhone": "deliveryPhone", "supplierOrderId": "supplierOrderId", "supplierId": 7978, "productionOrderId": 7529, "deliveryTermsDescription": "deliveryTermsDescription", "customerOrderId": 4003, "contactPerson": "contactPerson", "deliveryZip": "deliveryZip", "productCount": 4520, "orderValue": 3728.211255163918, "confirmedDeliveryDate": 1721582812712, "externalInvoiceReference": "externalInvoiceReference", "orderValueCurrency": "orderValueCurrency", "deliveredDate": 1721582812712, "deliveryAddress": "deliveryAddress", "orderSentDate": 1721582812712, "deliveryContact": "deliveryContact", "id": 2634, "state": 923, "deliveryDate": 1721582812712, "paymentTerms": "paymentTerms", "supplierName": "supplierName", "deliveryCity": "deliveryCity", "deliveryTerms": "deliveryTerms", "goodsMarking": "goodsMarking", "contactEmail": "contactEmail", "isPickNPack": "false", "deliveryAddress2": "deliveryAddress2", "orderValueStore": 1387.6036322813122, "storeId": 950, "deliveryCompany": "deliveryCompany", "message": "message", "deliveryCountry": "deliveryCountry", "comment": "comment", "articles": [{ "deliveredAmount": "0", "articleName": "articleName", "purchasePriceMisc": "0", "barcodeType": "EAN", "articleId": "articleId", "description": "description", "purchasePrice": "0", "units": [{ "unit": { "name": "name", "externalId": "externalId", "id": 8729 }, "articleId": "articleId", "storegroupId": 3989, "convert": 6112.700155801285, "barcode": "barcode" }], "type": "type", "batches": [{ "deliveredAmount": "1", "serialNr": "serialNr", "bestBefore": 3611, "batchId": "batchId", "orderedAmount": "1" }], "unit": "unit", "availableAmount": "0", "rate": 458.48116518416913, "supplierArticleId": "supplierArticleId", "purchasePriceShipment": "0", "id": 3408, "orderedAmount": "0", "stock": true, "barcode": "barcode", "orderedAmountWithUnits": "orderedAmountWithUnits", "stockWarning": "0" }], "poReference": "poReference" }], "page": 3456 }

Get last delivered purchase orders for article

GETUrl: /article/{article_id : .+}/last_delivered
Headers:
Accept: application/json or application/xml
Get last delivered purchase orders for article
Body:
Successfull response:

{ "ordersCount": 7070, "pages": 3093, "pageSize": 9272, "orders": [{ "paymentTermsDescription": "paymentTermsDescription", "deliveryPhone": "deliveryPhone", "supplierOrderId": "supplierOrderId", "supplierId": 6341, "productionOrderId": 4467, "deliveryTermsDescription": "deliveryTermsDescription", "customerOrderId": 9568, "contactPerson": "contactPerson", "deliveryZip": "deliveryZip", "productCount": 1053, "orderValue": 7165.115764394768, "confirmedDeliveryDate": 1721582812713, "externalInvoiceReference": "externalInvoiceReference", "orderValueCurrency": "orderValueCurrency", "deliveredDate": 1721582812713, "deliveryAddress": "deliveryAddress", "orderSentDate": 1721582812713, "deliveryContact": "deliveryContact", "id": 443, "state": 2731, "deliveryDate": 1721582812713, "paymentTerms": "paymentTerms", "supplierName": "supplierName", "deliveryCity": "deliveryCity", "deliveryTerms": "deliveryTerms", "goodsMarking": "goodsMarking", "contactEmail": "contactEmail", "isPickNPack": "false", "deliveryAddress2": "deliveryAddress2", "orderValueStore": 1763.7060970829766, "storeId": 5706, "deliveryCompany": "deliveryCompany", "message": "message", "deliveryCountry": "deliveryCountry", "comment": "comment", "articles": [{ "deliveredAmount": "0", "articleName": "articleName", "purchasePriceMisc": "0", "barcodeType": "EAN", "articleId": "articleId", "description": "description", "purchasePrice": "0", "units": [{ "unit": { "name": "name", "externalId": "externalId", "id": 1256 }, "articleId": "articleId", "storegroupId": 4161, "convert": 2464.094132685555, "barcode": "barcode" }], "type": "type", "batches": [{ "deliveredAmount": "1", "serialNr": "serialNr", "bestBefore": 4556, "batchId": "batchId", "orderedAmount": "1" }], "unit": "unit", "availableAmount": "0", "rate": 7763.620969426951, "supplierArticleId": "supplierArticleId", "purchasePriceShipment": "0", "id": 1358, "orderedAmount": "0", "stock": false, "barcode": "barcode", "orderedAmountWithUnits": "orderedAmountWithUnits", "stockWarning": "0" }], "poReference": "poReference" }], "page": 6037 }

Get purchase orders based on state

GETUrl: /state/{state}
Headers:
Accept: application/json or application/xml
Get a list of purchase orders based on state

Valid parameters:

Parameter Description Default value Allowed values
supplier_id
order asc asc,desc
sort_column po_ref id,po_ref,delivery_date,confirmed_delivery_date,delivered_date,supplier
page 0
limit 50

Body:
Successfull response:

{ "ordersCount": 3514, "pages": 7205, "pageSize": 3860, "orders": [{ "paymentTermsDescription": "paymentTermsDescription", "deliveryPhone": "deliveryPhone", "supplierOrderId": "supplierOrderId", "supplierId": 618, "productionOrderId": 3949, "deliveryTermsDescription": "deliveryTermsDescription", "customerOrderId": 6237, "contactPerson": "contactPerson", "deliveryZip": "deliveryZip", "productCount": 5769, "orderValue": 283.5742274703523, "confirmedDeliveryDate": 1721582812714, "externalInvoiceReference": "externalInvoiceReference", "orderValueCurrency": "orderValueCurrency", "deliveredDate": 1721582812714, "deliveryAddress": "deliveryAddress", "orderSentDate": 1721582812714, "deliveryContact": "deliveryContact", "id": 2903, "state": 1684, "deliveryDate": 1721582812714, "paymentTerms": "paymentTerms", "supplierName": "supplierName", "deliveryCity": "deliveryCity", "deliveryTerms": "deliveryTerms", "goodsMarking": "goodsMarking", "contactEmail": "contactEmail", "isPickNPack": "false", "deliveryAddress2": "deliveryAddress2", "orderValueStore": 496.6790162601842, "storeId": 1170, "deliveryCompany": "deliveryCompany", "message": "message", "deliveryCountry": "deliveryCountry", "comment": "comment", "articles": [{ "deliveredAmount": "0", "articleName": "articleName", "purchasePriceMisc": "0", "barcodeType": "EAN", "articleId": "articleId", "description": "description", "purchasePrice": "0", "units": [{ "unit": { "name": "name", "externalId": "externalId", "id": 4302 }, "articleId": "articleId", "storegroupId": 3308, "convert": 2274.422392839951, "barcode": "barcode" }], "type": "type", "batches": [{ "deliveredAmount": "1", "serialNr": "serialNr", "bestBefore": 7732, "batchId": "batchId", "orderedAmount": "1" }], "unit": "unit", "availableAmount": "0", "rate": 9729.148295507317, "supplierArticleId": "supplierArticleId", "purchasePriceShipment": "0", "id": 5493, "orderedAmount": "0", "stock": false, "barcode": "barcode", "orderedAmountWithUnits": "orderedAmountWithUnits", "stockWarning": "0" }], "poReference": "poReference" }], "page": 1868 }

Get purchase order

GETUrl: /{id}
Headers:
Accept: application/json or application/xml
Get a single purchase orders based on order id
Body:
Successfull response:

{ "ordersCount": 832, "pages": 6870, "pageSize": 2726, "orders": [{ "paymentTermsDescription": "paymentTermsDescription", "deliveryPhone": "deliveryPhone", "supplierOrderId": "supplierOrderId", "supplierId": 6927, "productionOrderId": 4818, "deliveryTermsDescription": "deliveryTermsDescription", "customerOrderId": 3453, "contactPerson": "contactPerson", "deliveryZip": "deliveryZip", "productCount": 78, "orderValue": 9226.274511995774, "confirmedDeliveryDate": 1721582812714, "externalInvoiceReference": "externalInvoiceReference", "orderValueCurrency": "orderValueCurrency", "deliveredDate": 1721582812714, "deliveryAddress": "deliveryAddress", "orderSentDate": 1721582812714, "deliveryContact": "deliveryContact", "id": 6002, "state": 2240, "deliveryDate": 1721582812714, "paymentTerms": "paymentTerms", "supplierName": "supplierName", "deliveryCity": "deliveryCity", "deliveryTerms": "deliveryTerms", "goodsMarking": "goodsMarking", "contactEmail": "contactEmail", "isPickNPack": "false", "deliveryAddress2": "deliveryAddress2", "orderValueStore": 1884.1529128274415, "storeId": 9171, "deliveryCompany": "deliveryCompany", "message": "message", "deliveryCountry": "deliveryCountry", "comment": "comment", "articles": [{ "deliveredAmount": "0", "articleName": "articleName", "purchasePriceMisc": "0", "barcodeType": "EAN", "articleId": "articleId", "description": "description", "purchasePrice": "0", "units": [{ "unit": { "name": "name", "externalId": "externalId", "id": 5244 }, "articleId": "articleId", "storegroupId": 9874, "convert": 2998.011654060152, "barcode": "barcode" }], "type": "type", "batches": [{ "deliveredAmount": "1", "serialNr": "serialNr", "bestBefore": 4005, "batchId": "batchId", "orderedAmount": "1" }], "unit": "unit", "availableAmount": "0", "rate": 7880.559502878645, "supplierArticleId": "supplierArticleId", "purchasePriceShipment": "0", "id": 2365, "orderedAmount": "0", "stock": false, "barcode": "barcode", "orderedAmountWithUnits": "orderedAmountWithUnits", "stockWarning": "0" }], "poReference": "poReference" }], "page": 8448 }

Get dropshipment order for supplier

GETUrl: /dropshipment/{customer_order_id}/supplier/{supplier_id}
Headers:
Accept: application/json or application/xml
Get a dropshipment order for a customer order and supplier
Body:
Successfull response:

{ "ordersCount": 3180, "pages": 400, "pageSize": 6872, "orders": [{ "paymentTermsDescription": "paymentTermsDescription", "deliveryPhone": "deliveryPhone", "supplierOrderId": "supplierOrderId", "supplierId": 7089, "productionOrderId": 2424, "deliveryTermsDescription": "deliveryTermsDescription", "customerOrderId": 4175, "contactPerson": "contactPerson", "deliveryZip": "deliveryZip", "productCount": 7415, "orderValue": 7793.636949204685, "confirmedDeliveryDate": 1721582812723, "externalInvoiceReference": "externalInvoiceReference", "orderValueCurrency": "orderValueCurrency", "deliveredDate": 1721582812723, "deliveryAddress": "deliveryAddress", "orderSentDate": 1721582812723, "deliveryContact": "deliveryContact", "id": 991, "state": 8475, "deliveryDate": 1721582812723, "paymentTerms": "paymentTerms", "supplierName": "supplierName", "deliveryCity": "deliveryCity", "deliveryTerms": "deliveryTerms", "goodsMarking": "goodsMarking", "contactEmail": "contactEmail", "isPickNPack": "false", "deliveryAddress2": "deliveryAddress2", "orderValueStore": 2593.3537944615828, "storeId": 7524, "deliveryCompany": "deliveryCompany", "message": "message", "deliveryCountry": "deliveryCountry", "comment": "comment", "articles": [{ "deliveredAmount": "0", "articleName": "articleName", "purchasePriceMisc": "0", "barcodeType": "EAN", "articleId": "articleId", "description": "description", "purchasePrice": "0", "units": [{ "unit": { "name": "name", "externalId": "externalId", "id": 9332 }, "articleId": "articleId", "storegroupId": 2088, "convert": 8005.79128354159, "barcode": "barcode" }], "type": "type", "batches": [{ "deliveredAmount": "1", "serialNr": "serialNr", "bestBefore": 1105, "batchId": "batchId", "orderedAmount": "1" }], "unit": "unit", "availableAmount": "0", "rate": 4470.600984043156, "supplierArticleId": "supplierArticleId", "purchasePriceShipment": "0", "id": 7228, "orderedAmount": "0", "stock": false, "barcode": "barcode", "orderedAmountWithUnits": "orderedAmountWithUnits", "stockWarning": "0" }], "poReference": "poReference" }], "page": 9769 }

Get dropshipment orders for customer order

GETUrl: /dropshipment/{customer_order_id}
Headers:
Accept: application/json or application/xml
Get dropshipment orders for a customer order
Body:
Successfull response:

{ "ordersCount": 5703, "pages": 7025, "pageSize": 91, "orders": [{ "paymentTermsDescription": "paymentTermsDescription", "deliveryPhone": "deliveryPhone", "supplierOrderId": "supplierOrderId", "supplierId": 7695, "productionOrderId": 8687, "deliveryTermsDescription": "deliveryTermsDescription", "customerOrderId": 230, "contactPerson": "contactPerson", "deliveryZip": "deliveryZip", "productCount": 7656, "orderValue": 7824.815494453223, "confirmedDeliveryDate": 1721582812723, "externalInvoiceReference": "externalInvoiceReference", "orderValueCurrency": "orderValueCurrency", "deliveredDate": 1721582812723, "deliveryAddress": "deliveryAddress", "orderSentDate": 1721582812723, "deliveryContact": "deliveryContact", "id": 503, "state": 1699, "deliveryDate": 1721582812723, "paymentTerms": "paymentTerms", "supplierName": "supplierName", "deliveryCity": "deliveryCity", "deliveryTerms": "deliveryTerms", "goodsMarking": "goodsMarking", "contactEmail": "contactEmail", "isPickNPack": "false", "deliveryAddress2": "deliveryAddress2", "orderValueStore": 3902.008519101964, "storeId": 2775, "deliveryCompany": "deliveryCompany", "message": "message", "deliveryCountry": "deliveryCountry", "comment": "comment", "articles": [{ "deliveredAmount": "0", "articleName": "articleName", "purchasePriceMisc": "0", "barcodeType": "EAN", "articleId": "articleId", "description": "description", "purchasePrice": "0", "units": [{ "unit": { "name": "name", "externalId": "externalId", "id": 4348 }, "articleId": "articleId", "storegroupId": 1481, "convert": 8063.114773555865, "barcode": "barcode" }], "type": "type", "batches": [{ "deliveredAmount": "1", "serialNr": "serialNr", "bestBefore": 7133, "batchId": "batchId", "orderedAmount": "1" }], "unit": "unit", "availableAmount": "0", "rate": 5269.419010825562, "supplierArticleId": "supplierArticleId", "purchasePriceShipment": "0", "id": 7926, "orderedAmount": "0", "stock": false, "barcode": "barcode", "orderedAmountWithUnits": "orderedAmountWithUnits", "stockWarning": "0" }], "poReference": "poReference" }], "page": 837 }

Get purchase order products

GETUrl: /{id}/products
Headers:
Accept: application/json or application/xml
Get a list of all products in a purchase orders with detailed information

Valid parameters:

Parameter Description Default value Allowed values
query
page 0
limit 25
order desc asc,desc
sort_column query query,art,name,bundled,cat,unit,stock_place,stock_place_article,desc,price,order,warning_order,stock,reserved,supplier,is_stock,type,status,active

Body:
Successfull response:

{ "pages": 9117, "pageSize": 7398, "page": 2932, "articlesCount": 9598, "articles": [{ "supplierAutomaticOrder": false, "supplierBuyPriceMisc": 389.5644418676858, "supplierExternalId": "supplierExternalId", "type": "type", "price": 5080.8585517316205, "supplier": 5360, "supplierArticleId": "supplierArticleId", "vatAccount": 1430, "links": [{ "name": "name", "type": "type", "url": "url" }], "stock": "true", "barcode": "barcode", "height": 6263.23351573445, "bundled": "false", "vat": 8164.233139448833, "nextDeliveryDate": 8736, "active": "true", "weight": 8874.888455887614, "tags": [{ "name": "name", "externalId": "externalId", "id": 1021, "desc": "desc" }], "supplierBuyRate": 7437.346755540464, "unit": "st", "reserved": 3765.260537301002, "name": "name", "parts": [{ "buyPrice": 1291.0738919427113, "supplierName": "supplierName", "amount": 982.2012270489555, "articleName": "articleName", "supplierId": 9603, "unitName": "unitName", "articleId": "articleId", "externalId": "externalId", "stockPlace": "stockPlace", "type": "type", "buyPriceCurrency": "buyPriceCurrency", "reserved": 5120.287858358915, "buyPriceShipment": 2263.2230219680414, "buyPriceMisc": 8202.222872294271, "supplierArticleId": "supplierArticleId", "stock": 7602.896925704819, "isStock": false, "stockWarning": 6461.654414383777 }], "supplierBuyPriceShipment": 1990.8761333128966, "manufacturerArticleId": "manufacturerArticleId", "imageLastUpdated": 8598, "orderedAmount": 8.771457804788163, "stockWarning": 756.2469353344392, "customFields": [{ "name": "name", "type": "type", "validValues": [{ "description": "description", "value": "value" }], "value": "value" }], "barcodeType": "EAN", "description": "description", "stockPlace": "stockPlace", "criticalLevel": 5256.937488715755, "manufacturer": "manufacturer", "batches": { "totalSerialNumbersReserved": 7809.070072396794, "batches": [{ "serialNr": "serialNr", "amount": "1", "articleName": "articleName", "reserved": 4594.300306910871, "bestBefore": 5385, "articleId": "articleId", "batchId": "batchId", "barcode": "barcode" }], "totalBatchesInStock": 1116.0743712790488, "totalSerialNumbersInStock": 8648.400446866573, "serialNumbers": [{ "serialNr": "serialNr", "amount": "1", "articleName": "articleName", "reserved": 3886.482545570057, "bestBefore": 4279, "articleId": "articleId", "batchId": "batchId", "barcode": "barcode" }], "totalBatchesReserved": 72.5272887080508, "totalBatches": 7801, "totalSerialNumbers": 8615 }, "webshopArticle": "false", "availableAmount": 213.72808379754082, "orderLevel": 591.401936768744, "prices": [{ "listId": 6324, "price": "0", "articleId": "articleId", "fromQuantity": "0", "listExternalId": "listExternalId" }], "supplierArticles": [{ "supplierName": "supplierName", "supplierAutomaticOrder": true, "supplierBuyPriceMisc": 5129.98788092134, "supplierBuyRate": "1.0", "supplierBuyPrice": 563.0244082963842, "supplier": 9398, "supplierArticleId": "supplierArticleId", "supplierBuyCurrency": "Store currency", "supplierBuyPriceShipment": 6643.643410868239 }], "automaticOrder": true, "supplierName": "supplierName", "deliveredAmount": 2070.1818668589954, "amount": 9055.828780243213, "articleId": "articleId", "externalId": "externalId", "depth": 2022.781171786543, "supplierBuyPrice": 7687.6621958774085, "supplierBuyCurrency": "supplierBuyCurrency", "width": 7226.603325349773, "category": "övrigt" }], "since": 204 }

Get open purchase order articles

GETUrl: /open/products
Headers:
Accept: application/json or application/xml
Get articles for open purchase order. The open purchase order is not connected to a specific supplier and cannot be closed. It´s just a container for articles that should later be ordered

Valid parameters:

Parameter Description Default value Allowed values
order asc asc,desc
sort_column art id,po_ref,delivery_date,confirmed_delivery_date,delivered_date,supplier
page 0
limit 20

Body:
Successfull response:

{ "pages": 5209, "pageSize": 8135, "page": 7840, "articlesCount": 1014, "articles": [{ "supplierName": "supplierName", "articleName": "articleName", "supplierId": 8771, "shipmentPrice": 3632.410997732741, "bundled": false, "articleId": "articleId", "miscPrice": 4179.988725193161, "purchasePrice": 1472.9885566009593, "partAmount": 2591.571601330308, "rate": 3390.4056591504827, "bundleParts": [{ "supplierName": "supplierName", "articleName": "articleName", "supplierId": 525, "shipmentPrice": 463.7673835860656, "bundled": true, "articleId": "articleId", "miscPrice": 395.90984707110977, "purchasePrice": 3580.289765699841, "partAmount": 6192.438333424348, "rate": 6250.074408832879, "bundleParts": [{ "supplierName": "supplierName", "articleName": "articleName", "supplierId": 1410, "shipmentPrice": 7851.988162703852, "bundled": true, "articleId": "articleId", "miscPrice": 4071.796596334376, "purchasePrice": 3307.2623214460364, "partAmount": 6083.267885773959, "rate": 5347.923206592976, "bundleParts": [], "currency": "currency", "orders": [], "orderedAmount": 4905.344617683299 }], "currency": "currency", "orders": [{ "id": 3728, "poReference": "poReference" }], "orderedAmount": 780.5934716833085 }], "currency": "currency", "orders": [{ "id": 5759, "poReference": "poReference" }], "orderedAmount": 6564.556031589249 }] }

Get purchase order by po-ref

GETUrl: /po_ref/{po_ref}
Headers:
Accept: application/json or application/xml
Get a single purchase order based on po-ref
Body:
Successfull response:

{ "ordersCount": 5911, "pages": 2385, "pageSize": 1124, "orders": [{ "paymentTermsDescription": "paymentTermsDescription", "deliveryPhone": "deliveryPhone", "supplierOrderId": "supplierOrderId", "supplierId": 1947, "productionOrderId": 8253, "deliveryTermsDescription": "deliveryTermsDescription", "customerOrderId": 8712, "contactPerson": "contactPerson", "deliveryZip": "deliveryZip", "productCount": 6216, "orderValue": 9336.742729985968, "confirmedDeliveryDate": 1721582812734, "externalInvoiceReference": "externalInvoiceReference", "orderValueCurrency": "orderValueCurrency", "deliveredDate": 1721582812734, "deliveryAddress": "deliveryAddress", "orderSentDate": 1721582812734, "deliveryContact": "deliveryContact", "id": 788, "state": 9200, "deliveryDate": 1721582812734, "paymentTerms": "paymentTerms", "supplierName": "supplierName", "deliveryCity": "deliveryCity", "deliveryTerms": "deliveryTerms", "goodsMarking": "goodsMarking", "contactEmail": "contactEmail", "isPickNPack": "false", "deliveryAddress2": "deliveryAddress2", "orderValueStore": 3043.015984617348, "storeId": 9639, "deliveryCompany": "deliveryCompany", "message": "message", "deliveryCountry": "deliveryCountry", "comment": "comment", "articles": [{ "deliveredAmount": "0", "articleName": "articleName", "purchasePriceMisc": "0", "barcodeType": "EAN", "articleId": "articleId", "description": "description", "purchasePrice": "0", "units": [{ "unit": { "name": "name", "externalId": "externalId", "id": 9797 }, "articleId": "articleId", "storegroupId": 3651, "convert": 8260.229922891323, "barcode": "barcode" }], "type": "type", "batches": [{ "deliveredAmount": "1", "serialNr": "serialNr", "bestBefore": 1011, "batchId": "batchId", "orderedAmount": "1" }], "unit": "unit", "availableAmount": "0", "rate": 3654.729030367423, "supplierArticleId": "supplierArticleId", "purchasePriceShipment": "0", "id": 4880, "orderedAmount": "0", "stock": false, "barcode": "barcode", "orderedAmountWithUnits": "orderedAmountWithUnits", "stockWarning": "0" }], "poReference": "poReference" }], "page": 3928 }

Get available po-ref

GETUrl: /po_ref/next_id
Headers:
Accept: application/json or application/xml
Get next available po-ref that can be used when creating a new purchase order
Body:
Successfull response:

{"poReference": "poReference"}

Get order value based on state and query

GETUrl: /state/{state}/order_value
Headers:
Accept: application/json or application/xml
Get total order value based on state and query

Valid parameters:

Parameter Description Default value Allowed values
supplier_id
query

Body:
Successfull response:

{ "ordersCount": 8344, "pages": 9777, "pageSize": 3764, "orders": [{ "paymentTermsDescription": "paymentTermsDescription", "deliveryPhone": "deliveryPhone", "supplierOrderId": "supplierOrderId", "supplierId": 4807, "productionOrderId": 4046, "deliveryTermsDescription": "deliveryTermsDescription", "customerOrderId": 8029, "contactPerson": "contactPerson", "deliveryZip": "deliveryZip", "productCount": 5334, "orderValue": 4876.4363758833015, "confirmedDeliveryDate": 1721582812735, "externalInvoiceReference": "externalInvoiceReference", "orderValueCurrency": "orderValueCurrency", "deliveredDate": 1721582812735, "deliveryAddress": "deliveryAddress", "orderSentDate": 1721582812735, "deliveryContact": "deliveryContact", "id": 5250, "state": 7784, "deliveryDate": 1721582812735, "paymentTerms": "paymentTerms", "supplierName": "supplierName", "deliveryCity": "deliveryCity", "deliveryTerms": "deliveryTerms", "goodsMarking": "goodsMarking", "contactEmail": "contactEmail", "isPickNPack": "false", "deliveryAddress2": "deliveryAddress2", "orderValueStore": 1094.1967183496758, "storeId": 8791, "deliveryCompany": "deliveryCompany", "message": "message", "deliveryCountry": "deliveryCountry", "comment": "comment", "articles": [{ "deliveredAmount": "0", "articleName": "articleName", "purchasePriceMisc": "0", "barcodeType": "EAN", "articleId": "articleId", "description": "description", "purchasePrice": "0", "units": [{ "unit": { "name": "name", "externalId": "externalId", "id": 2538 }, "articleId": "articleId", "storegroupId": 4984, "convert": 6995.390440974688, "barcode": "barcode" }], "type": "type", "batches": [{ "deliveredAmount": "1", "serialNr": "serialNr", "bestBefore": 7782, "batchId": "batchId", "orderedAmount": "1" }], "unit": "unit", "availableAmount": "0", "rate": 2669.69899576165, "supplierArticleId": "supplierArticleId", "purchasePriceShipment": "0", "id": 7115, "orderedAmount": "0", "stock": true, "barcode": "barcode", "orderedAmountWithUnits": "orderedAmountWithUnits", "stockWarning": "0" }], "poReference": "poReference" }], "page": 5430 }

Get ordered articles

GETUrl: /ordered_articles
Headers:
Accept: application/json or application/xml
Get ordered articles for store

Valid parameters:

Parameter Description Default value Allowed values
order asc asc,desc
sort_column name art, name, bundled, cat, desc, order, state
page 0
limit 50

Body:
Successfull response:

{ "pages": 1619, "pageSize": 8086, "page": 1401, "articlesCount": 4769, "articles": [{ "orderId": 9406, "state": 5580, "article": { "supplierAutomaticOrder": true, "supplierBuyPriceMisc": 2930.863764261734, "supplierExternalId": "supplierExternalId", "type": "type", "price": 5274.908541793751, "supplier": 742, "supplierArticleId": "supplierArticleId", "vatAccount": 8287, "links": [{ "name": "name", "type": "type", "url": "url" }], "stock": "true", "barcode": "barcode", "height": 8837.895742461074, "bundled": "false", "vat": 5435.091035741596, "nextDeliveryDate": 1055, "active": "true", "weight": 6268.938291625245, "tags": [{ "name": "name", "externalId": "externalId", "id": 7572, "desc": "desc" }], "supplierBuyRate": 7922.797225871059, "unit": "st", "reserved": 840.1628055394716, "name": "name", "parts": [{ "buyPrice": 8741.453115665989, "supplierName": "supplierName", "amount": 7936.645755410357, "articleName": "articleName", "supplierId": 8882, "unitName": "unitName", "articleId": "articleId", "externalId": "externalId", "stockPlace": "stockPlace", "type": "type", "buyPriceCurrency": "buyPriceCurrency", "reserved": 6470.246417406339, "buyPriceShipment": 3512.584570637174, "buyPriceMisc": 714.8156922352167, "supplierArticleId": "supplierArticleId", "stock": 4421.646648760294, "isStock": true, "stockWarning": 7730.173185358935 }], "supplierBuyPriceShipment": 3914.3277632860963, "manufacturerArticleId": "manufacturerArticleId", "imageLastUpdated": 3329, "orderedAmount": 6515.4712121728135, "stockWarning": 3892.345144061409, "customFields": [{ "name": "name", "type": "type", "validValues": [{ "description": "description", "value": "value" }], "value": "value" }], "barcodeType": "EAN", "description": "description", "stockPlace": "stockPlace", "criticalLevel": 7113.257745532379, "manufacturer": "manufacturer", "batches": { "totalSerialNumbersReserved": 5001.297942165958, "batches": [{ "serialNr": "serialNr", "amount": "1", "articleName": "articleName", "reserved": 4003.514150889611, "bestBefore": 9495, "articleId": "articleId", "batchId": "batchId", "barcode": "barcode" }], "totalBatchesInStock": 4845.33443590082, "totalSerialNumbersInStock": 3493.0923893585586, "serialNumbers": [{ "serialNr": "serialNr", "amount": "1", "articleName": "articleName", "reserved": 1475.0879771452373, "bestBefore": 9775, "articleId": "articleId", "batchId": "batchId", "barcode": "barcode" }], "totalBatchesReserved": 9005.260875196469, "totalBatches": 2477, "totalSerialNumbers": 3682 }, "webshopArticle": "false", "availableAmount": 4311.112885787802, "orderLevel": 3346.005436398255, "prices": [{ "listId": 1872, "price": "0", "articleId": "articleId", "fromQuantity": "0", "listExternalId": "listExternalId" }], "supplierArticles": [{ "supplierName": "supplierName", "supplierAutomaticOrder": true, "supplierBuyPriceMisc": 2506.1511391377967, "supplierBuyRate": "1.0", "supplierBuyPrice": 1917.5430542796867, "supplier": 4956, "supplierArticleId": "supplierArticleId", "supplierBuyCurrency": "Store currency", "supplierBuyPriceShipment": 7011.784000496456 }], "automaticOrder": false, "supplierName": "supplierName", "deliveredAmount": 5361.509063367232, "amount": 1962.587690006261, "articleId": "articleId", "externalId": "externalId", "depth": 2111.251439949999, "supplierBuyPrice": 8056.121102234019, "supplierBuyCurrency": "supplierBuyCurrency", "width": 7725.564700077658, "category": "övrigt" }, "poReference": "poReference" }], "since": 8693 }

Get warned articles

GETUrl: /warned_articles
Headers:
Accept: application/json or application/xml
Get warned articles for store

Valid parameters:

Parameter Description Default value Allowed values
order asc asc,desc
sort_column name art, name, bundled, cat, desc, supplier, order, state
page 0
limit 50
include_ordered true

Body:
Successfull response:

{ "pages": 8013, "pageSize": 4146, "page": 8510, "articlesCount": 8633, "articles": [{ "orderId": 8881, "state": 7420, "article": { "supplierAutomaticOrder": true, "supplierBuyPriceMisc": 5816.700851468859, "supplierExternalId": "supplierExternalId", "type": "type", "price": 4821.216994877977, "supplier": 6914, "supplierArticleId": "supplierArticleId", "vatAccount": 1956, "links": [{ "name": "name", "type": "type", "url": "url" }], "stock": "true", "barcode": "barcode", "height": 4761.632855749162, "bundled": "false", "vat": 4001.120408723069, "nextDeliveryDate": 3339, "active": "true", "weight": 8474.549339468263, "tags": [{ "name": "name", "externalId": "externalId", "id": 7810, "desc": "desc" }], "supplierBuyRate": 6156.922623171609, "unit": "st", "reserved": 2552.261633496025, "name": "name", "parts": [{ "buyPrice": 2367.3777157518416, "supplierName": "supplierName", "amount": 4381.335679522011, "articleName": "articleName", "supplierId": 6525, "unitName": "unitName", "articleId": "articleId", "externalId": "externalId", "stockPlace": "stockPlace", "type": "type", "buyPriceCurrency": "buyPriceCurrency", "reserved": 8962.337759540183, "buyPriceShipment": 1552.795451351422, "buyPriceMisc": 252.11036492298723, "supplierArticleId": "supplierArticleId", "stock": 6935.028318829021, "isStock": false, "stockWarning": 3148.8404757327403 }], "supplierBuyPriceShipment": 1852.232998102923, "manufacturerArticleId": "manufacturerArticleId", "imageLastUpdated": 8521, "orderedAmount": 3159.7682905184774, "stockWarning": 5210.563183813427, "customFields": [{ "name": "name", "type": "type", "validValues": [{ "description": "description", "value": "value" }], "value": "value" }], "barcodeType": "EAN", "description": "description", "stockPlace": "stockPlace", "criticalLevel": 5687.984355568844, "manufacturer": "manufacturer", "batches": { "totalSerialNumbersReserved": 685.254554046526, "batches": [{ "serialNr": "serialNr", "amount": "1", "articleName": "articleName", "reserved": 3778.7235725851087, "bestBefore": 3857, "articleId": "articleId", "batchId": "batchId", "barcode": "barcode" }], "totalBatchesInStock": 9898.172962906723, "totalSerialNumbersInStock": 8481.728307466008, "serialNumbers": [{ "serialNr": "serialNr", "amount": "1", "articleName": "articleName", "reserved": 8598.988421822132, "bestBefore": 7002, "articleId": "articleId", "batchId": "batchId", "barcode": "barcode" }], "totalBatchesReserved": 8194.604840853106, "totalBatches": 5681, "totalSerialNumbers": 9341 }, "webshopArticle": "false", "availableAmount": 3081.7882402009986, "orderLevel": 7039.107010711338, "prices": [{ "listId": 8286, "price": "0", "articleId": "articleId", "fromQuantity": "0", "listExternalId": "listExternalId" }], "supplierArticles": [{ "supplierName": "supplierName", "supplierAutomaticOrder": true, "supplierBuyPriceMisc": 998.9003398753371, "supplierBuyRate": "1.0", "supplierBuyPrice": 9628.555785143746, "supplier": 128, "supplierArticleId": "supplierArticleId", "supplierBuyCurrency": "Store currency", "supplierBuyPriceShipment": 2026.5482115720545 }], "automaticOrder": false, "supplierName": "supplierName", "deliveredAmount": 1941.1124570735071, "amount": 851.8342088507947, "articleId": "articleId", "externalId": "externalId", "depth": 3151.2958736062924, "supplierBuyPrice": 3998.7464201838707, "supplierBuyCurrency": "supplierBuyCurrency", "width": 9405.64147764072, "category": "övrigt" }, "poReference": "poReference" }], "since": 310 }

Add purchase order

POSTUrl:
Headers:
Accept: application/json or application/xml
Content-type: application/json or application/xml
Add a new purchase order
Body:

{ "deliveryPhone": "deliveryPhone", "supplierOrderId": "supplierOrderId", "supplierId": 966, "productionOrderId": 750, "customerOrderId": 534, "contactPerson": "contactPerson", "deliveryZip": "deliveryZip", "confirmedDeliveryDate": 1721582812760, "externalInvoiceReference": "externalInvoiceReference", "deliveryAddress": "deliveryAddress", "deliveryContact": "deliveryContact", "state": 7921, "deliveryDate": 1721582812760, "paymentTerms": "paymentTerms", "deliveryCity": "deliveryCity", "deliveryTerms": "deliveryTerms", "goodsMarking": "goodsMarking", "contactEmail": "contactEmail", "isPickNPack": "false", "deliveryAddress2": "deliveryAddress2", "deliveryCompany": "deliveryCompany", "message": "message", "deliveryCountry": "deliveryCountry", "comment": "comment", "articles": [{ "deliveredAmount": "0", "batches": [{ "deliveredAmount": "1", "serialNr": "serialNr", "bestBefore": 5256, "batchId": "batchId", "orderedAmount": "1" }], "articleName": "articleName", "purchasePriceMisc": "0", "articleId": "articleId", "supplierArticleId": "supplierArticleId", "purchasePriceShipment": "0", "description": "description", "purchasePrice": "0", "orderedAmount": "0" }], "poReference": "poReference" }
Successfull response:

{ "paymentTermsDescription": "paymentTermsDescription", "deliveryPhone": "deliveryPhone", "supplierOrderId": "supplierOrderId", "supplierId": 9778, "productionOrderId": 8513, "deliveryTermsDescription": "deliveryTermsDescription", "customerOrderId": 9864, "contactPerson": "contactPerson", "deliveryZip": "deliveryZip", "productCount": 9979, "orderValue": 7633.544598384648, "confirmedDeliveryDate": 1721582812760, "externalInvoiceReference": "externalInvoiceReference", "orderValueCurrency": "orderValueCurrency", "deliveredDate": 1721582812760, "deliveryAddress": "deliveryAddress", "orderSentDate": 1721582812760, "deliveryContact": "deliveryContact", "id": 6822, "state": 5672, "deliveryDate": 1721582812760, "paymentTerms": "paymentTerms", "supplierName": "supplierName", "deliveryCity": "deliveryCity", "deliveryTerms": "deliveryTerms", "goodsMarking": "goodsMarking", "contactEmail": "contactEmail", "isPickNPack": "false", "deliveryAddress2": "deliveryAddress2", "orderValueStore": 4320.068394889597, "storeId": 4244, "deliveryCompany": "deliveryCompany", "message": "message", "deliveryCountry": "deliveryCountry", "comment": "comment", "articles": [{ "deliveredAmount": "0", "articleName": "articleName", "purchasePriceMisc": "0", "barcodeType": "EAN", "articleId": "articleId", "description": "description", "purchasePrice": "0", "units": [{ "unit": { "name": "name", "externalId": "externalId", "id": 4513 }, "articleId": "articleId", "storegroupId": 1030, "convert": 4396.180803164906, "barcode": "barcode" }], "type": "type", "batches": [{ "deliveredAmount": "1", "serialNr": "serialNr", "bestBefore": 5175, "batchId": "batchId", "orderedAmount": "1" }], "unit": "unit", "availableAmount": "0", "rate": 1846.851317870365, "supplierArticleId": "supplierArticleId", "purchasePriceShipment": "0", "id": 1102, "orderedAmount": "0", "stock": false, "barcode": "barcode", "orderedAmountWithUnits": "orderedAmountWithUnits", "stockWarning": "0" }], "poReference": "poReference" }

Create purchase order from customer order

POSTUrl: /customer_order
Headers:
Accept: application/json or application/xml
Content-type: application/json or application/xml
Create a new purchase order from a customer order
Body:

{ "customerOrderId": 396, "articles": [{ "articleId": "articleId", "orderedAmount": "0", "storeId": 9002 }] }
Successfull response:

{ "ordersCount": 9923, "pages": 3337, "pageSize": 2420, "orders": [{ "paymentTermsDescription": "paymentTermsDescription", "deliveryPhone": "deliveryPhone", "supplierOrderId": "supplierOrderId", "supplierId": 6718, "productionOrderId": 8846, "deliveryTermsDescription": "deliveryTermsDescription", "customerOrderId": 6545, "contactPerson": "contactPerson", "deliveryZip": "deliveryZip", "productCount": 3542, "orderValue": 9662.884893982431, "confirmedDeliveryDate": 1721582812760, "externalInvoiceReference": "externalInvoiceReference", "orderValueCurrency": "orderValueCurrency", "deliveredDate": 1721582812760, "deliveryAddress": "deliveryAddress", "orderSentDate": 1721582812760, "deliveryContact": "deliveryContact", "id": 5138, "state": 832, "deliveryDate": 1721582812760, "paymentTerms": "paymentTerms", "supplierName": "supplierName", "deliveryCity": "deliveryCity", "deliveryTerms": "deliveryTerms", "goodsMarking": "goodsMarking", "contactEmail": "contactEmail", "isPickNPack": "false", "deliveryAddress2": "deliveryAddress2", "orderValueStore": 6195.846935888343, "storeId": 626, "deliveryCompany": "deliveryCompany", "message": "message", "deliveryCountry": "deliveryCountry", "comment": "comment", "articles": [{ "deliveredAmount": "0", "articleName": "articleName", "purchasePriceMisc": "0", "barcodeType": "EAN", "articleId": "articleId", "description": "description", "purchasePrice": "0", "units": [{ "unit": { "name": "name", "externalId": "externalId", "id": 7089 }, "articleId": "articleId", "storegroupId": 108, "convert": 8733.490888573757, "barcode": "barcode" }], "type": "type", "batches": [{ "deliveredAmount": "1", "serialNr": "serialNr", "bestBefore": 7161, "batchId": "batchId", "orderedAmount": "1" }], "unit": "unit", "availableAmount": "0", "rate": 58.626387167413085, "supplierArticleId": "supplierArticleId", "purchasePriceShipment": "0", "id": 1867, "orderedAmount": "0", "stock": false, "barcode": "barcode", "orderedAmountWithUnits": "orderedAmountWithUnits", "stockWarning": "0" }], "poReference": "poReference" }], "page": 9739 }

Create purchase orders from production order

POSTUrl: /production_order
Headers:
Accept: application/json or application/xml
Content-type: application/json or application/xml
Create new purchase orders from a production order
Body:

{ "productionOrderId": 5609, "articles": [{ "articleId": "articleId", "orderedAmount": "0", "storeId": 1121 }] }
Successfull response:

{ "ordersCount": 4987, "pages": 6937, "pageSize": 5978, "orders": [{ "paymentTermsDescription": "paymentTermsDescription", "deliveryPhone": "deliveryPhone", "supplierOrderId": "supplierOrderId", "supplierId": 1975, "productionOrderId": 8000, "deliveryTermsDescription": "deliveryTermsDescription", "customerOrderId": 5130, "contactPerson": "contactPerson", "deliveryZip": "deliveryZip", "productCount": 9213, "orderValue": 2823.0048471037926, "confirmedDeliveryDate": 1721582812761, "externalInvoiceReference": "externalInvoiceReference", "orderValueCurrency": "orderValueCurrency", "deliveredDate": 1721582812761, "deliveryAddress": "deliveryAddress", "orderSentDate": 1721582812761, "deliveryContact": "deliveryContact", "id": 7845, "state": 2856, "deliveryDate": 1721582812761, "paymentTerms": "paymentTerms", "supplierName": "supplierName", "deliveryCity": "deliveryCity", "deliveryTerms": "deliveryTerms", "goodsMarking": "goodsMarking", "contactEmail": "contactEmail", "isPickNPack": "false", "deliveryAddress2": "deliveryAddress2", "orderValueStore": 6504.497481721794, "storeId": 178, "deliveryCompany": "deliveryCompany", "message": "message", "deliveryCountry": "deliveryCountry", "comment": "comment", "articles": [{ "deliveredAmount": "0", "articleName": "articleName", "purchasePriceMisc": "0", "barcodeType": "EAN", "articleId": "articleId", "description": "description", "purchasePrice": "0", "units": [{ "unit": { "name": "name", "externalId": "externalId", "id": 6340 }, "articleId": "articleId", "storegroupId": 9256, "convert": 4450.112942155823, "barcode": "barcode" }], "type": "type", "batches": [{ "deliveredAmount": "1", "serialNr": "serialNr", "bestBefore": 3511, "batchId": "batchId", "orderedAmount": "1" }], "unit": "unit", "availableAmount": "0", "rate": 5748.425848328667, "supplierArticleId": "supplierArticleId", "purchasePriceShipment": "0", "id": 8289, "orderedAmount": "0", "stock": true, "barcode": "barcode", "orderedAmountWithUnits": "orderedAmountWithUnits", "stockWarning": "0" }], "poReference": "poReference" }], "page": 2056 }

Add row to purchase order

POSTUrl: /{id}/product
Headers:
Accept: application/json or application/xml
Content-type: application/json or application/xml
Add article or textrow to an existing purchase order
Body:

{ "deliveredAmount": "0", "batches": [{ "deliveredAmount": "1", "serialNr": "serialNr", "bestBefore": 671, "batchId": "batchId", "orderedAmount": "1" }], "articleName": "articleName", "purchasePriceMisc": "0", "articleId": "articleId", "supplierArticleId": "supplierArticleId", "purchasePriceShipment": "0", "description": "description", "purchasePrice": "0", "orderedAmount": "0" }
Successfull response:

{ "paymentTermsDescription": "paymentTermsDescription", "deliveryPhone": "deliveryPhone", "supplierOrderId": "supplierOrderId", "supplierId": 9166, "productionOrderId": 6646, "deliveryTermsDescription": "deliveryTermsDescription", "customerOrderId": 1626, "contactPerson": "contactPerson", "deliveryZip": "deliveryZip", "productCount": 4530, "orderValue": 2208.7266346437304, "confirmedDeliveryDate": 1721582812761, "externalInvoiceReference": "externalInvoiceReference", "orderValueCurrency": "orderValueCurrency", "deliveredDate": 1721582812761, "deliveryAddress": "deliveryAddress", "orderSentDate": 1721582812761, "deliveryContact": "deliveryContact", "id": 1744, "state": 2803, "deliveryDate": 1721582812761, "paymentTerms": "paymentTerms", "supplierName": "supplierName", "deliveryCity": "deliveryCity", "deliveryTerms": "deliveryTerms", "goodsMarking": "goodsMarking", "contactEmail": "contactEmail", "isPickNPack": "false", "deliveryAddress2": "deliveryAddress2", "orderValueStore": 4625.207365572493, "storeId": 2290, "deliveryCompany": "deliveryCompany", "message": "message", "deliveryCountry": "deliveryCountry", "comment": "comment", "articles": [{ "deliveredAmount": "0", "articleName": "articleName", "purchasePriceMisc": "0", "barcodeType": "EAN", "articleId": "articleId", "description": "description", "purchasePrice": "0", "units": [{ "unit": { "name": "name", "externalId": "externalId", "id": 7931 }, "articleId": "articleId", "storegroupId": 1332, "convert": 9942.158223813973, "barcode": "barcode" }], "type": "type", "batches": [{ "deliveredAmount": "1", "serialNr": "serialNr", "bestBefore": 8720, "batchId": "batchId", "orderedAmount": "1" }], "unit": "unit", "availableAmount": "0", "rate": 1135.5684747884443, "supplierArticleId": "supplierArticleId", "purchasePriceShipment": "0", "id": 8570, "orderedAmount": "0", "stock": false, "barcode": "barcode", "orderedAmountWithUnits": "orderedAmountWithUnits", "stockWarning": "0" }], "poReference": "poReference" }

Add articles to purchase order

POSTUrl: /products
Headers:
Accept: application/json or application/xml
Content-type: application/json or application/xml
Add articles to a new or existing purchase order
Body:

{ "supplierId": 7750, "orderId": 9279, "articles": [{ "deliveredAmount": "0", "batches": [{ "deliveredAmount": "1", "serialNr": "serialNr", "bestBefore": 4589, "batchId": "batchId", "orderedAmount": "1" }], "articleName": "articleName", "purchasePriceMisc": "0", "articleId": "articleId", "supplierArticleId": "supplierArticleId", "purchasePriceShipment": "0", "description": "description", "purchasePrice": "0", "orderedAmount": "0" }] }
Successfull response:

{ "paymentTermsDescription": "paymentTermsDescription", "deliveryPhone": "deliveryPhone", "supplierOrderId": "supplierOrderId", "supplierId": 3816, "productionOrderId": 8421, "deliveryTermsDescription": "deliveryTermsDescription", "customerOrderId": 7455, "contactPerson": "contactPerson", "deliveryZip": "deliveryZip", "productCount": 6733, "orderValue": 2733.346584198223, "confirmedDeliveryDate": 1721582812770, "externalInvoiceReference": "externalInvoiceReference", "orderValueCurrency": "orderValueCurrency", "deliveredDate": 1721582812770, "deliveryAddress": "deliveryAddress", "orderSentDate": 1721582812770, "deliveryContact": "deliveryContact", "id": 2839, "state": 1651, "deliveryDate": 1721582812770, "paymentTerms": "paymentTerms", "supplierName": "supplierName", "deliveryCity": "deliveryCity", "deliveryTerms": "deliveryTerms", "goodsMarking": "goodsMarking", "contactEmail": "contactEmail", "isPickNPack": "false", "deliveryAddress2": "deliveryAddress2", "orderValueStore": 6549.162826073669, "storeId": 1083, "deliveryCompany": "deliveryCompany", "message": "message", "deliveryCountry": "deliveryCountry", "comment": "comment", "articles": [{ "deliveredAmount": "0", "articleName": "articleName", "purchasePriceMisc": "0", "barcodeType": "EAN", "articleId": "articleId", "description": "description", "purchasePrice": "0", "units": [{ "unit": { "name": "name", "externalId": "externalId", "id": 7754 }, "articleId": "articleId", "storegroupId": 8664, "convert": 438.1616451247028, "barcode": "barcode" }], "type": "type", "batches": [{ "deliveredAmount": "1", "serialNr": "serialNr", "bestBefore": 6487, "batchId": "batchId", "orderedAmount": "1" }], "unit": "unit", "availableAmount": "0", "rate": 70.5558230371317, "supplierArticleId": "supplierArticleId", "purchasePriceShipment": "0", "id": 5443, "orderedAmount": "0", "stock": true, "barcode": "barcode", "orderedAmountWithUnits": "orderedAmountWithUnits", "stockWarning": "0" }], "poReference": "poReference" }

Add article to open order

POSTUrl: /open/products
Headers:
Accept: application/json or application/xml
Content-type: application/json or application/xml
Add article to open purchase order
Body:

{ "amount": 6702.205774532113, "articleId": "articleId" }
Successfull response:

Create article

POSTUrl: /{order_id}/create_article
Headers:
Accept: application/json or application/xml
Content-type: application/json or application/xml
Create a new article from a purchase order row and replaces that row with the newly create article
Body:

{ "deliveredAmount": 8704.93649686799, "unit": "unit", "articleName": "articleName", "orderId": 3061, "articleId": "articleId", "supplierArticleId": "supplierArticleId", "purchasePrice": 4839.905711923027 }
Successfull response:

{ "paymentTermsDescription": "paymentTermsDescription", "deliveryPhone": "deliveryPhone", "supplierOrderId": "supplierOrderId", "supplierId": 313, "productionOrderId": 2160, "deliveryTermsDescription": "deliveryTermsDescription", "customerOrderId": 6720, "contactPerson": "contactPerson", "deliveryZip": "deliveryZip", "productCount": 6148, "orderValue": 1185.6336113830357, "confirmedDeliveryDate": 1721582812770, "externalInvoiceReference": "externalInvoiceReference", "orderValueCurrency": "orderValueCurrency", "deliveredDate": 1721582812770, "deliveryAddress": "deliveryAddress", "orderSentDate": 1721582812770, "deliveryContact": "deliveryContact", "id": 1444, "state": 6195, "deliveryDate": 1721582812770, "paymentTerms": "paymentTerms", "supplierName": "supplierName", "deliveryCity": "deliveryCity", "deliveryTerms": "deliveryTerms", "goodsMarking": "goodsMarking", "contactEmail": "contactEmail", "isPickNPack": "false", "deliveryAddress2": "deliveryAddress2", "orderValueStore": 8016.281935732675, "storeId": 7209, "deliveryCompany": "deliveryCompany", "message": "message", "deliveryCountry": "deliveryCountry", "comment": "comment", "articles": [{ "deliveredAmount": "0", "articleName": "articleName", "purchasePriceMisc": "0", "barcodeType": "EAN", "articleId": "articleId", "description": "description", "purchasePrice": "0", "units": [{ "unit": { "name": "name", "externalId": "externalId", "id": 4665 }, "articleId": "articleId", "storegroupId": 8319, "convert": 194.71523585978701, "barcode": "barcode" }], "type": "type", "batches": [{ "deliveredAmount": "1", "serialNr": "serialNr", "bestBefore": 6164, "batchId": "batchId", "orderedAmount": "1" }], "unit": "unit", "availableAmount": "0", "rate": 6795.08050231947, "supplierArticleId": "supplierArticleId", "purchasePriceShipment": "0", "id": 1835, "orderedAmount": "0", "stock": false, "barcode": "barcode", "orderedAmountWithUnits": "orderedAmountWithUnits", "stockWarning": "0" }], "poReference": "poReference" }

Update rate

PUTUrl: /{id}/rate
Headers:
Accept: application/json or application/xml
Content-type: application/json or application/xml
Update rate for an existing purchase order
Body:

{"rate": 7684.924609888186}
Successfull response:

{ "paymentTermsDescription": "paymentTermsDescription", "deliveryPhone": "deliveryPhone", "supplierOrderId": "supplierOrderId", "supplierId": 3735, "productionOrderId": 2808, "deliveryTermsDescription": "deliveryTermsDescription", "customerOrderId": 4936, "contactPerson": "contactPerson", "deliveryZip": "deliveryZip", "productCount": 4267, "orderValue": 7350.666696669925, "confirmedDeliveryDate": 1721582812771, "externalInvoiceReference": "externalInvoiceReference", "orderValueCurrency": "orderValueCurrency", "deliveredDate": 1721582812771, "deliveryAddress": "deliveryAddress", "orderSentDate": 1721582812771, "deliveryContact": "deliveryContact", "id": 4435, "state": 932, "deliveryDate": 1721582812771, "paymentTerms": "paymentTerms", "supplierName": "supplierName", "deliveryCity": "deliveryCity", "deliveryTerms": "deliveryTerms", "goodsMarking": "goodsMarking", "contactEmail": "contactEmail", "isPickNPack": "false", "deliveryAddress2": "deliveryAddress2", "orderValueStore": 6762.649304763818, "storeId": 9453, "deliveryCompany": "deliveryCompany", "message": "message", "deliveryCountry": "deliveryCountry", "comment": "comment", "articles": [{ "deliveredAmount": "0", "articleName": "articleName", "purchasePriceMisc": "0", "barcodeType": "EAN", "articleId": "articleId", "description": "description", "purchasePrice": "0", "units": [{ "unit": { "name": "name", "externalId": "externalId", "id": 9627 }, "articleId": "articleId", "storegroupId": 9145, "convert": 8357.49695402465, "barcode": "barcode" }], "type": "type", "batches": [{ "deliveredAmount": "1", "serialNr": "serialNr", "bestBefore": 534, "batchId": "batchId", "orderedAmount": "1" }], "unit": "unit", "availableAmount": "0", "rate": 6449.630508718128, "supplierArticleId": "supplierArticleId", "purchasePriceShipment": "0", "id": 3462, "orderedAmount": "0", "stock": true, "barcode": "barcode", "orderedAmountWithUnits": "orderedAmountWithUnits", "stockWarning": "0" }], "poReference": "poReference" }

Update purchase order product

PUTUrl: /{id}/product
Headers:
Accept: application/json or application/xml
Content-type: application/json or application/xml
Update an existing purchase order product
Body:

{ "deliveredAmount": "0", "articleName": "articleName", "purchasePriceMisc": "0", "barcodeType": "EAN", "articleId": "articleId", "description": "description", "purchasePrice": "0", "units": [{ "unit": { "name": "name", "externalId": "externalId", "id": 2140 }, "articleId": "articleId", "storegroupId": 5095, "convert": 8654.36117375522, "barcode": "barcode" }], "type": "type", "batches": [{ "deliveredAmount": "1", "serialNr": "serialNr", "bestBefore": 4189, "batchId": "batchId", "orderedAmount": "1" }], "unit": "unit", "availableAmount": "0", "rate": 5974.238647215432, "supplierArticleId": "supplierArticleId", "purchasePriceShipment": "0", "id": 6598, "orderedAmount": "0", "stock": false, "barcode": "barcode", "orderedAmountWithUnits": "orderedAmountWithUnits", "stockWarning": "0" }
Successfull response:

{ "paymentTermsDescription": "paymentTermsDescription", "deliveryPhone": "deliveryPhone", "supplierOrderId": "supplierOrderId", "supplierId": 7142, "productionOrderId": 7446, "deliveryTermsDescription": "deliveryTermsDescription", "customerOrderId": 1217, "contactPerson": "contactPerson", "deliveryZip": "deliveryZip", "productCount": 6664, "orderValue": 1956.6053547901697, "confirmedDeliveryDate": 1721582812771, "externalInvoiceReference": "externalInvoiceReference", "orderValueCurrency": "orderValueCurrency", "deliveredDate": 1721582812771, "deliveryAddress": "deliveryAddress", "orderSentDate": 1721582812771, "deliveryContact": "deliveryContact", "id": 5235, "state": 3231, "deliveryDate": 1721582812771, "paymentTerms": "paymentTerms", "supplierName": "supplierName", "deliveryCity": "deliveryCity", "deliveryTerms": "deliveryTerms", "goodsMarking": "goodsMarking", "contactEmail": "contactEmail", "isPickNPack": "false", "deliveryAddress2": "deliveryAddress2", "orderValueStore": 2796.232151529996, "storeId": 7309, "deliveryCompany": "deliveryCompany", "message": "message", "deliveryCountry": "deliveryCountry", "comment": "comment", "articles": [{ "deliveredAmount": "0", "articleName": "articleName", "purchasePriceMisc": "0", "barcodeType": "EAN", "articleId": "articleId", "description": "description", "purchasePrice": "0", "units": [{ "unit": { "name": "name", "externalId": "externalId", "id": 9046 }, "articleId": "articleId", "storegroupId": 1039, "convert": 7096.887749264945, "barcode": "barcode" }], "type": "type", "batches": [{ "deliveredAmount": "1", "serialNr": "serialNr", "bestBefore": 9326, "batchId": "batchId", "orderedAmount": "1" }], "unit": "unit", "availableAmount": "0", "rate": 9848.785107928183, "supplierArticleId": "supplierArticleId", "purchasePriceShipment": "0", "id": 7256, "orderedAmount": "0", "stock": true, "barcode": "barcode", "orderedAmountWithUnits": "orderedAmountWithUnits", "stockWarning": "0" }], "poReference": "poReference" }

Update purchase order

PUTUrl: /{id}
Headers:
Accept: application/json or application/xml
Content-type: application/json or application/xml
Update an existing purchase order
Body:

{ "paymentTermsDescription": "paymentTermsDescription", "deliveryPhone": "deliveryPhone", "supplierOrderId": "supplierOrderId", "supplierId": 7410, "productionOrderId": 445, "deliveryTermsDescription": "deliveryTermsDescription", "customerOrderId": 4579, "contactPerson": "contactPerson", "deliveryZip": "deliveryZip", "productCount": 2370, "orderValue": 1629.7781624043184, "confirmedDeliveryDate": 1721582812772, "externalInvoiceReference": "externalInvoiceReference", "orderValueCurrency": "orderValueCurrency", "deliveredDate": 1721582812772, "deliveryAddress": "deliveryAddress", "orderSentDate": 1721582812772, "deliveryContact": "deliveryContact", "id": 2713, "state": 7727, "deliveryDate": 1721582812772, "paymentTerms": "paymentTerms", "supplierName": "supplierName", "deliveryCity": "deliveryCity", "deliveryTerms": "deliveryTerms", "goodsMarking": "goodsMarking", "contactEmail": "contactEmail", "isPickNPack": "false", "deliveryAddress2": "deliveryAddress2", "orderValueStore": 3224.0424171435766, "storeId": 7976, "deliveryCompany": "deliveryCompany", "message": "message", "deliveryCountry": "deliveryCountry", "comment": "comment", "articles": [{ "deliveredAmount": "0", "articleName": "articleName", "purchasePriceMisc": "0", "barcodeType": "EAN", "articleId": "articleId", "description": "description", "purchasePrice": "0", "units": [{ "unit": { "name": "name", "externalId": "externalId", "id": 9034 }, "articleId": "articleId", "storegroupId": 5219, "convert": 1495.709003216894, "barcode": "barcode" }], "type": "type", "batches": [{ "deliveredAmount": "1", "serialNr": "serialNr", "bestBefore": 2693, "batchId": "batchId", "orderedAmount": "1" }], "unit": "unit", "availableAmount": "0", "rate": 1011.0872768525813, "supplierArticleId": "supplierArticleId", "purchasePriceShipment": "0", "id": 2616, "orderedAmount": "0", "stock": false, "barcode": "barcode", "orderedAmountWithUnits": "orderedAmountWithUnits", "stockWarning": "0" }], "poReference": "poReference" }
Successfull response:

{ "paymentTermsDescription": "paymentTermsDescription", "deliveryPhone": "deliveryPhone", "supplierOrderId": "supplierOrderId", "supplierId": 1121, "productionOrderId": 6262, "deliveryTermsDescription": "deliveryTermsDescription", "customerOrderId": 8535, "contactPerson": "contactPerson", "deliveryZip": "deliveryZip", "productCount": 3559, "orderValue": 6629.543793851046, "confirmedDeliveryDate": 1721582812772, "externalInvoiceReference": "externalInvoiceReference", "orderValueCurrency": "orderValueCurrency", "deliveredDate": 1721582812772, "deliveryAddress": "deliveryAddress", "orderSentDate": 1721582812772, "deliveryContact": "deliveryContact", "id": 8074, "state": 7275, "deliveryDate": 1721582812772, "paymentTerms": "paymentTerms", "supplierName": "supplierName", "deliveryCity": "deliveryCity", "deliveryTerms": "deliveryTerms", "goodsMarking": "goodsMarking", "contactEmail": "contactEmail", "isPickNPack": "false", "deliveryAddress2": "deliveryAddress2", "orderValueStore": 3359.746474335291, "storeId": 8524, "deliveryCompany": "deliveryCompany", "message": "message", "deliveryCountry": "deliveryCountry", "comment": "comment", "articles": [{ "deliveredAmount": "0", "articleName": "articleName", "purchasePriceMisc": "0", "barcodeType": "EAN", "articleId": "articleId", "description": "description", "purchasePrice": "0", "units": [{ "unit": { "name": "name", "externalId": "externalId", "id": 6608 }, "articleId": "articleId", "storegroupId": 7155, "convert": 9604.423671927108, "barcode": "barcode" }], "type": "type", "batches": [{ "deliveredAmount": "1", "serialNr": "serialNr", "bestBefore": 9986, "batchId": "batchId", "orderedAmount": "1" }], "unit": "unit", "availableAmount": "0", "rate": 9665.944499301057, "supplierArticleId": "supplierArticleId", "purchasePriceShipment": "0", "id": 480, "orderedAmount": "0", "stock": false, "barcode": "barcode", "orderedAmountWithUnits": "orderedAmountWithUnits", "stockWarning": "0" }], "poReference": "poReference" }

Remove purchase order product

PUTUrl: /{id}/product/remove
Headers:
Accept: application/json or application/xml
Content-type: application/json or application/xml
Remove product from an existing purchase order
Body:

{ "deliveredAmount": "0", "articleName": "articleName", "purchasePriceMisc": "0", "barcodeType": "EAN", "articleId": "articleId", "description": "description", "purchasePrice": "0", "units": [{ "unit": { "name": "name", "externalId": "externalId", "id": 6842 }, "articleId": "articleId", "storegroupId": 5738, "convert": 881.5627175730579, "barcode": "barcode" }], "type": "type", "batches": [{ "deliveredAmount": "1", "serialNr": "serialNr", "bestBefore": 7200, "batchId": "batchId", "orderedAmount": "1" }], "unit": "unit", "availableAmount": "0", "rate": 3484.3762147615344, "supplierArticleId": "supplierArticleId", "purchasePriceShipment": "0", "id": 3370, "orderedAmount": "0", "stock": false, "barcode": "barcode", "orderedAmountWithUnits": "orderedAmountWithUnits", "stockWarning": "0" }
Successfull response:

{ "paymentTermsDescription": "paymentTermsDescription", "deliveryPhone": "deliveryPhone", "supplierOrderId": "supplierOrderId", "supplierId": 6566, "productionOrderId": 1513, "deliveryTermsDescription": "deliveryTermsDescription", "customerOrderId": 938, "contactPerson": "contactPerson", "deliveryZip": "deliveryZip", "productCount": 1796, "orderValue": 1851.1268792546853, "confirmedDeliveryDate": 1721582812772, "externalInvoiceReference": "externalInvoiceReference", "orderValueCurrency": "orderValueCurrency", "deliveredDate": 1721582812772, "deliveryAddress": "deliveryAddress", "orderSentDate": 1721582812772, "deliveryContact": "deliveryContact", "id": 5631, "state": 1154, "deliveryDate": 1721582812772, "paymentTerms": "paymentTerms", "supplierName": "supplierName", "deliveryCity": "deliveryCity", "deliveryTerms": "deliveryTerms", "goodsMarking": "goodsMarking", "contactEmail": "contactEmail", "isPickNPack": "false", "deliveryAddress2": "deliveryAddress2", "orderValueStore": 4733.798783674229, "storeId": 9095, "deliveryCompany": "deliveryCompany", "message": "message", "deliveryCountry": "deliveryCountry", "comment": "comment", "articles": [{ "deliveredAmount": "0", "articleName": "articleName", "purchasePriceMisc": "0", "barcodeType": "EAN", "articleId": "articleId", "description": "description", "purchasePrice": "0", "units": [{ "unit": { "name": "name", "externalId": "externalId", "id": 7364 }, "articleId": "articleId", "storegroupId": 5119, "convert": 2702.0578544452324, "barcode": "barcode" }], "type": "type", "batches": [{ "deliveredAmount": "1", "serialNr": "serialNr", "bestBefore": 254, "batchId": "batchId", "orderedAmount": "1" }], "unit": "unit", "availableAmount": "0", "rate": 1548.732581097997, "supplierArticleId": "supplierArticleId", "purchasePriceShipment": "0", "id": 5505, "orderedAmount": "0", "stock": true, "barcode": "barcode", "orderedAmountWithUnits": "orderedAmountWithUnits", "stockWarning": "0" }], "poReference": "poReference" }

Send purchase order

PUTUrl: /{id}/send
Headers:
Accept: application/json or application/xml
Content-type: application/json or application/xml
Update purchase order state to sent

Valid parameters:

Parameter Description Default value Allowed values
sendemail false

Body:

{ "ccList": [{}], "to": "to" }
Successfull response:

{ "paymentTermsDescription": "paymentTermsDescription", "deliveryPhone": "deliveryPhone", "supplierOrderId": "supplierOrderId", "supplierId": 3218, "productionOrderId": 8816, "deliveryTermsDescription": "deliveryTermsDescription", "customerOrderId": 3986, "contactPerson": "contactPerson", "deliveryZip": "deliveryZip", "productCount": 4864, "orderValue": 1340.7968018848283, "confirmedDeliveryDate": 1721582812773, "externalInvoiceReference": "externalInvoiceReference", "orderValueCurrency": "orderValueCurrency", "deliveredDate": 1721582812773, "deliveryAddress": "deliveryAddress", "orderSentDate": 1721582812773, "deliveryContact": "deliveryContact", "id": 9420, "state": 1673, "deliveryDate": 1721582812773, "paymentTerms": "paymentTerms", "supplierName": "supplierName", "deliveryCity": "deliveryCity", "deliveryTerms": "deliveryTerms", "goodsMarking": "goodsMarking", "contactEmail": "contactEmail", "isPickNPack": "false", "deliveryAddress2": "deliveryAddress2", "orderValueStore": 3673.215896882811, "storeId": 6246, "deliveryCompany": "deliveryCompany", "message": "message", "deliveryCountry": "deliveryCountry", "comment": "comment", "articles": [{ "deliveredAmount": "0", "articleName": "articleName", "purchasePriceMisc": "0", "barcodeType": "EAN", "articleId": "articleId", "description": "description", "purchasePrice": "0", "units": [{ "unit": { "name": "name", "externalId": "externalId", "id": 1472 }, "articleId": "articleId", "storegroupId": 1270, "convert": 6049.173326548836, "barcode": "barcode" }], "type": "type", "batches": [{ "deliveredAmount": "1", "serialNr": "serialNr", "bestBefore": 5688, "batchId": "batchId", "orderedAmount": "1" }], "unit": "unit", "availableAmount": "0", "rate": 9845.248279920237, "supplierArticleId": "supplierArticleId", "purchasePriceShipment": "0", "id": 6892, "orderedAmount": "0", "stock": false, "barcode": "barcode", "orderedAmountWithUnits": "orderedAmountWithUnits", "stockWarning": "0" }], "poReference": "poReference" }

Verify purchase order

PUTUrl: /{id}/verify
Headers:
Accept: application/json or application/xml
Content-type: application/json or application/xml
Update purchase order state to verified
Body:

{ "verify": "true", "externalInvoiceReference": "externalInvoiceReference", "products": [{ "purchasePriceMisc": 5496.734719024139, "articleId": "articleId", "purchasePriceShipment": 366.91170313847385, "purchasePrice": 1570.1023584938423 }] }
Successfull response:

{ "paymentTermsDescription": "paymentTermsDescription", "deliveryPhone": "deliveryPhone", "supplierOrderId": "supplierOrderId", "supplierId": 9263, "productionOrderId": 684, "deliveryTermsDescription": "deliveryTermsDescription", "customerOrderId": 6369, "contactPerson": "contactPerson", "deliveryZip": "deliveryZip", "productCount": 9779, "orderValue": 8093.501494679719, "confirmedDeliveryDate": 1721582812773, "externalInvoiceReference": "externalInvoiceReference", "orderValueCurrency": "orderValueCurrency", "deliveredDate": 1721582812773, "deliveryAddress": "deliveryAddress", "orderSentDate": 1721582812773, "deliveryContact": "deliveryContact", "id": 8712, "state": 497, "deliveryDate": 1721582812773, "paymentTerms": "paymentTerms", "supplierName": "supplierName", "deliveryCity": "deliveryCity", "deliveryTerms": "deliveryTerms", "goodsMarking": "goodsMarking", "contactEmail": "contactEmail", "isPickNPack": "false", "deliveryAddress2": "deliveryAddress2", "orderValueStore": 5600.358899126949, "storeId": 4899, "deliveryCompany": "deliveryCompany", "message": "message", "deliveryCountry": "deliveryCountry", "comment": "comment", "articles": [{ "deliveredAmount": "0", "articleName": "articleName", "purchasePriceMisc": "0", "barcodeType": "EAN", "articleId": "articleId", "description": "description", "purchasePrice": "0", "units": [{ "unit": { "name": "name", "externalId": "externalId", "id": 3639 }, "articleId": "articleId", "storegroupId": 3370, "convert": 9649.684653806355, "barcode": "barcode" }], "type": "type", "batches": [{ "deliveredAmount": "1", "serialNr": "serialNr", "bestBefore": 8622, "batchId": "batchId", "orderedAmount": "1" }], "unit": "unit", "availableAmount": "0", "rate": 421.9617852329682, "supplierArticleId": "supplierArticleId", "purchasePriceShipment": "0", "id": 6502, "orderedAmount": "0", "stock": true, "barcode": "barcode", "orderedAmountWithUnits": "orderedAmountWithUnits", "stockWarning": "0" }], "poReference": "poReference" }

Cancel purchase order

PUTUrl: /{id}/cancel
Headers:
Accept: application/json or application/xml
Content-type: application/json or application/xml
Update purchase order state to cancelled
Body:
Successfull response:

{ "paymentTermsDescription": "paymentTermsDescription", "deliveryPhone": "deliveryPhone", "supplierOrderId": "supplierOrderId", "supplierId": 4917, "productionOrderId": 5570, "deliveryTermsDescription": "deliveryTermsDescription", "customerOrderId": 2366, "contactPerson": "contactPerson", "deliveryZip": "deliveryZip", "productCount": 8291, "orderValue": 7644.648235440093, "confirmedDeliveryDate": 1721582812773, "externalInvoiceReference": "externalInvoiceReference", "orderValueCurrency": "orderValueCurrency", "deliveredDate": 1721582812773, "deliveryAddress": "deliveryAddress", "orderSentDate": 1721582812773, "deliveryContact": "deliveryContact", "id": 6651, "state": 2381, "deliveryDate": 1721582812773, "paymentTerms": "paymentTerms", "supplierName": "supplierName", "deliveryCity": "deliveryCity", "deliveryTerms": "deliveryTerms", "goodsMarking": "goodsMarking", "contactEmail": "contactEmail", "isPickNPack": "false", "deliveryAddress2": "deliveryAddress2", "orderValueStore": 9912.63445275667, "storeId": 7194, "deliveryCompany": "deliveryCompany", "message": "message", "deliveryCountry": "deliveryCountry", "comment": "comment", "articles": [{ "deliveredAmount": "0", "articleName": "articleName", "purchasePriceMisc": "0", "barcodeType": "EAN", "articleId": "articleId", "description": "description", "purchasePrice": "0", "units": [{ "unit": { "name": "name", "externalId": "externalId", "id": 3837 }, "articleId": "articleId", "storegroupId": 8023, "convert": 8970.93864780369, "barcode": "barcode" }], "type": "type", "batches": [{ "deliveredAmount": "1", "serialNr": "serialNr", "bestBefore": 7890, "batchId": "batchId", "orderedAmount": "1" }], "unit": "unit", "availableAmount": "0", "rate": 1527.8507287277444, "supplierArticleId": "supplierArticleId", "purchasePriceShipment": "0", "id": 2760, "orderedAmount": "0", "stock": true, "barcode": "barcode", "orderedAmountWithUnits": "orderedAmountWithUnits", "stockWarning": "0" }], "poReference": "poReference" }

Move article from open order

PUTUrl: /open/products
Headers:
Accept: application/json or application/xml
Content-type: application/json or application/xml
Move article from open purchase order to either a new purchase order or an existing one
Body:

{ "amount": 1736.339226305329, "supplierId": 1750, "orderId": 6943, "price": 8021.398711943261, "bundleParts": [{ "amount": 5145.895366723412, "supplierId": 7941, "orderId": 8993, "price": 403.8455360274484, "bundleParts": [{ "amount": 9434.760350783754, "supplierId": 8227, "orderId": 6633, "price": 813.0117213474408, "bundleParts": [{ "amount": 347.99144941193737, "supplierId": 1433, "orderId": 9088, "price": 2037.8803372513476, "bundleParts": [], "articleId": "articleId" }], "articleId": "articleId" }], "articleId": "articleId" }], "articleId": "articleId" }
Successfull response:

Remove article from open order

DELETEUrl: /open/products/{article_id : .+}
Headers:
Accept: application/json or application/xml
Content-type: application/json or application/xml
Remove article from open purchase order
Body:
Successfull response:

Classes:

Article

Field Type Description Default Mandatory Accepted values Example values Access
articleId String Write only with POST Post R,W
externalId String External article id R,W
active Boolean true R,W
name String Post R,W
bundled Boolean Write only with POST false R,W
parts List If article is bundled this is the parts contained in the article. When updating an existing bundled article this list will replace old list. If list is null, no replacement will be made. If list is empty, all parts will be removed R,W
batches ArticleBatches Returns the first 20 batches and the first 20 serial numbers connected to this article R
description String R,W
category String övrigt R,W
amount Double Available amount. This means stock amount reduced by reserved amount R,W
reserved Double Reserved amount R
barcode String R,W
barcodeType String EAN EAN, CODE128, QR, UPC R,W
price Double R,W
prices List R,W
supplier Long If article is bundled, supplier information will be ignored if not null, must point to an existing supplier R,W
supplierExternalId String external id of Supplier R
supplierName String If article is bundled, supplier information will be ignored if not null, must point to an existing supplier R,W
supplierArticleId String If article is bundled, supplier information will be ignored R,W
supplierAutomaticOrder Boolean If article is bundled, supplier information will be ignored R,W
supplierBuyPrice Double Total buy price including shipment and misc costs. If article is bundled, supplier information will be ignored R,W
supplierBuyPriceShipment Double If article is bundled, supplier information will be ignored R,W
supplierArticles List If article is bundled, supplier information will be ignored R,W
supplierBuyPriceMisc Double If article is bundled, supplier information will be ignored R,W
supplierBuyCurrency String R
supplierBuyRate Double R
unit String st R,W
vat Double Vat in percentage. If both vat-account and vat is submitted, vat-account takes precedence Post R,W
vatAccount Integer If both vat-account and vat is submitted, vat-account takes precedence R,W
imageLastUpdated Long R
type String Stock means it's a physical product and service means it's work and lacks stock-amount Post Stock, Service R,W
stock Boolean True means it's a physical article in stock and false means it's an article that needs to be ordered from supplier true R,W
webshopArticle Boolean false R,W
manufacturer String R,W
manufacturerArticleId String R,W
customFields List if you have need for other type of fields then what lagerkoll offers you can use this key-value list. When creating / updating an article the content of this list will replace the list of fields in the existing article R,W
links List R,W
tags List Make sure you provide tagId for existing tags, otherwise new ones will be created R,W
width Double R,W
height Double R,W
depth Double R,W
weight Double R,W
stockPlace String R,W
stockWarning Double R,W
criticalLevel Double When amount reaches the critical level it is automatically added to a purchase order, with amount set to order level R,W
orderLevel Double When amount reaches the critical level it is automatically added to a purchase order, with amount set to order level R,W
automaticOrder Boolean Set flag to true if the article should be automatically added to a purchase order when stock level reaches the critical level R,W
nextDeliveryDate Long If there is a purchase order for this article, this would be the delivery date for that order R
orderedAmount Double If there is a purchase order for this article, this would be the ordered amount for that order R
deliveredAmount Double If there is a purchase order for this article, this would be the delivered amount for that order R
availableAmount Double Amount available for given deliveryDate R

ArticleBatch

Field Type Description Default Mandatory Accepted values Example values Access
articleId String Id of article the batch/serialnumber is connected to R
articleName String Name of article R
batchId String batch-id or serial-nr must be set, Write only with POST Post R,W
serialNr String batch-id or serial-nr must be set, Write only with POST Post R,W
amount double 1 R,W
reserved double Reserved is set automatically when part of a customer order that has not yet been invoiced R
barcode String Write only with POST R,W
bestBefore Long ms since 1970, Write only with POST R,W

ArticleBatches

Field Type Description Default Mandatory Accepted values Example values Access
totalBatches Integer Total number of batches for an article R
batches List Current page of batches for an article R
totalSerialNumbers Integer Total number of serial numbers for an article R
serialNumbers List Current page of serial numbers for an article R
totalBatchesInStock Double Total batches in stock R
totalBatchesReserved Double Total batches reserved R
totalSerialNumbersInStock Double Total serial numbers in stock R
totalSerialNumbersReserved Double Total serial numbers reserved R

ArticleLink

Field Type Description Default Mandatory Accepted values Example values Access
name String Post R,W
url String Post R,W
type String Post unknown, webpage, image, document, lagerkoll_document R,W

ArticlesResponse

Field Type Description Default Mandatory Accepted values Example values Access
page int R
pages int R
pageSize int R
articlesCount int R
since long R
articles List R

ArticleTag

Field Type Description Default Mandatory Accepted values Example values Access
id long Write only with POST Post R,W
externalId String R,W
name String Post R,W
desc String Post R,W

ArticleUnit

Field Type Description Default Mandatory Accepted values Example values Access
storegroupId long R
articleId String Article id R
unit Unit Unit id true R,W
convert Double Conversion coefficient between unit and the article base unit true R,W
barcode String Barcode conected to unit R,W

BundledArticle

Field Type Description Default Mandatory Accepted values Example values Access
articleId String R,W
articleName String R
externalId String External article id R
amount Double Amount of this article for a single bundled article Post/Put R,W
isStock Boolean Is article is of type stock R
stockWarning Double Warning for low stock level R
stock Double Number of articles in stock R
reserved Double Number of articles reserved. Number of available = stock - reserved R
type String Stock means it's a physical product and service means it's work and lacks stock-amount Post Stock, Service R,W
unitName String R
stockPlace String R
buyPrice Double R
buyPriceShipment Double R
buyPriceMisc Double R
buyPriceCurrency String R
supplierId Long R
supplierName String R
supplierArticleId String R

CreatePurchaseOrderArticle

Field Type Description Default Mandatory Accepted values Example values Access
id Long Unique id for purchase order row R
articleId String Unique article id for the new article POST R,W
articleName String Name of article R,W
supplierArticleId String Supplier´s article id R,W
orderId Long Purchase order id R,W
deliveredAmount Double Delivered amount of the purchase order article. This will be the initial stock value for the newly created article R,W
purchasePrice Double Purchase price R,W
unit String Unit of the article R,W

CustomField

Field Type Description Default Mandatory Accepted values Example values Access
name String Post R,W
type String Post String, Number, Int, Long, Float, Double Boolean, Date, Json, JsonArray, Email R,W
value String Post R,W
validValues List R

CustomFieldValidValue

Field Type Description Default Mandatory Accepted values Example values Access
value String R
description String R

MoveOpenPurchaseOrderArticle

Field Type Description Default Mandatory Accepted values Example values Access
articleId String PUT R,W
supplierId Long PUT R,W
orderId Long PUT R,W
amount Double PUT R,W
price Double PUT R,W
bundleParts List Only mandatory if article is bundled PUT R,W

OpenPurchaseOrderArticleRequest

Field Type Description Default Mandatory Accepted values Example values Access
articleId String POST R,W
amount double R,W

OpenPurchaseOrderArticleResponse

Field Type Description Default Mandatory Accepted values Example values Access
articleId String R
articleName String R
supplierId Long R
supplierName String R
orderedAmount Double R
purchasePrice Double Total purchase price including shipment and misc costs R
shipmentPrice Double R
miscPrice Double R
currency String R
rate Double R
partAmount Double R
bundled Boolean R
bundleParts List R
orders List R

OpenPurchaseOrderArticlesResponse

Field Type Description Default Mandatory Accepted values Example values Access
page int R
pages int R
pageSize int R
articlesCount int R
articles List R

OrderedArticle

Field Type Description Default Mandatory Accepted values Example values Access
article Article R,W
orderId Long R,W
poReference String R,W
state Integer R,W

OrderedArticlesResponse

Field Type Description Default Mandatory Accepted values Example values Access
page int R
pages int R
pageSize int R
articlesCount int R
since long R
articles List R

Price

Field Type Description Default Mandatory Accepted values Example values Access
listId Long Write only with POST Post R,W
listExternalId String External id of pricelist R
articleId String Write only with POST Post R,W
fromQuantity double Write only with POST 0 R,W
price Double To remove a price, send null to server 0 R,W

ProductionOrderPurchaseOrderLight

Field Type Description Default Mandatory Accepted values Example values Access
productionOrderId Long R,W
articles List List of PurchaseOrderArticleLight R,W

PurchaseOrder

Field Type Description Default Mandatory Accepted values Example values Access
id long R
storeId long R
poReference String Must be a unique id POST R,W
supplierId Long POST R,W
supplierName String R
orderSentDate Date R
deliveryDate Date POST R,W
confirmedDeliveryDate Date R,W
deliveredDate Date R
paymentTerms String Payment terms code R,W
paymentTermsDescription String Payment terms description R
deliveryTerms String Delivery terms code R,W
deliveryTermsDescription String Delivery terms description R
deliveryContact String R,W
deliveryCompany String R,W
deliveryPhone String R,W
deliveryAddress String POST R,W
deliveryAddress2 String R,W
deliveryCity String POST R,W
deliveryZip String POST R,W
deliveryCountry String POST R,W
contactPerson String POST R,W
contactEmail String POST R,W
productCount Integer R
state Integer NEW = 0,
SENT = 1,
RECEIVED = 2,
FINISHED = 3,
CANCELLED = 4
R,W
supplierOrderId String R,W
customerOrderId Long R,W
productionOrderId Long R,W
message String R,W
isPickNPack Boolean false R,W
comment String R,W
externalInvoiceReference String R,W
goodsMarking String R,W
orderValue Double Order value based on the supplier's currency R
orderValueCurrency String Supplier's currency for the order value R
orderValueStore Double Order value based on the store's currency R
articles List List of PurchaseOrderArticles R,W

PurchaseOrderArticle

Field Type Description Default Mandatory Accepted values Example values Access
id Long id is created by system, but must be supplied when updating order or matching product row won´t be found PUT R
articleId String Mandatory if this is not a freetext row. If this is a freetext row all fields except articleName is ignored POST, DELETE R,W
articleName String Name of article, or freetext row if articleId is missing R,W
supplierArticleId String If omitted, article id from supplier is used R,W
orderedAmount Double 0 R,W
deliveredAmount Double 0 R,W
availableAmount Double 0 R
stockWarning Double 0 R
barcode String R
barcodeType String EAN EAN, CODE128, QR, UPC R
purchasePrice Double If omitted, price from supplier is used 0 R,W
purchasePriceMisc Double If omitted, price from supplier is used 0 R,W
purchasePriceShipment Double If omitted, price from supplier is used 0 R,W
rate Double R
description String R,W
unit String R
type String Stock means it's a physical product and service means it's work and lacks stock-amount Stock, Service R
stock Boolean True means it's a physical article in stock and false means it's an article that needs to be ordered from supplier R
batches List If an article contains batches or serial numbers and this should be defined in the purchase order this list contains that information. If this list is null, no updates are done. Otherwise the content of this list replaces existing list R,W
units List List of units connected to the article, with factor and barcode. This does not contain information about the main unit on the article R
orderedAmountWithUnits String If article contains multiple units this string represents the most optimal package variants R

PurchaseOrderArticleBatch

Field Type Description Default Mandatory Accepted values Example values Access
batchId String batch-id or serial-nr must be set, Write only with POST Post R,W
serialNr String batch-id or serial-nr must be set, Write only with POST Post R,W
orderedAmount Double 1 R,W
deliveredAmount Double 1 R,W
bestBefore Long ms since 1970, Write only with POST R,W

PurchaseOrderArticleLight

Field Type Description Default Mandatory Accepted values Example values Access
articleId String Mandatory if this is not a freetext row. If this is a freetext row all fields except articleName is ignored POST, DELETE R,W
orderedAmount Double 0 R,W
storeId Long R,W

PurchaseOrderArticlesRequest

Field Type Description Default Mandatory Accepted values Example values Access
orderId Long Order on which the articles are added. If null, a new order is created R,W
supplierId Long Should point to an existing supplier if a new order is created R,W
articles List List of articles to add to order R,W

PurchaseOrderDeliveryArticle

Field Type Description Default Mandatory Accepted values Example values Access
id Long Purchase Order Article id POST R,W
deliveredAmount Double If there are batches, this field must be the total delivered for all batches and serialnumbers in the request 0 R,W
batches List List of possible PurchaseOrderDeliveryArticleBatches. Ignored if articleId is not set R,W

PurchaseOrderDeliveryArticleBatch

Field Type Description Default Mandatory Accepted values Example values Access
batchId String batch-id or serial-nr must be set, Write only with POST Post R,W
serialNr String batch-id or serial-nr must be set, Write only with POST Post R,W
deliveredAmount double 1 R,W
barcode String Write only with POST R,W
bestBefore Long ms since 1970, Write only with POST R,W

PurchaseOrderId

Field Type Description Default Mandatory Accepted values Example values Access
id Long R,W
poReference String R,W

PurchaseOrderLight

Field Type Description Default Mandatory Accepted values Example values Access
customerOrderId Long R,W
articles List List of PurchaseOrderArticleLight R,W

PurchaseOrderRate

Field Type Description Default Mandatory Accepted values Example values Access
rate Double R,W

PurchaseOrderRef

Field Type Description Default Mandatory Accepted values Example values Access
poReference String Next available purchase order reference R

PurchaseOrdersResponse

Field Type Description Default Mandatory Accepted values Example values Access
page int R
pages int R
pageSize int R
ordersCount int R
orders List R

Receivers

Field Type Description Default Mandatory Accepted values Example values Access
to String Main receiver of email POST, PUT R,W
ccList List Copy receiver of email R,W

SupplierArticle

Field Type Description Default Mandatory Accepted values Example values Access
supplier Long if not null, must point to an existing supplier R,W
supplierName String if not null, must point to an existing supplier R,W
supplierArticleId String R,W
supplierAutomaticOrder boolean R
supplierBuyPrice Double Total buy price including shipment and misc costs R,W
supplierBuyPriceShipment Double R,W
supplierBuyPriceMisc Double R,W
supplierBuyCurrency String If omitted, supplier's currency is used. If supplier is missing, it defaults to store's currency Store currency R,W
supplierBuyRate Double If supplier's currency differ from store's currency, provide an exchange rate. If rate is omitted, the supplier's rate is used. If supplier is missing, it defaults to 1.0 1.0 R,W

Unit

Field Type Description Default Mandatory Accepted values Example values Access
id Long R,W
externalId String R
name String Name of unit R,W

VerifyProduct

Field Type Description Default Mandatory Accepted values Example values Access
articleId String R
purchasePrice Double R,W
purchasePriceShipment Double R,W
purchasePriceMisc Double R,W

VerifyProducts

Field Type Description Default Mandatory Accepted values Example values Access
verify Boolean Set this flag to true if state should be changed on purchase order to finished true W
externalInvoiceReference String R,W
products List R,W