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": "36393311-db86-4001-83d2-a55d270f3b39",
  "SupplierReferenceNumber": "sample string 2",
  "fkLocationId": "d732d9b3-0f2e-4f18-b7f8-dc7b6f89f803",
  "fkSupplierId": "2800650b-4494-4fcd-881e-b19c205f59d6",
  "Currency": "sample string 3",
  "ExternalInvoiceNumber": "sample string 4",
  "UnitAmountTaxIncludedType": 1,
  "DateOfPurchase": "2019-10-09T15:11:40.2742535Z",
  "QuotedDeliveryDate": "2019-10-09T15:11:40.2752674Z",
  "ShippingTaxRate": 1.0,
  "ConversionRate": 1.0,
  "PostagePaid": 1.0
}

Response

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

{
  "pkPurchaseID": "52897e01-d730-41b1-93ff-ecae6b0fca54",
  "fkSupplierId": "a2694e82-367b-430d-ab14-4ac13e61792f",
  "fkLocationId": "fa920c0b-a801-4f4c-b21e-b7ba36652b49",
  "ExternalInvoiceNumber": "sample string 4",
  "Status": 0,
  "Currency": "sample string 5",
  "SupplierReferenceNumber": "sample string 6",
  "Locked": true,
  "LineCount": 8,
  "DeliveredLinesCount": 9,
  "UnitAmountTaxIncludedType": 10,
  "DateOfPurchase": "2019-10-09T15:11:43.7483855Z",
  "DateOfDelivery": "2019-10-09T15:11:43.7483855Z",
  "QuotedDeliveryDate": "2019-10-09T15:11:43.7483855Z",
  "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
}