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.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": "b9ff6786-07ed-4284-8ece-e6da27fde3b9",
  "pkPurchaseId": "38832d1b-f6e3-415e-a316-04b8e4f58bca",
  "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": "3b258a15-62d0-4d30-85d4-380c57f7c315",
    "fkStockItemId": "f97ba12d-18af-4843-a771-1b56bc66a88a",
    "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,
    "SortOrder": 14,
    "DimHeight": 15.0,
    "DimWidth": 16.0,
    "DimDepth": 17.0,
    "BoundToOpenOrdersItems": 18,
    "BinRack": "sample string 19",
    "QuantityBoundToOpenOrdersItems": 20,
    "SupplierCode": "sample string 22"
  },
  "PurchaseOrderHeader": {
    "pkPurchaseID": "cd9dfb44-f314-4889-a0c7-eca561fd0270",
    "fkSupplierId": "74e6ae34-4c1d-48dd-9c06-8be6532278db",
    "fkLocationId": "b4ad583e-454b-4fb5-8c80-74423d17f446",
    "ExternalInvoiceNumber": "sample string 4",
    "Status": 0,
    "Currency": "sample string 5",
    "SupplierReferenceNumber": "sample string 6",
    "Locked": true,
    "LineCount": 8,
    "DeliveredLinesCount": 9,
    "UnitAmountTaxIncludedType": 10,
    "DateOfPurchase": "2019-11-28T09:46:00.3333804Z",
    "DateOfDelivery": "2019-11-28T09:46:00.3333804Z",
    "QuotedDeliveryDate": "2019-11-28T09:46:00.3333804Z",
    "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
  },
  "BatchInventoryId": 1
}