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.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": "03adb418-3b00-42ed-b9f2-dcec51c933f3",
  "SupplierReferenceNumber": "sample string 2",
  "fkLocationId": "ef401bc1-caad-435b-a4b3-62190e1a6a21",
  "fkSupplierId": "13074bee-7bfd-49b6-8c29-eeff5409c652",
  "Currency": "sample string 3",
  "ExternalInvoiceNumber": "sample string 4",
  "UnitAmountTaxIncludedType": 1,
  "DateOfPurchase": "2019-11-28T09:45:57.4732446Z",
  "QuotedDeliveryDate": "2019-11-28T09:45:57.4732446Z",
  "ShippingTaxRate": 1.0,
  "ConversionRate": 1.0,
  "PostagePaid": 1.0
}

Response

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

{
  "pkPurchaseID": "9278c4c8-5efb-428d-a85c-1835097e8fb2",
  "fkSupplierId": "8dce15a5-003b-46fa-ac8f-a9cc85b9f12e",
  "fkLocationId": "56c6c886-2642-404a-a6fe-771257a170ef",
  "ExternalInvoiceNumber": "sample string 4",
  "Status": 0,
  "Currency": "sample string 5",
  "SupplierReferenceNumber": "sample string 6",
  "Locked": true,
  "LineCount": 8,
  "DeliveredLinesCount": 9,
  "UnitAmountTaxIncludedType": 10,
  "DateOfPurchase": "2019-11-28T09:46:00.315449Z",
  "DateOfDelivery": "2019-11-28T09:46:00.315449Z",
  "QuotedDeliveryDate": "2019-11-28T09:46:00.315449Z",
  "PostagePaid": 4.0,
  "TotalCost": 5.0,
  "taxPaid": 6.0,
  "ShippingTaxRate": 7.0,
  "ConversionRate": 8.0,
  "ConvertedShippingCost": 9.0,
  "ConvertedShippingTax": 10.0,
  "ConvertedOtherCost": 11.0,
  "ConvertedOtherTax": 12.0,
  "ConvertedGrandTotal": 13.0
}