Back

Search

Search

Methods

Inventory

Orders

PurchaseOrder /Add_PurchaseOrderItem

Response: Update_PurchaseOrderItemResponse



Method adds purchase order item to an existing PENDING order. Items can only be added to PENDING purchase orders. Returns class that represents modified/recalculated purchase order header and modified purchase order item line

Parameters

NameTypeDescription
addItemParameterAdd_PurchaseOrderItemParameterAdd purchase item parameter class

HTTP Endpoint

Server /PurchaseOrder / Add_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/Add_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

addItemParameter={
  "pkPurchaseId": "211113e0-b613-439a-b74d-8e80d940d17f",
  "fkStockItemId": "fc1c1b4f-69ec-465f-aa29-ff09cbe87b00",
  "Qty": 3,
  "PackQuantity": 4,
  "PackSize": 5,
  "Cost": 1.0,
  "TaxRate": 2.0
}

Response

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

{
  "NewPurchaseOrderItem": {
    "pkPurchaseItemId": "20a2ca5f-63c0-4b19-b8ac-1a790e5b7a85",
    "fkStockItemId": "21a100d2-31c9-45e1-9622-b7ac9f64e3b4",
    "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": "08573970-dd05-4152-babd-d383a2343593",
    "fkSupplierId": "b4b940d2-700b-48ad-af86-e9d5ab2011ae",
    "fkLocationId": "45ce813e-74cc-48da-b9e4-0fa41f136dd3",
    "ExternalInvoiceNumber": "sample string 4",
    "Status": 0,
    "Currency": "sample string 5",
    "SupplierReferenceNumber": "sample string 6",
    "Locked": true,
    "LineCount": 8,
    "DeliveredLinesCount": 9,
    "UnitAmountTaxIncludedType": 10,
    "DateOfPurchase": "2019-06-12T09:27:52.0926752Z",
    "DateOfDelivery": "2019-06-12T09:27:52.0926752Z",
    "QuotedDeliveryDate": "2019-06-12T09:27:52.0926752Z",
    "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
  }
}