Back

Search

Search

Methods

Inventory

Orders

PurchaseOrder /Update_PurchaseOrderItem

Response: Update_PurchaseOrderItemResponse



Update purchase order item, quantity, cost, pack size, pack quantity, in PENDING order only. Returns class that represents modified/recalculated purchase order header and modified purchase order item line

Parameters

NameTypeDescription
updateItemParameterUpdate_PurchaseOrderItemParameterEdit purchase order item class

HTTP Endpoint

Server /PurchaseOrder / Update_PurchaseOrderItem

Permissions

GlobalPermissions.PurchaseOrder.EditPurchaseOrder.EditPurchaseOrderNode

Example Code

Example Request

The following request format is required for this method.

POST https://eu-ext.linnworks.net//api/PurchaseOrder/Update_PurchaseOrderItem 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

updateItemParameter={
  "pkPurchaseItemId": "7118d57b-afc9-4960-9217-0cb13d52ad0c",
  "pkPurchaseId": "15bcd462-a4ae-4b48-8a8a-2ff077d01ae5",
  "Quantity": 1,
  "PackQuantity": 1,
  "PackSize": 1,
  "Cost": 1.0,
  "TaxRate": 1.0
}

Response

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

{
  "NewPurchaseOrderItem": {
    "pkPurchaseItemId": "6db700eb-ac09-44f5-9b0f-e666d2a1c36c",
    "fkStockItemId": "c2994877-d96e-46ea-b3dd-03f1e8a642c5",
    "Quantity": 3,
    "Cost": 4.0,
    "Delivered": 5,
    "TaxRate": 6.0,
    "Tax": 7.0,
    "PackQuantity": 8,
    "PackSize": 9,
    "SKU": "sample string 10",
    "ItemTitle": "sample string 11",
    "InventoryTrackingType": 12,
    "IsDeleted": true
  },
  "PurchaseOrderHeader": {
    "pkPurchaseID": "2e4ee647-d080-4bb5-a66f-ac36842ec1eb",
    "fkSupplierId": "785469a0-f194-4eda-928e-800a8f6f4cb1",
    "fkLocationId": "7073dc07-8376-4618-a6ef-91ff143ed2a5",
    "ExternalInvoiceNumber": "sample string 4",
    "Status": 0,
    "Currency": "sample string 5",
    "SupplierReferenceNumber": "sample string 6",
    "Locked": true,
    "LineCount": 8,
    "DeliveredLinesCount": 9,
    "DateOfPurchase": "2018-02-19T16:57:07.6950399Z",
    "DateOfDelivery": "2018-02-19T16:57:07.6950399Z",
    "QuotedDeliveryDate": "2018-02-19T16:57:07.6950399Z",
    "PostagePaid": 4.0,
    "TotalCost": 5.0,
    "taxPaid": 6.0,
    "ShippingTaxRate": 7.0,
    "ConversionRate": 8.0
  }
}