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": "da024bc9-2cac-4d93-bb3d-a17ea071a601",
  "SupplierReferenceNumber": "sample string 2",
  "fkLocationId": "fa2144a7-1750-45a7-be6b-9be8e9143a8d",
  "fkSupplierId": "e61d1fde-a463-4346-9daa-33cf7a6f4499",
  "Currency": "sample string 3",
  "ExternalInvoiceNumber": "sample string 4",
  "UnitAmountTaxIncludedType": 1,
  "DateOfPurchase": "2018-10-03T11:12:33.0144627Z",
  "QuotedDeliveryDate": "2018-10-03T11:12:33.0154637Z",
  "ShippingTaxRate": 1.0,
  "ConversionRate": 1.0,
  "PostagePaid": 1.0
}

Response

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

{
  "pkPurchaseID": "fc5367ed-9040-4933-9757-bccfd1121016",
  "fkSupplierId": "8ecedbfa-435f-4393-898b-e2c00f2fbc9a",
  "fkLocationId": "895218b6-4977-4d35-8ccd-79a57c85f3b9",
  "ExternalInvoiceNumber": "sample string 4",
  "Status": 0,
  "Currency": "sample string 5",
  "SupplierReferenceNumber": "sample string 6",
  "Locked": true,
  "LineCount": 8,
  "DeliveredLinesCount": 9,
  "UnitAmountTaxIncludedType": 10,
  "DateOfPurchase": "2018-10-03T11:12:35.2830609Z",
  "DateOfDelivery": "2018-10-03T11:12:35.2830609Z",
  "QuotedDeliveryDate": "2018-10-03T11:12:35.2830609Z",
  "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
}