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": "6d18bc44-97fa-4fe6-82e1-3a72b32a1dfe",
  "SupplierReferenceNumber": "sample string 2",
  "fkLocationId": "f6a7efe9-300c-4992-86bc-073b09b2ea6f",
  "fkSupplierId": "ca2dfb18-e373-4d2f-bdc6-96692246ca23",
  "Currency": "sample string 3",
  "ExternalInvoiceNumber": "sample string 4",
  "UnitAmountTaxIncludedType": 1,
  "DateOfPurchase": "2019-07-23T15:31:53.9787143Z",
  "QuotedDeliveryDate": "2019-07-23T15:31:53.9797154Z",
  "ShippingTaxRate": 1.0,
  "ConversionRate": 1.0,
  "PostagePaid": 1.0
}

Response

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

{
  "pkPurchaseID": "11687490-cf80-4ae1-a00a-4dce86254aea",
  "fkSupplierId": "5ff6b561-a15c-4c55-bc34-27b4a52d9957",
  "fkLocationId": "25428f13-5220-43e0-8773-1902badd8796",
  "ExternalInvoiceNumber": "sample string 4",
  "Status": 0,
  "Currency": "sample string 5",
  "SupplierReferenceNumber": "sample string 6",
  "Locked": true,
  "LineCount": 8,
  "DeliveredLinesCount": 9,
  "UnitAmountTaxIncludedType": 10,
  "DateOfPurchase": "2019-07-23T15:31:56.0322476Z",
  "DateOfDelivery": "2019-07-23T15:31:56.0322476Z",
  "QuotedDeliveryDate": "2019-07-23T15:31:56.0322476Z",
  "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
}