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": "8826d9b0-46b4-4281-b01b-09d0729145cb",
  "fkStockItemId": "3e4e5808-6630-4955-9ff2-0a4fc8c37dd0",
  "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": "4c76bbc6-cc84-4560-9531-7b91f855442b",
    "fkStockItemId": "e899c834-9c98-41a8-b250-a880db12672d",
    "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
  },
  "PurchaseOrderHeader": {
    "pkPurchaseID": "67f7b547-adc9-4911-a67c-f2b8e89c952d",
    "fkSupplierId": "0a4565c6-7467-4478-878d-9e089739185f",
    "fkLocationId": "5e0303df-efb6-4ca1-bd4e-354168cf8277",
    "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.2960701Z",
    "DateOfDelivery": "2018-10-03T11:12:35.2960701Z",
    "QuotedDeliveryDate": "2018-10-03T11:12:35.2960701Z",
    "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
  }
}