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": 1635, "batchId": "batchId", "barcode": "barcode" }], "id": 4299 }
Successfull response:

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

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": 7194, "productionOrderId": 2043, "deliveryTermsDescription": "deliveryTermsDescription", "customerOrderId": 9846, "contactPerson": "contactPerson", "deliveryZip": "deliveryZip", "productCount": 8716, "orderValue": 9001.256348589395, "confirmedDeliveryDate": 1714058507378, "externalInvoiceReference": "externalInvoiceReference", "orderValueCurrency": "orderValueCurrency", "deliveredDate": 1714058507378, "deliveryAddress": "deliveryAddress", "orderSentDate": 1714058507378, "deliveryContact": "deliveryContact", "id": 8634, "state": 3732, "deliveryDate": 1714058507378, "paymentTerms": "paymentTerms", "supplierName": "supplierName", "deliveryCity": "deliveryCity", "deliveryTerms": "deliveryTerms", "goodsMarking": "goodsMarking", "contactEmail": "contactEmail", "isPickNPack": "false", "deliveryAddress2": "deliveryAddress2", "orderValueStore": 1130.325747725609, "storeId": 7418, "deliveryCompany": "deliveryCompany", "message": "message", "deliveryCountry": "deliveryCountry", "comment": "comment", "articles": [{ "deliveredAmount": "0", "articleName": "articleName", "purchasePriceMisc": "0", "articleId": "articleId", "description": "description", "purchasePrice": "0", "units": [{ "unit": { "name": "name", "externalId": "externalId", "id": 4753 }, "articleId": "articleId", "storegroupId": 7643, "convert": 222.60619653695522, "barcode": "barcode" }], "type": "type", "batches": [{ "deliveredAmount": "1", "serialNr": "serialNr", "bestBefore": 174, "batchId": "batchId", "orderedAmount": "1" }], "unit": "unit", "availableAmount": "0", "rate": 5884.125180372342, "supplierArticleId": "supplierArticleId", "purchasePriceShipment": "0", "id": 4452, "orderedAmount": "0", "stock": false, "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": 4935, "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": 3515, "pages": 2304, "pageSize": 9591, "orders": [{ "paymentTermsDescription": "paymentTermsDescription", "deliveryPhone": "deliveryPhone", "supplierOrderId": "supplierOrderId", "supplierId": 2025, "productionOrderId": 8572, "deliveryTermsDescription": "deliveryTermsDescription", "customerOrderId": 732, "contactPerson": "contactPerson", "deliveryZip": "deliveryZip", "productCount": 3261, "orderValue": 1432.4547962217682, "confirmedDeliveryDate": 1714058507381, "externalInvoiceReference": "externalInvoiceReference", "orderValueCurrency": "orderValueCurrency", "deliveredDate": 1714058507381, "deliveryAddress": "deliveryAddress", "orderSentDate": 1714058507381, "deliveryContact": "deliveryContact", "id": 3787, "state": 7856, "deliveryDate": 1714058507381, "paymentTerms": "paymentTerms", "supplierName": "supplierName", "deliveryCity": "deliveryCity", "deliveryTerms": "deliveryTerms", "goodsMarking": "goodsMarking", "contactEmail": "contactEmail", "isPickNPack": "false", "deliveryAddress2": "deliveryAddress2", "orderValueStore": 7503.952027250615, "storeId": 4508, "deliveryCompany": "deliveryCompany", "message": "message", "deliveryCountry": "deliveryCountry", "comment": "comment", "articles": [{ "deliveredAmount": "0", "articleName": "articleName", "purchasePriceMisc": "0", "articleId": "articleId", "description": "description", "purchasePrice": "0", "units": [{ "unit": { "name": "name", "externalId": "externalId", "id": 5173 }, "articleId": "articleId", "storegroupId": 2503, "convert": 7326.474311271145, "barcode": "barcode" }], "type": "type", "batches": [{ "deliveredAmount": "1", "serialNr": "serialNr", "bestBefore": 1406, "batchId": "batchId", "orderedAmount": "1" }], "unit": "unit", "availableAmount": "0", "rate": 1276.9574461395239, "supplierArticleId": "supplierArticleId", "purchasePriceShipment": "0", "id": 9508, "orderedAmount": "0", "stock": true, "orderedAmountWithUnits": "orderedAmountWithUnits", "stockWarning": "0" }], "poReference": "poReference" }], "page": 7799 }

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": 5616, "pages": 812, "pageSize": 7392, "orders": [{ "paymentTermsDescription": "paymentTermsDescription", "deliveryPhone": "deliveryPhone", "supplierOrderId": "supplierOrderId", "supplierId": 72, "productionOrderId": 2867, "deliveryTermsDescription": "deliveryTermsDescription", "customerOrderId": 9585, "contactPerson": "contactPerson", "deliveryZip": "deliveryZip", "productCount": 1865, "orderValue": 5697.188859768963, "confirmedDeliveryDate": 1714058507382, "externalInvoiceReference": "externalInvoiceReference", "orderValueCurrency": "orderValueCurrency", "deliveredDate": 1714058507382, "deliveryAddress": "deliveryAddress", "orderSentDate": 1714058507382, "deliveryContact": "deliveryContact", "id": 9739, "state": 763, "deliveryDate": 1714058507382, "paymentTerms": "paymentTerms", "supplierName": "supplierName", "deliveryCity": "deliveryCity", "deliveryTerms": "deliveryTerms", "goodsMarking": "goodsMarking", "contactEmail": "contactEmail", "isPickNPack": "false", "deliveryAddress2": "deliveryAddress2", "orderValueStore": 5889.705929331652, "storeId": 3504, "deliveryCompany": "deliveryCompany", "message": "message", "deliveryCountry": "deliveryCountry", "comment": "comment", "articles": [{ "deliveredAmount": "0", "articleName": "articleName", "purchasePriceMisc": "0", "articleId": "articleId", "description": "description", "purchasePrice": "0", "units": [{ "unit": { "name": "name", "externalId": "externalId", "id": 3270 }, "articleId": "articleId", "storegroupId": 6188, "convert": 3110.203748053456, "barcode": "barcode" }], "type": "type", "batches": [{ "deliveredAmount": "1", "serialNr": "serialNr", "bestBefore": 7797, "batchId": "batchId", "orderedAmount": "1" }], "unit": "unit", "availableAmount": "0", "rate": 7719.956610227608, "supplierArticleId": "supplierArticleId", "purchasePriceShipment": "0", "id": 1011, "orderedAmount": "0", "stock": true, "orderedAmountWithUnits": "orderedAmountWithUnits", "stockWarning": "0" }], "poReference": "poReference" }], "page": 7794 }

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": 3233, "pages": 529, "pageSize": 8768, "orders": [{ "paymentTermsDescription": "paymentTermsDescription", "deliveryPhone": "deliveryPhone", "supplierOrderId": "supplierOrderId", "supplierId": 7686, "productionOrderId": 9380, "deliveryTermsDescription": "deliveryTermsDescription", "customerOrderId": 5807, "contactPerson": "contactPerson", "deliveryZip": "deliveryZip", "productCount": 5399, "orderValue": 5450.471922466883, "confirmedDeliveryDate": 1714058507383, "externalInvoiceReference": "externalInvoiceReference", "orderValueCurrency": "orderValueCurrency", "deliveredDate": 1714058507383, "deliveryAddress": "deliveryAddress", "orderSentDate": 1714058507383, "deliveryContact": "deliveryContact", "id": 9964, "state": 5131, "deliveryDate": 1714058507383, "paymentTerms": "paymentTerms", "supplierName": "supplierName", "deliveryCity": "deliveryCity", "deliveryTerms": "deliveryTerms", "goodsMarking": "goodsMarking", "contactEmail": "contactEmail", "isPickNPack": "false", "deliveryAddress2": "deliveryAddress2", "orderValueStore": 6469.127607459086, "storeId": 3059, "deliveryCompany": "deliveryCompany", "message": "message", "deliveryCountry": "deliveryCountry", "comment": "comment", "articles": [{ "deliveredAmount": "0", "articleName": "articleName", "purchasePriceMisc": "0", "articleId": "articleId", "description": "description", "purchasePrice": "0", "units": [{ "unit": { "name": "name", "externalId": "externalId", "id": 2127 }, "articleId": "articleId", "storegroupId": 7675, "convert": 1064.066373032746, "barcode": "barcode" }], "type": "type", "batches": [{ "deliveredAmount": "1", "serialNr": "serialNr", "bestBefore": 5432, "batchId": "batchId", "orderedAmount": "1" }], "unit": "unit", "availableAmount": "0", "rate": 3062.4693410806103, "supplierArticleId": "supplierArticleId", "purchasePriceShipment": "0", "id": 5776, "orderedAmount": "0", "stock": false, "orderedAmountWithUnits": "orderedAmountWithUnits", "stockWarning": "0" }], "poReference": "poReference" }], "page": 5104 }

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": 5627, "pages": 9221, "pageSize": 8459, "orders": [{ "paymentTermsDescription": "paymentTermsDescription", "deliveryPhone": "deliveryPhone", "supplierOrderId": "supplierOrderId", "supplierId": 5698, "productionOrderId": 7667, "deliveryTermsDescription": "deliveryTermsDescription", "customerOrderId": 8264, "contactPerson": "contactPerson", "deliveryZip": "deliveryZip", "productCount": 1805, "orderValue": 4067.00090278705, "confirmedDeliveryDate": 1714058507384, "externalInvoiceReference": "externalInvoiceReference", "orderValueCurrency": "orderValueCurrency", "deliveredDate": 1714058507384, "deliveryAddress": "deliveryAddress", "orderSentDate": 1714058507384, "deliveryContact": "deliveryContact", "id": 6927, "state": 4505, "deliveryDate": 1714058507384, "paymentTerms": "paymentTerms", "supplierName": "supplierName", "deliveryCity": "deliveryCity", "deliveryTerms": "deliveryTerms", "goodsMarking": "goodsMarking", "contactEmail": "contactEmail", "isPickNPack": "false", "deliveryAddress2": "deliveryAddress2", "orderValueStore": 6369.505587674994, "storeId": 9895, "deliveryCompany": "deliveryCompany", "message": "message", "deliveryCountry": "deliveryCountry", "comment": "comment", "articles": [{ "deliveredAmount": "0", "articleName": "articleName", "purchasePriceMisc": "0", "articleId": "articleId", "description": "description", "purchasePrice": "0", "units": [{ "unit": { "name": "name", "externalId": "externalId", "id": 1163 }, "articleId": "articleId", "storegroupId": 4881, "convert": 9872.249949554025, "barcode": "barcode" }], "type": "type", "batches": [{ "deliveredAmount": "1", "serialNr": "serialNr", "bestBefore": 2674, "batchId": "batchId", "orderedAmount": "1" }], "unit": "unit", "availableAmount": "0", "rate": 3167.42254276992, "supplierArticleId": "supplierArticleId", "purchasePriceShipment": "0", "id": 2657, "orderedAmount": "0", "stock": true, "orderedAmountWithUnits": "orderedAmountWithUnits", "stockWarning": "0" }], "poReference": "poReference" }], "page": 7527 }

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": 6070, "pages": 6918, "pageSize": 1021, "orders": [{ "paymentTermsDescription": "paymentTermsDescription", "deliveryPhone": "deliveryPhone", "supplierOrderId": "supplierOrderId", "supplierId": 903, "productionOrderId": 3695, "deliveryTermsDescription": "deliveryTermsDescription", "customerOrderId": 5210, "contactPerson": "contactPerson", "deliveryZip": "deliveryZip", "productCount": 8036, "orderValue": 6155.227590232346, "confirmedDeliveryDate": 1714058507386, "externalInvoiceReference": "externalInvoiceReference", "orderValueCurrency": "orderValueCurrency", "deliveredDate": 1714058507386, "deliveryAddress": "deliveryAddress", "orderSentDate": 1714058507386, "deliveryContact": "deliveryContact", "id": 4440, "state": 9212, "deliveryDate": 1714058507386, "paymentTerms": "paymentTerms", "supplierName": "supplierName", "deliveryCity": "deliveryCity", "deliveryTerms": "deliveryTerms", "goodsMarking": "goodsMarking", "contactEmail": "contactEmail", "isPickNPack": "false", "deliveryAddress2": "deliveryAddress2", "orderValueStore": 3387.629589163055, "storeId": 6113, "deliveryCompany": "deliveryCompany", "message": "message", "deliveryCountry": "deliveryCountry", "comment": "comment", "articles": [{ "deliveredAmount": "0", "articleName": "articleName", "purchasePriceMisc": "0", "articleId": "articleId", "description": "description", "purchasePrice": "0", "units": [{ "unit": { "name": "name", "externalId": "externalId", "id": 829 }, "articleId": "articleId", "storegroupId": 7125, "convert": 849.4488469428574, "barcode": "barcode" }], "type": "type", "batches": [{ "deliveredAmount": "1", "serialNr": "serialNr", "bestBefore": 8973, "batchId": "batchId", "orderedAmount": "1" }], "unit": "unit", "availableAmount": "0", "rate": 3901.849100148711, "supplierArticleId": "supplierArticleId", "purchasePriceShipment": "0", "id": 9785, "orderedAmount": "0", "stock": false, "orderedAmountWithUnits": "orderedAmountWithUnits", "stockWarning": "0" }], "poReference": "poReference" }], "page": 1944 }

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": 8206, "pages": 7401, "pageSize": 3094, "orders": [{ "paymentTermsDescription": "paymentTermsDescription", "deliveryPhone": "deliveryPhone", "supplierOrderId": "supplierOrderId", "supplierId": 6972, "productionOrderId": 6451, "deliveryTermsDescription": "deliveryTermsDescription", "customerOrderId": 6124, "contactPerson": "contactPerson", "deliveryZip": "deliveryZip", "productCount": 4133, "orderValue": 1218.185520457139, "confirmedDeliveryDate": 1714058507387, "externalInvoiceReference": "externalInvoiceReference", "orderValueCurrency": "orderValueCurrency", "deliveredDate": 1714058507387, "deliveryAddress": "deliveryAddress", "orderSentDate": 1714058507387, "deliveryContact": "deliveryContact", "id": 1179, "state": 8409, "deliveryDate": 1714058507387, "paymentTerms": "paymentTerms", "supplierName": "supplierName", "deliveryCity": "deliveryCity", "deliveryTerms": "deliveryTerms", "goodsMarking": "goodsMarking", "contactEmail": "contactEmail", "isPickNPack": "false", "deliveryAddress2": "deliveryAddress2", "orderValueStore": 1471.8719028854932, "storeId": 100, "deliveryCompany": "deliveryCompany", "message": "message", "deliveryCountry": "deliveryCountry", "comment": "comment", "articles": [{ "deliveredAmount": "0", "articleName": "articleName", "purchasePriceMisc": "0", "articleId": "articleId", "description": "description", "purchasePrice": "0", "units": [{ "unit": { "name": "name", "externalId": "externalId", "id": 7819 }, "articleId": "articleId", "storegroupId": 4257, "convert": 316.84444802633107, "barcode": "barcode" }], "type": "type", "batches": [{ "deliveredAmount": "1", "serialNr": "serialNr", "bestBefore": 2, "batchId": "batchId", "orderedAmount": "1" }], "unit": "unit", "availableAmount": "0", "rate": 5975.5683374524815, "supplierArticleId": "supplierArticleId", "purchasePriceShipment": "0", "id": 8692, "orderedAmount": "0", "stock": false, "orderedAmountWithUnits": "orderedAmountWithUnits", "stockWarning": "0" }], "poReference": "poReference" }], "page": 2001 }

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": 5936, "pages": 7999, "pageSize": 4780, "orders": [{ "paymentTermsDescription": "paymentTermsDescription", "deliveryPhone": "deliveryPhone", "supplierOrderId": "supplierOrderId", "supplierId": 5469, "productionOrderId": 3842, "deliveryTermsDescription": "deliveryTermsDescription", "customerOrderId": 9388, "contactPerson": "contactPerson", "deliveryZip": "deliveryZip", "productCount": 9242, "orderValue": 5026.730742007127, "confirmedDeliveryDate": 1714058507387, "externalInvoiceReference": "externalInvoiceReference", "orderValueCurrency": "orderValueCurrency", "deliveredDate": 1714058507387, "deliveryAddress": "deliveryAddress", "orderSentDate": 1714058507387, "deliveryContact": "deliveryContact", "id": 4282, "state": 390, "deliveryDate": 1714058507387, "paymentTerms": "paymentTerms", "supplierName": "supplierName", "deliveryCity": "deliveryCity", "deliveryTerms": "deliveryTerms", "goodsMarking": "goodsMarking", "contactEmail": "contactEmail", "isPickNPack": "false", "deliveryAddress2": "deliveryAddress2", "orderValueStore": 9781.930585134138, "storeId": 7146, "deliveryCompany": "deliveryCompany", "message": "message", "deliveryCountry": "deliveryCountry", "comment": "comment", "articles": [{ "deliveredAmount": "0", "articleName": "articleName", "purchasePriceMisc": "0", "articleId": "articleId", "description": "description", "purchasePrice": "0", "units": [{ "unit": { "name": "name", "externalId": "externalId", "id": 3913 }, "articleId": "articleId", "storegroupId": 9201, "convert": 4539.741301108651, "barcode": "barcode" }], "type": "type", "batches": [{ "deliveredAmount": "1", "serialNr": "serialNr", "bestBefore": 4115, "batchId": "batchId", "orderedAmount": "1" }], "unit": "unit", "availableAmount": "0", "rate": 6828.139087818798, "supplierArticleId": "supplierArticleId", "purchasePriceShipment": "0", "id": 2902, "orderedAmount": "0", "stock": false, "orderedAmountWithUnits": "orderedAmountWithUnits", "stockWarning": "0" }], "poReference": "poReference" }], "page": 9470 }

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": 9876, "pageSize": 365, "page": 2426, "articlesCount": 564, "articles": [{ "supplierAutomaticOrder": false, "supplierBuyPriceMisc": 2795.251394349579, "supplierExternalId": "supplierExternalId", "type": "type", "price": 2192.52682998085, "supplier": 5366, "supplierArticleId": "supplierArticleId", "vatAccount": 2160, "links": [{ "name": "name", "type": "type", "url": "url" }], "stock": "true", "barcode": "barcode", "height": 4880.616220385119, "bundled": "false", "vat": 7406.2129026239345, "nextDeliveryDate": 1546, "active": "true", "weight": 2207.192892696176, "tags": [{ "name": "name", "externalId": "externalId", "id": 1433, "desc": "desc" }], "supplierBuyRate": 3360.1932302629466, "unit": "st", "reserved": 2342.49153747172, "name": "name", "parts": [{ "buyPrice": 8121.611209980265, "supplierName": "supplierName", "amount": 3599.607545876913, "articleName": "articleName", "supplierId": 5202, "unitName": "unitName", "articleId": "articleId", "externalId": "externalId", "stockPlace": "stockPlace", "type": "type", "buyPriceCurrency": "buyPriceCurrency", "reserved": 288.4525914387848, "buyPriceShipment": 6292.168414392195, "buyPriceMisc": 4614.86848765025, "supplierArticleId": "supplierArticleId", "stock": 5168.3846533058095, "isStock": false, "stockWarning": 8212.744506091149 }], "supplierBuyPriceShipment": 1938.1331324266116, "manufacturerArticleId": "manufacturerArticleId", "imageLastUpdated": 8810, "orderedAmount": 8398.001385435648, "stockWarning": 8442.5972031598, "customFields": [{ "name": "name", "type": "type", "validValues": [{ "description": "description", "value": "value" }], "value": "value" }], "barcodeType": "EAN", "description": "description", "stockPlace": "stockPlace", "criticalLevel": 7584.732239700362, "manufacturer": "manufacturer", "batches": { "totalSerialNumbersReserved": 4050.523841345606, "batches": [{ "serialNr": "serialNr", "amount": "1", "articleName": "articleName", "reserved": 4470.676371707554, "bestBefore": 1257, "articleId": "articleId", "batchId": "batchId", "barcode": "barcode" }], "totalBatchesInStock": 9777.184489255404, "totalSerialNumbersInStock": 5235.33483858993, "serialNumbers": [{ "serialNr": "serialNr", "amount": "1", "articleName": "articleName", "reserved": 4839.171975417052, "bestBefore": 4911, "articleId": "articleId", "batchId": "batchId", "barcode": "barcode" }], "totalBatchesReserved": 9704.38950021895, "totalBatches": 7080, "totalSerialNumbers": 6927 }, "webshopArticle": "false", "availableAmount": 4110.981193031662, "orderLevel": 7016.613468100308, "prices": [{ "listId": 2793, "price": "0", "articleId": "articleId", "fromQuantity": "0", "listExternalId": "listExternalId" }], "supplierArticles": [{ "supplierName": "supplierName", "supplierAutomaticOrder": false, "supplierBuyPriceMisc": 3140.113960223859, "supplierBuyRate": "1.0", "supplierBuyPrice": 9075.562289066982, "supplier": 8339, "supplierArticleId": "supplierArticleId", "supplierBuyCurrency": "Store currency", "supplierBuyPriceShipment": 8450.905915051646 }], "automaticOrder": true, "supplierName": "supplierName", "deliveredAmount": 7756.840807063287, "amount": 3997.564129314376, "articleId": "articleId", "externalId": "externalId", "depth": 7952.053116134403, "supplierBuyPrice": 3214.1992124265307, "supplierBuyCurrency": "supplierBuyCurrency", "width": 3823.6566177596833, "category": "övrigt" }], "since": 8296 }

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": 5194, "pageSize": 9703, "page": 9357, "articlesCount": 7709, "articles": [{ "supplierName": "supplierName", "articleName": "articleName", "supplierId": 8223, "shipmentPrice": 9051.154644192635, "bundled": true, "articleId": "articleId", "miscPrice": 2861.13174244098, "purchasePrice": 7749.499611926446, "partAmount": 7008.0887932904, "rate": 6483.879970177619, "bundleParts": [{ "supplierName": "supplierName", "articleName": "articleName", "supplierId": 6247, "shipmentPrice": 6830.121972482769, "bundled": false, "articleId": "articleId", "miscPrice": 393.81541603382476, "purchasePrice": 7693.698372443328, "partAmount": 8342.195031863735, "rate": 2409.288908081304, "bundleParts": [{ "supplierName": "supplierName", "articleName": "articleName", "supplierId": 9221, "shipmentPrice": 2395.7603868389865, "bundled": false, "articleId": "articleId", "miscPrice": 7009.207054752835, "purchasePrice": 6546.992814602731, "partAmount": 2573.835641363651, "rate": 8381.461917770815, "bundleParts": [], "currency": "currency", "orders": [], "orderedAmount": 6631.919599362311 }], "currency": "currency", "orders": [{ "id": 8495, "poReference": "poReference" }], "orderedAmount": 6544.111339302847 }], "currency": "currency", "orders": [{ "id": 5116, "poReference": "poReference" }], "orderedAmount": 3787.6965115253447 }] }

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": 8558, "pages": 9514, "pageSize": 9588, "orders": [{ "paymentTermsDescription": "paymentTermsDescription", "deliveryPhone": "deliveryPhone", "supplierOrderId": "supplierOrderId", "supplierId": 881, "productionOrderId": 9679, "deliveryTermsDescription": "deliveryTermsDescription", "customerOrderId": 2519, "contactPerson": "contactPerson", "deliveryZip": "deliveryZip", "productCount": 2455, "orderValue": 4787.447490959796, "confirmedDeliveryDate": 1714058507390, "externalInvoiceReference": "externalInvoiceReference", "orderValueCurrency": "orderValueCurrency", "deliveredDate": 1714058507390, "deliveryAddress": "deliveryAddress", "orderSentDate": 1714058507390, "deliveryContact": "deliveryContact", "id": 6009, "state": 217, "deliveryDate": 1714058507390, "paymentTerms": "paymentTerms", "supplierName": "supplierName", "deliveryCity": "deliveryCity", "deliveryTerms": "deliveryTerms", "goodsMarking": "goodsMarking", "contactEmail": "contactEmail", "isPickNPack": "false", "deliveryAddress2": "deliveryAddress2", "orderValueStore": 86.99843984374733, "storeId": 8747, "deliveryCompany": "deliveryCompany", "message": "message", "deliveryCountry": "deliveryCountry", "comment": "comment", "articles": [{ "deliveredAmount": "0", "articleName": "articleName", "purchasePriceMisc": "0", "articleId": "articleId", "description": "description", "purchasePrice": "0", "units": [{ "unit": { "name": "name", "externalId": "externalId", "id": 4751 }, "articleId": "articleId", "storegroupId": 8367, "convert": 8044.150596448493, "barcode": "barcode" }], "type": "type", "batches": [{ "deliveredAmount": "1", "serialNr": "serialNr", "bestBefore": 4040, "batchId": "batchId", "orderedAmount": "1" }], "unit": "unit", "availableAmount": "0", "rate": 68.4887487861996, "supplierArticleId": "supplierArticleId", "purchasePriceShipment": "0", "id": 3456, "orderedAmount": "0", "stock": true, "orderedAmountWithUnits": "orderedAmountWithUnits", "stockWarning": "0" }], "poReference": "poReference" }], "page": 2709 }

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": 9171, "pages": 7030, "pageSize": 6783, "orders": [{ "paymentTermsDescription": "paymentTermsDescription", "deliveryPhone": "deliveryPhone", "supplierOrderId": "supplierOrderId", "supplierId": 4154, "productionOrderId": 5243, "deliveryTermsDescription": "deliveryTermsDescription", "customerOrderId": 4070, "contactPerson": "contactPerson", "deliveryZip": "deliveryZip", "productCount": 2728, "orderValue": 3826.0837261207957, "confirmedDeliveryDate": 1714058507391, "externalInvoiceReference": "externalInvoiceReference", "orderValueCurrency": "orderValueCurrency", "deliveredDate": 1714058507391, "deliveryAddress": "deliveryAddress", "orderSentDate": 1714058507391, "deliveryContact": "deliveryContact", "id": 150, "state": 3544, "deliveryDate": 1714058507391, "paymentTerms": "paymentTerms", "supplierName": "supplierName", "deliveryCity": "deliveryCity", "deliveryTerms": "deliveryTerms", "goodsMarking": "goodsMarking", "contactEmail": "contactEmail", "isPickNPack": "false", "deliveryAddress2": "deliveryAddress2", "orderValueStore": 8532.257462458016, "storeId": 3717, "deliveryCompany": "deliveryCompany", "message": "message", "deliveryCountry": "deliveryCountry", "comment": "comment", "articles": [{ "deliveredAmount": "0", "articleName": "articleName", "purchasePriceMisc": "0", "articleId": "articleId", "description": "description", "purchasePrice": "0", "units": [{ "unit": { "name": "name", "externalId": "externalId", "id": 5923 }, "articleId": "articleId", "storegroupId": 1676, "convert": 6724.517458843853, "barcode": "barcode" }], "type": "type", "batches": [{ "deliveredAmount": "1", "serialNr": "serialNr", "bestBefore": 2461, "batchId": "batchId", "orderedAmount": "1" }], "unit": "unit", "availableAmount": "0", "rate": 8561.95985932686, "supplierArticleId": "supplierArticleId", "purchasePriceShipment": "0", "id": 4270, "orderedAmount": "0", "stock": true, "orderedAmountWithUnits": "orderedAmountWithUnits", "stockWarning": "0" }], "poReference": "poReference" }], "page": 3197 }

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": 6096, "pageSize": 4203, "page": 9782, "articlesCount": 2139, "articles": [{ "orderId": 30, "state": 2116, "article": { "supplierAutomaticOrder": false, "supplierBuyPriceMisc": 9912.76704545661, "supplierExternalId": "supplierExternalId", "type": "type", "price": 5759.307827263395, "supplier": 6072, "supplierArticleId": "supplierArticleId", "vatAccount": 7644, "links": [{ "name": "name", "type": "type", "url": "url" }], "stock": "true", "barcode": "barcode", "height": 3929.600650845557, "bundled": "false", "vat": 8147.284983552102, "nextDeliveryDate": 8436, "active": "true", "weight": 299.6002669959319, "tags": [{ "name": "name", "externalId": "externalId", "id": 7653, "desc": "desc" }], "supplierBuyRate": 4965.283167706813, "unit": "st", "reserved": 1324.996579748916, "name": "name", "parts": [{ "buyPrice": 5664.918294734521, "supplierName": "supplierName", "amount": 8694.466530729393, "articleName": "articleName", "supplierId": 1214, "unitName": "unitName", "articleId": "articleId", "externalId": "externalId", "stockPlace": "stockPlace", "type": "type", "buyPriceCurrency": "buyPriceCurrency", "reserved": 1160.0792929658187, "buyPriceShipment": 5889.250218728591, "buyPriceMisc": 7872.390079129389, "supplierArticleId": "supplierArticleId", "stock": 8482.334636024902, "isStock": true, "stockWarning": 9888.898240352582 }], "supplierBuyPriceShipment": 4784.982292365301, "manufacturerArticleId": "manufacturerArticleId", "imageLastUpdated": 2617, "orderedAmount": 7982.769580779039, "stockWarning": 6850.6696743381335, "customFields": [{ "name": "name", "type": "type", "validValues": [{ "description": "description", "value": "value" }], "value": "value" }], "barcodeType": "EAN", "description": "description", "stockPlace": "stockPlace", "criticalLevel": 9041.933601673325, "manufacturer": "manufacturer", "batches": { "totalSerialNumbersReserved": 3381.4505498644407, "batches": [{ "serialNr": "serialNr", "amount": "1", "articleName": "articleName", "reserved": 4044.8386304992655, "bestBefore": 8987, "articleId": "articleId", "batchId": "batchId", "barcode": "barcode" }], "totalBatchesInStock": 4667.00423959844, "totalSerialNumbersInStock": 9085.96775143022, "serialNumbers": [{ "serialNr": "serialNr", "amount": "1", "articleName": "articleName", "reserved": 3544.189663364643, "bestBefore": 8291, "articleId": "articleId", "batchId": "batchId", "barcode": "barcode" }], "totalBatchesReserved": 314.85130387510105, "totalBatches": 842, "totalSerialNumbers": 1793 }, "webshopArticle": "false", "availableAmount": 5288.414248946195, "orderLevel": 7.1585113644812015, "prices": [{ "listId": 4705, "price": "0", "articleId": "articleId", "fromQuantity": "0", "listExternalId": "listExternalId" }], "supplierArticles": [{ "supplierName": "supplierName", "supplierAutomaticOrder": false, "supplierBuyPriceMisc": 8701.547937536334, "supplierBuyRate": "1.0", "supplierBuyPrice": 3791.120103969552, "supplier": 1306, "supplierArticleId": "supplierArticleId", "supplierBuyCurrency": "Store currency", "supplierBuyPriceShipment": 4260.152036000752 }], "automaticOrder": true, "supplierName": "supplierName", "deliveredAmount": 9640.66433350282, "amount": 1819.5358447183885, "articleId": "articleId", "externalId": "externalId", "depth": 5507.541163622062, "supplierBuyPrice": 2989.82674051815, "supplierBuyCurrency": "supplierBuyCurrency", "width": 3957.0178609579907, "category": "övrigt" }, "poReference": "poReference" }], "since": 94 }

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": 9298, "pageSize": 8260, "page": 2576, "articlesCount": 7799, "articles": [{ "orderId": 1218, "state": 5972, "article": { "supplierAutomaticOrder": true, "supplierBuyPriceMisc": 1459.7256028984064, "supplierExternalId": "supplierExternalId", "type": "type", "price": 1852.283216868994, "supplier": 2660, "supplierArticleId": "supplierArticleId", "vatAccount": 6662, "links": [{ "name": "name", "type": "type", "url": "url" }], "stock": "true", "barcode": "barcode", "height": 3999.5755964335476, "bundled": "false", "vat": 5845.375547017755, "nextDeliveryDate": 581, "active": "true", "weight": 7206.679079091709, "tags": [{ "name": "name", "externalId": "externalId", "id": 2552, "desc": "desc" }], "supplierBuyRate": 55.60901796326512, "unit": "st", "reserved": 8737.29997892518, "name": "name", "parts": [{ "buyPrice": 2068.486321686567, "supplierName": "supplierName", "amount": 2004.2688795811225, "articleName": "articleName", "supplierId": 2240, "unitName": "unitName", "articleId": "articleId", "externalId": "externalId", "stockPlace": "stockPlace", "type": "type", "buyPriceCurrency": "buyPriceCurrency", "reserved": 9946.266145579224, "buyPriceShipment": 4572.6476365689805, "buyPriceMisc": 6662.898046705403, "supplierArticleId": "supplierArticleId", "stock": 4657.315908978286, "isStock": false, "stockWarning": 1194.359849987806 }], "supplierBuyPriceShipment": 4737.755595989133, "manufacturerArticleId": "manufacturerArticleId", "imageLastUpdated": 9425, "orderedAmount": 8349.555279456006, "stockWarning": 8429.874751681857, "customFields": [{ "name": "name", "type": "type", "validValues": [{ "description": "description", "value": "value" }], "value": "value" }], "barcodeType": "EAN", "description": "description", "stockPlace": "stockPlace", "criticalLevel": 5326.932164827257, "manufacturer": "manufacturer", "batches": { "totalSerialNumbersReserved": 9254.32751193739, "batches": [{ "serialNr": "serialNr", "amount": "1", "articleName": "articleName", "reserved": 9696.310963931288, "bestBefore": 4465, "articleId": "articleId", "batchId": "batchId", "barcode": "barcode" }], "totalBatchesInStock": 2088.7519507022257, "totalSerialNumbersInStock": 1543.7681943417604, "serialNumbers": [{ "serialNr": "serialNr", "amount": "1", "articleName": "articleName", "reserved": 442.41609034754936, "bestBefore": 9382, "articleId": "articleId", "batchId": "batchId", "barcode": "barcode" }], "totalBatchesReserved": 5669.981308140386, "totalBatches": 6464, "totalSerialNumbers": 8801 }, "webshopArticle": "false", "availableAmount": 7243.517626809536, "orderLevel": 7489.586603037283, "prices": [{ "listId": 7846, "price": "0", "articleId": "articleId", "fromQuantity": "0", "listExternalId": "listExternalId" }], "supplierArticles": [{ "supplierName": "supplierName", "supplierAutomaticOrder": false, "supplierBuyPriceMisc": 7627.112992028735, "supplierBuyRate": "1.0", "supplierBuyPrice": 3518.9932807233613, "supplier": 221, "supplierArticleId": "supplierArticleId", "supplierBuyCurrency": "Store currency", "supplierBuyPriceShipment": 3184.4765738842807 }], "automaticOrder": true, "supplierName": "supplierName", "deliveredAmount": 8622.890823801548, "amount": 217.70585219061167, "articleId": "articleId", "externalId": "externalId", "depth": 3271.6006514991923, "supplierBuyPrice": 2346.8260561074617, "supplierBuyCurrency": "supplierBuyCurrency", "width": 9629.007246377785, "category": "övrigt" }, "poReference": "poReference" }], "since": 6074 }

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": 8954, "productionOrderId": 7564, "customerOrderId": 8434, "contactPerson": "contactPerson", "deliveryZip": "deliveryZip", "confirmedDeliveryDate": 1714058507395, "externalInvoiceReference": "externalInvoiceReference", "deliveryAddress": "deliveryAddress", "deliveryContact": "deliveryContact", "state": 4669, "deliveryDate": 1714058507395, "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": 4200, "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": 585, "productionOrderId": 7036, "deliveryTermsDescription": "deliveryTermsDescription", "customerOrderId": 5481, "contactPerson": "contactPerson", "deliveryZip": "deliveryZip", "productCount": 6434, "orderValue": 9211.393132689935, "confirmedDeliveryDate": 1714058507395, "externalInvoiceReference": "externalInvoiceReference", "orderValueCurrency": "orderValueCurrency", "deliveredDate": 1714058507395, "deliveryAddress": "deliveryAddress", "orderSentDate": 1714058507395, "deliveryContact": "deliveryContact", "id": 8659, "state": 31, "deliveryDate": 1714058507395, "paymentTerms": "paymentTerms", "supplierName": "supplierName", "deliveryCity": "deliveryCity", "deliveryTerms": "deliveryTerms", "goodsMarking": "goodsMarking", "contactEmail": "contactEmail", "isPickNPack": "false", "deliveryAddress2": "deliveryAddress2", "orderValueStore": 7831.197303442804, "storeId": 6093, "deliveryCompany": "deliveryCompany", "message": "message", "deliveryCountry": "deliveryCountry", "comment": "comment", "articles": [{ "deliveredAmount": "0", "articleName": "articleName", "purchasePriceMisc": "0", "articleId": "articleId", "description": "description", "purchasePrice": "0", "units": [{ "unit": { "name": "name", "externalId": "externalId", "id": 7255 }, "articleId": "articleId", "storegroupId": 7806, "convert": 4139.384256586316, "barcode": "barcode" }], "type": "type", "batches": [{ "deliveredAmount": "1", "serialNr": "serialNr", "bestBefore": 2139, "batchId": "batchId", "orderedAmount": "1" }], "unit": "unit", "availableAmount": "0", "rate": 9243.989462116153, "supplierArticleId": "supplierArticleId", "purchasePriceShipment": "0", "id": 2597, "orderedAmount": "0", "stock": true, "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": 7149, "articles": [{ "articleId": "articleId", "orderedAmount": "0", "storeId": 9827 }] }
Successfull response:

{ "ordersCount": 6594, "pages": 1616, "pageSize": 3823, "orders": [{ "paymentTermsDescription": "paymentTermsDescription", "deliveryPhone": "deliveryPhone", "supplierOrderId": "supplierOrderId", "supplierId": 7540, "productionOrderId": 5077, "deliveryTermsDescription": "deliveryTermsDescription", "customerOrderId": 7451, "contactPerson": "contactPerson", "deliveryZip": "deliveryZip", "productCount": 1378, "orderValue": 3757.974696253005, "confirmedDeliveryDate": 1714058507396, "externalInvoiceReference": "externalInvoiceReference", "orderValueCurrency": "orderValueCurrency", "deliveredDate": 1714058507396, "deliveryAddress": "deliveryAddress", "orderSentDate": 1714058507396, "deliveryContact": "deliveryContact", "id": 2294, "state": 8219, "deliveryDate": 1714058507396, "paymentTerms": "paymentTerms", "supplierName": "supplierName", "deliveryCity": "deliveryCity", "deliveryTerms": "deliveryTerms", "goodsMarking": "goodsMarking", "contactEmail": "contactEmail", "isPickNPack": "false", "deliveryAddress2": "deliveryAddress2", "orderValueStore": 6148.239297476755, "storeId": 4022, "deliveryCompany": "deliveryCompany", "message": "message", "deliveryCountry": "deliveryCountry", "comment": "comment", "articles": [{ "deliveredAmount": "0", "articleName": "articleName", "purchasePriceMisc": "0", "articleId": "articleId", "description": "description", "purchasePrice": "0", "units": [{ "unit": { "name": "name", "externalId": "externalId", "id": 5955 }, "articleId": "articleId", "storegroupId": 1264, "convert": 1297.0604307123945, "barcode": "barcode" }], "type": "type", "batches": [{ "deliveredAmount": "1", "serialNr": "serialNr", "bestBefore": 465, "batchId": "batchId", "orderedAmount": "1" }], "unit": "unit", "availableAmount": "0", "rate": 6985.487599453142, "supplierArticleId": "supplierArticleId", "purchasePriceShipment": "0", "id": 3800, "orderedAmount": "0", "stock": false, "orderedAmountWithUnits": "orderedAmountWithUnits", "stockWarning": "0" }], "poReference": "poReference" }], "page": 5816 }

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": 5420, "articles": [{ "articleId": "articleId", "orderedAmount": "0", "storeId": 5767 }] }
Successfull response:

{ "ordersCount": 5762, "pages": 3177, "pageSize": 6223, "orders": [{ "paymentTermsDescription": "paymentTermsDescription", "deliveryPhone": "deliveryPhone", "supplierOrderId": "supplierOrderId", "supplierId": 9318, "productionOrderId": 6123, "deliveryTermsDescription": "deliveryTermsDescription", "customerOrderId": 1137, "contactPerson": "contactPerson", "deliveryZip": "deliveryZip", "productCount": 1666, "orderValue": 334.4981582583295, "confirmedDeliveryDate": 1714058507397, "externalInvoiceReference": "externalInvoiceReference", "orderValueCurrency": "orderValueCurrency", "deliveredDate": 1714058507397, "deliveryAddress": "deliveryAddress", "orderSentDate": 1714058507397, "deliveryContact": "deliveryContact", "id": 2560, "state": 8660, "deliveryDate": 1714058507397, "paymentTerms": "paymentTerms", "supplierName": "supplierName", "deliveryCity": "deliveryCity", "deliveryTerms": "deliveryTerms", "goodsMarking": "goodsMarking", "contactEmail": "contactEmail", "isPickNPack": "false", "deliveryAddress2": "deliveryAddress2", "orderValueStore": 3968.976448019318, "storeId": 6316, "deliveryCompany": "deliveryCompany", "message": "message", "deliveryCountry": "deliveryCountry", "comment": "comment", "articles": [{ "deliveredAmount": "0", "articleName": "articleName", "purchasePriceMisc": "0", "articleId": "articleId", "description": "description", "purchasePrice": "0", "units": [{ "unit": { "name": "name", "externalId": "externalId", "id": 3521 }, "articleId": "articleId", "storegroupId": 5728, "convert": 6595.85075061506, "barcode": "barcode" }], "type": "type", "batches": [{ "deliveredAmount": "1", "serialNr": "serialNr", "bestBefore": 2301, "batchId": "batchId", "orderedAmount": "1" }], "unit": "unit", "availableAmount": "0", "rate": 440.3114752701787, "supplierArticleId": "supplierArticleId", "purchasePriceShipment": "0", "id": 6099, "orderedAmount": "0", "stock": false, "orderedAmountWithUnits": "orderedAmountWithUnits", "stockWarning": "0" }], "poReference": "poReference" }], "page": 9142 }

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": 445, "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": 7375, "productionOrderId": 8359, "deliveryTermsDescription": "deliveryTermsDescription", "customerOrderId": 5965, "contactPerson": "contactPerson", "deliveryZip": "deliveryZip", "productCount": 7463, "orderValue": 5797.205092553321, "confirmedDeliveryDate": 1714058507398, "externalInvoiceReference": "externalInvoiceReference", "orderValueCurrency": "orderValueCurrency", "deliveredDate": 1714058507398, "deliveryAddress": "deliveryAddress", "orderSentDate": 1714058507398, "deliveryContact": "deliveryContact", "id": 167, "state": 5545, "deliveryDate": 1714058507398, "paymentTerms": "paymentTerms", "supplierName": "supplierName", "deliveryCity": "deliveryCity", "deliveryTerms": "deliveryTerms", "goodsMarking": "goodsMarking", "contactEmail": "contactEmail", "isPickNPack": "false", "deliveryAddress2": "deliveryAddress2", "orderValueStore": 8722.453084461566, "storeId": 2333, "deliveryCompany": "deliveryCompany", "message": "message", "deliveryCountry": "deliveryCountry", "comment": "comment", "articles": [{ "deliveredAmount": "0", "articleName": "articleName", "purchasePriceMisc": "0", "articleId": "articleId", "description": "description", "purchasePrice": "0", "units": [{ "unit": { "name": "name", "externalId": "externalId", "id": 7324 }, "articleId": "articleId", "storegroupId": 2082, "convert": 9226.622712081296, "barcode": "barcode" }], "type": "type", "batches": [{ "deliveredAmount": "1", "serialNr": "serialNr", "bestBefore": 9642, "batchId": "batchId", "orderedAmount": "1" }], "unit": "unit", "availableAmount": "0", "rate": 79.81696921233517, "supplierArticleId": "supplierArticleId", "purchasePriceShipment": "0", "id": 2297, "orderedAmount": "0", "stock": false, "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": 403, "orderId": 9403, "articles": [{ "deliveredAmount": "0", "batches": [{ "deliveredAmount": "1", "serialNr": "serialNr", "bestBefore": 4831, "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": 6101, "productionOrderId": 8218, "deliveryTermsDescription": "deliveryTermsDescription", "customerOrderId": 6762, "contactPerson": "contactPerson", "deliveryZip": "deliveryZip", "productCount": 8271, "orderValue": 7337.849176397132, "confirmedDeliveryDate": 1714058507398, "externalInvoiceReference": "externalInvoiceReference", "orderValueCurrency": "orderValueCurrency", "deliveredDate": 1714058507398, "deliveryAddress": "deliveryAddress", "orderSentDate": 1714058507398, "deliveryContact": "deliveryContact", "id": 3379, "state": 4520, "deliveryDate": 1714058507398, "paymentTerms": "paymentTerms", "supplierName": "supplierName", "deliveryCity": "deliveryCity", "deliveryTerms": "deliveryTerms", "goodsMarking": "goodsMarking", "contactEmail": "contactEmail", "isPickNPack": "false", "deliveryAddress2": "deliveryAddress2", "orderValueStore": 1979.2974171810552, "storeId": 2442, "deliveryCompany": "deliveryCompany", "message": "message", "deliveryCountry": "deliveryCountry", "comment": "comment", "articles": [{ "deliveredAmount": "0", "articleName": "articleName", "purchasePriceMisc": "0", "articleId": "articleId", "description": "description", "purchasePrice": "0", "units": [{ "unit": { "name": "name", "externalId": "externalId", "id": 3199 }, "articleId": "articleId", "storegroupId": 1368, "convert": 44.465976565712936, "barcode": "barcode" }], "type": "type", "batches": [{ "deliveredAmount": "1", "serialNr": "serialNr", "bestBefore": 6939, "batchId": "batchId", "orderedAmount": "1" }], "unit": "unit", "availableAmount": "0", "rate": 4767.315441257998, "supplierArticleId": "supplierArticleId", "purchasePriceShipment": "0", "id": 7005, "orderedAmount": "0", "stock": false, "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": 7280.622709485544, "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": 3838.0650422204344, "unit": "unit", "articleName": "articleName", "orderId": 4827, "articleId": "articleId", "supplierArticleId": "supplierArticleId", "purchasePrice": 1204.6788445657307 }
Successfull response:

{ "paymentTermsDescription": "paymentTermsDescription", "deliveryPhone": "deliveryPhone", "supplierOrderId": "supplierOrderId", "supplierId": 7236, "productionOrderId": 3921, "deliveryTermsDescription": "deliveryTermsDescription", "customerOrderId": 2835, "contactPerson": "contactPerson", "deliveryZip": "deliveryZip", "productCount": 7835, "orderValue": 1324.1011545606318, "confirmedDeliveryDate": 1714058507399, "externalInvoiceReference": "externalInvoiceReference", "orderValueCurrency": "orderValueCurrency", "deliveredDate": 1714058507399, "deliveryAddress": "deliveryAddress", "orderSentDate": 1714058507399, "deliveryContact": "deliveryContact", "id": 656, "state": 3906, "deliveryDate": 1714058507399, "paymentTerms": "paymentTerms", "supplierName": "supplierName", "deliveryCity": "deliveryCity", "deliveryTerms": "deliveryTerms", "goodsMarking": "goodsMarking", "contactEmail": "contactEmail", "isPickNPack": "false", "deliveryAddress2": "deliveryAddress2", "orderValueStore": 2091.718112970946, "storeId": 7969, "deliveryCompany": "deliveryCompany", "message": "message", "deliveryCountry": "deliveryCountry", "comment": "comment", "articles": [{ "deliveredAmount": "0", "articleName": "articleName", "purchasePriceMisc": "0", "articleId": "articleId", "description": "description", "purchasePrice": "0", "units": [{ "unit": { "name": "name", "externalId": "externalId", "id": 7858 }, "articleId": "articleId", "storegroupId": 736, "convert": 2266.3597902834986, "barcode": "barcode" }], "type": "type", "batches": [{ "deliveredAmount": "1", "serialNr": "serialNr", "bestBefore": 8402, "batchId": "batchId", "orderedAmount": "1" }], "unit": "unit", "availableAmount": "0", "rate": 331.82111369753795, "supplierArticleId": "supplierArticleId", "purchasePriceShipment": "0", "id": 4608, "orderedAmount": "0", "stock": true, "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", "articleId": "articleId", "description": "description", "purchasePrice": "0", "units": [{ "unit": { "name": "name", "externalId": "externalId", "id": 4389 }, "articleId": "articleId", "storegroupId": 4416, "convert": 4386.966500740484, "barcode": "barcode" }], "type": "type", "batches": [{ "deliveredAmount": "1", "serialNr": "serialNr", "bestBefore": 4325, "batchId": "batchId", "orderedAmount": "1" }], "unit": "unit", "availableAmount": "0", "rate": 7122.044657657607, "supplierArticleId": "supplierArticleId", "purchasePriceShipment": "0", "id": 6996, "orderedAmount": "0", "stock": false, "orderedAmountWithUnits": "orderedAmountWithUnits", "stockWarning": "0" }
Successfull response:

{ "paymentTermsDescription": "paymentTermsDescription", "deliveryPhone": "deliveryPhone", "supplierOrderId": "supplierOrderId", "supplierId": 5925, "productionOrderId": 3359, "deliveryTermsDescription": "deliveryTermsDescription", "customerOrderId": 8110, "contactPerson": "contactPerson", "deliveryZip": "deliveryZip", "productCount": 2501, "orderValue": 5315.641975295099, "confirmedDeliveryDate": 1714058507400, "externalInvoiceReference": "externalInvoiceReference", "orderValueCurrency": "orderValueCurrency", "deliveredDate": 1714058507400, "deliveryAddress": "deliveryAddress", "orderSentDate": 1714058507400, "deliveryContact": "deliveryContact", "id": 5173, "state": 8398, "deliveryDate": 1714058507400, "paymentTerms": "paymentTerms", "supplierName": "supplierName", "deliveryCity": "deliveryCity", "deliveryTerms": "deliveryTerms", "goodsMarking": "goodsMarking", "contactEmail": "contactEmail", "isPickNPack": "false", "deliveryAddress2": "deliveryAddress2", "orderValueStore": 2295.6091948281833, "storeId": 1644, "deliveryCompany": "deliveryCompany", "message": "message", "deliveryCountry": "deliveryCountry", "comment": "comment", "articles": [{ "deliveredAmount": "0", "articleName": "articleName", "purchasePriceMisc": "0", "articleId": "articleId", "description": "description", "purchasePrice": "0", "units": [{ "unit": { "name": "name", "externalId": "externalId", "id": 3324 }, "articleId": "articleId", "storegroupId": 7872, "convert": 5926.36010426897, "barcode": "barcode" }], "type": "type", "batches": [{ "deliveredAmount": "1", "serialNr": "serialNr", "bestBefore": 2248, "batchId": "batchId", "orderedAmount": "1" }], "unit": "unit", "availableAmount": "0", "rate": 4503.675542976918, "supplierArticleId": "supplierArticleId", "purchasePriceShipment": "0", "id": 971, "orderedAmount": "0", "stock": false, "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": 1524, "productionOrderId": 6493, "deliveryTermsDescription": "deliveryTermsDescription", "customerOrderId": 4959, "contactPerson": "contactPerson", "deliveryZip": "deliveryZip", "productCount": 3303, "orderValue": 839.1165550163204, "confirmedDeliveryDate": 1714058507401, "externalInvoiceReference": "externalInvoiceReference", "orderValueCurrency": "orderValueCurrency", "deliveredDate": 1714058507401, "deliveryAddress": "deliveryAddress", "orderSentDate": 1714058507401, "deliveryContact": "deliveryContact", "id": 4830, "state": 779, "deliveryDate": 1714058507401, "paymentTerms": "paymentTerms", "supplierName": "supplierName", "deliveryCity": "deliveryCity", "deliveryTerms": "deliveryTerms", "goodsMarking": "goodsMarking", "contactEmail": "contactEmail", "isPickNPack": "false", "deliveryAddress2": "deliveryAddress2", "orderValueStore": 590.5002998648446, "storeId": 9025, "deliveryCompany": "deliveryCompany", "message": "message", "deliveryCountry": "deliveryCountry", "comment": "comment", "articles": [{ "deliveredAmount": "0", "articleName": "articleName", "purchasePriceMisc": "0", "articleId": "articleId", "description": "description", "purchasePrice": "0", "units": [{ "unit": { "name": "name", "externalId": "externalId", "id": 5702 }, "articleId": "articleId", "storegroupId": 4152, "convert": 62.06675749862667, "barcode": "barcode" }], "type": "type", "batches": [{ "deliveredAmount": "1", "serialNr": "serialNr", "bestBefore": 3485, "batchId": "batchId", "orderedAmount": "1" }], "unit": "unit", "availableAmount": "0", "rate": 980.4193307811693, "supplierArticleId": "supplierArticleId", "purchasePriceShipment": "0", "id": 9565, "orderedAmount": "0", "stock": true, "orderedAmountWithUnits": "orderedAmountWithUnits", "stockWarning": "0" }], "poReference": "poReference" }
Successfull response:

{ "paymentTermsDescription": "paymentTermsDescription", "deliveryPhone": "deliveryPhone", "supplierOrderId": "supplierOrderId", "supplierId": 7275, "productionOrderId": 354, "deliveryTermsDescription": "deliveryTermsDescription", "customerOrderId": 6038, "contactPerson": "contactPerson", "deliveryZip": "deliveryZip", "productCount": 6702, "orderValue": 2454.4416439660545, "confirmedDeliveryDate": 1714058507401, "externalInvoiceReference": "externalInvoiceReference", "orderValueCurrency": "orderValueCurrency", "deliveredDate": 1714058507401, "deliveryAddress": "deliveryAddress", "orderSentDate": 1714058507401, "deliveryContact": "deliveryContact", "id": 7769, "state": 8160, "deliveryDate": 1714058507401, "paymentTerms": "paymentTerms", "supplierName": "supplierName", "deliveryCity": "deliveryCity", "deliveryTerms": "deliveryTerms", "goodsMarking": "goodsMarking", "contactEmail": "contactEmail", "isPickNPack": "false", "deliveryAddress2": "deliveryAddress2", "orderValueStore": 3614.961195015156, "storeId": 7181, "deliveryCompany": "deliveryCompany", "message": "message", "deliveryCountry": "deliveryCountry", "comment": "comment", "articles": [{ "deliveredAmount": "0", "articleName": "articleName", "purchasePriceMisc": "0", "articleId": "articleId", "description": "description", "purchasePrice": "0", "units": [{ "unit": { "name": "name", "externalId": "externalId", "id": 4856 }, "articleId": "articleId", "storegroupId": 5011, "convert": 6328.745453065794, "barcode": "barcode" }], "type": "type", "batches": [{ "deliveredAmount": "1", "serialNr": "serialNr", "bestBefore": 7346, "batchId": "batchId", "orderedAmount": "1" }], "unit": "unit", "availableAmount": "0", "rate": 4681.839182780228, "supplierArticleId": "supplierArticleId", "purchasePriceShipment": "0", "id": 1762, "orderedAmount": "0", "stock": true, "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", "articleId": "articleId", "description": "description", "purchasePrice": "0", "units": [{ "unit": { "name": "name", "externalId": "externalId", "id": 9601 }, "articleId": "articleId", "storegroupId": 52, "convert": 2740.624124423037, "barcode": "barcode" }], "type": "type", "batches": [{ "deliveredAmount": "1", "serialNr": "serialNr", "bestBefore": 5173, "batchId": "batchId", "orderedAmount": "1" }], "unit": "unit", "availableAmount": "0", "rate": 1679.2554770169788, "supplierArticleId": "supplierArticleId", "purchasePriceShipment": "0", "id": 9285, "orderedAmount": "0", "stock": false, "orderedAmountWithUnits": "orderedAmountWithUnits", "stockWarning": "0" }
Successfull response:

{ "paymentTermsDescription": "paymentTermsDescription", "deliveryPhone": "deliveryPhone", "supplierOrderId": "supplierOrderId", "supplierId": 3535, "productionOrderId": 4232, "deliveryTermsDescription": "deliveryTermsDescription", "customerOrderId": 3772, "contactPerson": "contactPerson", "deliveryZip": "deliveryZip", "productCount": 4282, "orderValue": 2101.901450822311, "confirmedDeliveryDate": 1714058507404, "externalInvoiceReference": "externalInvoiceReference", "orderValueCurrency": "orderValueCurrency", "deliveredDate": 1714058507404, "deliveryAddress": "deliveryAddress", "orderSentDate": 1714058507404, "deliveryContact": "deliveryContact", "id": 9418, "state": 5773, "deliveryDate": 1714058507404, "paymentTerms": "paymentTerms", "supplierName": "supplierName", "deliveryCity": "deliveryCity", "deliveryTerms": "deliveryTerms", "goodsMarking": "goodsMarking", "contactEmail": "contactEmail", "isPickNPack": "false", "deliveryAddress2": "deliveryAddress2", "orderValueStore": 2940.1807876082744, "storeId": 4681, "deliveryCompany": "deliveryCompany", "message": "message", "deliveryCountry": "deliveryCountry", "comment": "comment", "articles": [{ "deliveredAmount": "0", "articleName": "articleName", "purchasePriceMisc": "0", "articleId": "articleId", "description": "description", "purchasePrice": "0", "units": [{ "unit": { "name": "name", "externalId": "externalId", "id": 3997 }, "articleId": "articleId", "storegroupId": 4355, "convert": 547.5615893582775, "barcode": "barcode" }], "type": "type", "batches": [{ "deliveredAmount": "1", "serialNr": "serialNr", "bestBefore": 3496, "batchId": "batchId", "orderedAmount": "1" }], "unit": "unit", "availableAmount": "0", "rate": 8828.278937913707, "supplierArticleId": "supplierArticleId", "purchasePriceShipment": "0", "id": 9545, "orderedAmount": "0", "stock": true, "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": 374, "productionOrderId": 6577, "deliveryTermsDescription": "deliveryTermsDescription", "customerOrderId": 3770, "contactPerson": "contactPerson", "deliveryZip": "deliveryZip", "productCount": 3884, "orderValue": 300.56054234812837, "confirmedDeliveryDate": 1714058507405, "externalInvoiceReference": "externalInvoiceReference", "orderValueCurrency": "orderValueCurrency", "deliveredDate": 1714058507405, "deliveryAddress": "deliveryAddress", "orderSentDate": 1714058507405, "deliveryContact": "deliveryContact", "id": 6969, "state": 1544, "deliveryDate": 1714058507405, "paymentTerms": "paymentTerms", "supplierName": "supplierName", "deliveryCity": "deliveryCity", "deliveryTerms": "deliveryTerms", "goodsMarking": "goodsMarking", "contactEmail": "contactEmail", "isPickNPack": "false", "deliveryAddress2": "deliveryAddress2", "orderValueStore": 6870.154551750115, "storeId": 9611, "deliveryCompany": "deliveryCompany", "message": "message", "deliveryCountry": "deliveryCountry", "comment": "comment", "articles": [{ "deliveredAmount": "0", "articleName": "articleName", "purchasePriceMisc": "0", "articleId": "articleId", "description": "description", "purchasePrice": "0", "units": [{ "unit": { "name": "name", "externalId": "externalId", "id": 7877 }, "articleId": "articleId", "storegroupId": 8276, "convert": 6631.33782962264, "barcode": "barcode" }], "type": "type", "batches": [{ "deliveredAmount": "1", "serialNr": "serialNr", "bestBefore": 3229, "batchId": "batchId", "orderedAmount": "1" }], "unit": "unit", "availableAmount": "0", "rate": 3859.8644610229417, "supplierArticleId": "supplierArticleId", "purchasePriceShipment": "0", "id": 9105, "orderedAmount": "0", "stock": true, "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": 2351.208097691605, "articleId": "articleId", "purchasePriceShipment": 3370.1536837228805, "purchasePrice": 2987.7349809396037 }] }
Successfull response:

{ "paymentTermsDescription": "paymentTermsDescription", "deliveryPhone": "deliveryPhone", "supplierOrderId": "supplierOrderId", "supplierId": 2079, "productionOrderId": 7915, "deliveryTermsDescription": "deliveryTermsDescription", "customerOrderId": 8347, "contactPerson": "contactPerson", "deliveryZip": "deliveryZip", "productCount": 510, "orderValue": 4134.904042717942, "confirmedDeliveryDate": 1714058507407, "externalInvoiceReference": "externalInvoiceReference", "orderValueCurrency": "orderValueCurrency", "deliveredDate": 1714058507407, "deliveryAddress": "deliveryAddress", "orderSentDate": 1714058507407, "deliveryContact": "deliveryContact", "id": 4502, "state": 5279, "deliveryDate": 1714058507407, "paymentTerms": "paymentTerms", "supplierName": "supplierName", "deliveryCity": "deliveryCity", "deliveryTerms": "deliveryTerms", "goodsMarking": "goodsMarking", "contactEmail": "contactEmail", "isPickNPack": "false", "deliveryAddress2": "deliveryAddress2", "orderValueStore": 6024.000371273451, "storeId": 8679, "deliveryCompany": "deliveryCompany", "message": "message", "deliveryCountry": "deliveryCountry", "comment": "comment", "articles": [{ "deliveredAmount": "0", "articleName": "articleName", "purchasePriceMisc": "0", "articleId": "articleId", "description": "description", "purchasePrice": "0", "units": [{ "unit": { "name": "name", "externalId": "externalId", "id": 2679 }, "articleId": "articleId", "storegroupId": 1573, "convert": 6724.602846840274, "barcode": "barcode" }], "type": "type", "batches": [{ "deliveredAmount": "1", "serialNr": "serialNr", "bestBefore": 7026, "batchId": "batchId", "orderedAmount": "1" }], "unit": "unit", "availableAmount": "0", "rate": 3977.374603508057, "supplierArticleId": "supplierArticleId", "purchasePriceShipment": "0", "id": 2832, "orderedAmount": "0", "stock": true, "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": 7054, "productionOrderId": 2788, "deliveryTermsDescription": "deliveryTermsDescription", "customerOrderId": 4764, "contactPerson": "contactPerson", "deliveryZip": "deliveryZip", "productCount": 9727, "orderValue": 2394.1988411932434, "confirmedDeliveryDate": 1714058507408, "externalInvoiceReference": "externalInvoiceReference", "orderValueCurrency": "orderValueCurrency", "deliveredDate": 1714058507408, "deliveryAddress": "deliveryAddress", "orderSentDate": 1714058507408, "deliveryContact": "deliveryContact", "id": 7149, "state": 95, "deliveryDate": 1714058507408, "paymentTerms": "paymentTerms", "supplierName": "supplierName", "deliveryCity": "deliveryCity", "deliveryTerms": "deliveryTerms", "goodsMarking": "goodsMarking", "contactEmail": "contactEmail", "isPickNPack": "false", "deliveryAddress2": "deliveryAddress2", "orderValueStore": 3252.8632027768313, "storeId": 3213, "deliveryCompany": "deliveryCompany", "message": "message", "deliveryCountry": "deliveryCountry", "comment": "comment", "articles": [{ "deliveredAmount": "0", "articleName": "articleName", "purchasePriceMisc": "0", "articleId": "articleId", "description": "description", "purchasePrice": "0", "units": [{ "unit": { "name": "name", "externalId": "externalId", "id": 9607 }, "articleId": "articleId", "storegroupId": 8540, "convert": 3086.2110623345106, "barcode": "barcode" }], "type": "type", "batches": [{ "deliveredAmount": "1", "serialNr": "serialNr", "bestBefore": 3516, "batchId": "batchId", "orderedAmount": "1" }], "unit": "unit", "availableAmount": "0", "rate": 3956.9925016807474, "supplierArticleId": "supplierArticleId", "purchasePriceShipment": "0", "id": 8463, "orderedAmount": "0", "stock": false, "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": 2784.5030289613005, "supplierId": 2528, "orderId": 1090, "price": 8459.806210785537, "bundleParts": [{ "amount": 8361.653863459045, "supplierId": 7158, "orderId": 9001, "price": 5047.336376153281, "bundleParts": [{ "amount": 1149.3815366865047, "supplierId": 9742, "orderId": 438, "price": 8064.992044654076, "bundleParts": [{ "amount": 1134.7954845984154, "supplierId": 6551, "orderId": 3814, "price": 6042.738653988758, "bundleParts": [], "articleId": "articleId" }], "articleId": "articleId" }], "articleId": "articleId" }], "articleId": "articleId" }
Successfull response:

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": 2312.7555306993286}
Successfull response:

{ "paymentTermsDescription": "paymentTermsDescription", "deliveryPhone": "deliveryPhone", "supplierOrderId": "supplierOrderId", "supplierId": 5577, "productionOrderId": 500, "deliveryTermsDescription": "deliveryTermsDescription", "customerOrderId": 6516, "contactPerson": "contactPerson", "deliveryZip": "deliveryZip", "productCount": 3198, "orderValue": 632.127725972621, "confirmedDeliveryDate": 1714058507409, "externalInvoiceReference": "externalInvoiceReference", "orderValueCurrency": "orderValueCurrency", "deliveredDate": 1714058507409, "deliveryAddress": "deliveryAddress", "orderSentDate": 1714058507409, "deliveryContact": "deliveryContact", "id": 4324, "state": 7161, "deliveryDate": 1714058507409, "paymentTerms": "paymentTerms", "supplierName": "supplierName", "deliveryCity": "deliveryCity", "deliveryTerms": "deliveryTerms", "goodsMarking": "goodsMarking", "contactEmail": "contactEmail", "isPickNPack": "false", "deliveryAddress2": "deliveryAddress2", "orderValueStore": 349.22512183330645, "storeId": 8428, "deliveryCompany": "deliveryCompany", "message": "message", "deliveryCountry": "deliveryCountry", "comment": "comment", "articles": [{ "deliveredAmount": "0", "articleName": "articleName", "purchasePriceMisc": "0", "articleId": "articleId", "description": "description", "purchasePrice": "0", "units": [{ "unit": { "name": "name", "externalId": "externalId", "id": 438 }, "articleId": "articleId", "storegroupId": 9695, "convert": 7047.437908528327, "barcode": "barcode" }], "type": "type", "batches": [{ "deliveredAmount": "1", "serialNr": "serialNr", "bestBefore": 5761, "batchId": "batchId", "orderedAmount": "1" }], "unit": "unit", "availableAmount": "0", "rate": 2116.800062793511, "supplierArticleId": "supplierArticleId", "purchasePriceShipment": "0", "id": 8754, "orderedAmount": "0", "stock": false, "orderedAmountWithUnits": "orderedAmountWithUnits", "stockWarning": "0" }], "poReference": "poReference" }

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