Back

Search

Search

Methods

Inventory

Orders

PurchaseOrder /Change_PurchaseOrderStatus

Response: PurchaseOrderHeader



Change purchase order status. Can change from:
PENDING to OPEN, which will populate Due (OnOrder) values in stock levels,
OPEN to DELIVERED, which will consolidate Due values in stock levels
PARTIAL to DELIVERED, which will consolidate Due values in stock levels

Parameters

NameTypeDescription
changeStatusParameterChange_PurchaseOrderStatusParameterClass that represents the parameters for Changing the Purchase Order Status

HTTP Endpoint

Server /PurchaseOrder / Change_PurchaseOrderStatus

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/Change_PurchaseOrderStatus 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

changeStatusParameter={
  "pkPurchaseId": "b89bf706-8029-4f31-a296-7cc9f09198ef",
  "status": 0
}

Response

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

{
  "pkPurchaseID": "41fb05a4-ff9a-46da-832a-2386813b9be1",
  "fkSupplierId": "34b04fc0-6e4e-4de0-9612-857c2c01ad8f",
  "fkLocationId": "20912731-421e-433f-8549-dc8fc48e6025",
  "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.3360986Z",
  "DateOfDelivery": "2018-10-03T11:12:35.3360986Z",
  "QuotedDeliveryDate": "2018-10-03T11:12:35.3360986Z",
  "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
}