Back

Search

Search

Methods

Inventory

Orders

PurchaseOrder /Update_PurchaseOrderHeader

Response: PurchaseOrderHeader



Update purchase order header, only if status is not Delivered. Returns modified/recalculated purchase order header

Parameters

NameTypeDescription
updateParameterUpdate_PurchaseOrderHeaderParameterUpdate purchase order header class

HTTP Endpoint

Server /PurchaseOrder / Update_PurchaseOrderHeader

Permissions

GlobalPermissions.PurchaseOrder.EditPurchaseOrder.EditPurchaseOrderNode

Example Code

Example Request

The following request format is required for this method.

POST https://eu-ext.linnworks.net//api/PurchaseOrder/Update_PurchaseOrderHeader HTTP/1.1
Host: eu-ext.linnworks.net
Connection: keep-alive
Accept: application/json, text/javascript, */*; q=0.01
Origin: https://www.linnworks.net
Accept-Language: en
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.90 Safari/537.36
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Referer: https://www.linnworks.net/
Accept-Encoding: gzip, deflate
Authorization: INSERT_YOUR_TOKEN_HERE

updateParameter={
  "pkPurchaseID": "1ecfd181-49e6-42d2-a058-47a7d9c4cceb",
  "SupplierReferenceNumber": "sample string 2",
  "fkLocationId": "87aea8e6-441c-4b73-96d6-ae68314ee333",
  "fkSupplierId": "367912f8-47bd-4280-8e8c-9ef6c5697789",
  "Currency": "sample string 3",
  "ExternalInvoiceNumber": "sample string 4",
  "DateOfPurchase": "2018-02-19T16:57:06.1897413Z",
  "QuotedDeliveryDate": "2018-02-19T16:57:06.1902428Z",
  "ShippingTaxRate": 1.0,
  "ConversionRate": 1.0,
  "PostagePaid": 1.0
}

Response

This is an example response. Results may vary depending on your data.

{
  "pkPurchaseID": "d288ba76-b434-46c7-a85c-463b6fabd4a4",
  "fkSupplierId": "002a1253-8c58-4087-bc76-f7e48891186a",
  "fkLocationId": "405236c2-2fd7-4ea1-897e-7249cb8fd361",
  "ExternalInvoiceNumber": "sample string 4",
  "Status": 0,
  "Currency": "sample string 5",
  "SupplierReferenceNumber": "sample string 6",
  "Locked": true,
  "LineCount": 8,
  "DeliveredLinesCount": 9,
  "DateOfPurchase": "2018-02-19T16:57:07.6865165Z",
  "DateOfDelivery": "2018-02-19T16:57:07.6865165Z",
  "QuotedDeliveryDate": "2018-02-19T16:57:07.6865165Z",
  "PostagePaid": 4.0,
  "TotalCost": 5.0,
  "taxPaid": 6.0,
  "ShippingTaxRate": 7.0,
  "ConversionRate": 8.0
}