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": "8940ea0b-2ad1-43bd-9b3b-6ed50c540a55",
  "SupplierReferenceNumber": "sample string 2",
  "fkLocationId": "7c768912-99c5-4695-845f-0552794d3b86",
  "fkSupplierId": "3da28ea6-cef2-4ec5-a514-d36ce6b1cd7e",
  "Currency": "sample string 3",
  "ExternalInvoiceNumber": "sample string 4",
  "UnitAmountTaxIncludedType": 1,
  "DateOfPurchase": "2019-06-12T09:27:49.8070893Z",
  "QuotedDeliveryDate": "2019-06-12T09:27:49.8070893Z",
  "ShippingTaxRate": 1.0,
  "ConversionRate": 1.0,
  "PostagePaid": 1.0
}

Response

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

{
  "pkPurchaseID": "03acdb6e-dcdc-4cda-a0d0-2231a96bcc8c",
  "fkSupplierId": "2df212ec-eaa7-415c-9dfd-45fc339809ea",
  "fkLocationId": "b7b766ec-be88-4efd-848f-3d8eb956a810",
  "ExternalInvoiceNumber": "sample string 4",
  "Status": 0,
  "Currency": "sample string 5",
  "SupplierReferenceNumber": "sample string 6",
  "Locked": true,
  "LineCount": 8,
  "DeliveredLinesCount": 9,
  "UnitAmountTaxIncludedType": 10,
  "DateOfPurchase": "2019-06-12T09:27:52.0766643Z",
  "DateOfDelivery": "2019-06-12T09:27:52.0766643Z",
  "QuotedDeliveryDate": "2019-06-12T09:27:52.0766643Z",
  "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
}