Back

Search

Search

Methods

Inventory

OrderPrintStatus
Orders

PurchaseOrder /Add_PurchaseOrderItem

Allows 250 calls per minute

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

Permissions

GlobalPermissions.Inventory.PurchaseOrder.EditPurchaseOrderNode

Example Request

The following request format is required for this method.

Endpoint URL

POST https://eu-ext.linnworks.net/api/PurchaseOrder/Add_PurchaseOrderItem

Headers

Connection: keep-alive
Accept: application/json
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Accept-Encoding: gzip, deflate
Authorization: INSERT_YOUR_TOKEN_HERE

Request Body

This is an example of the request structure. Results will vary depending on your data.

addItemParameter={
  "pkPurchaseId": "41e91dfd-38be-41d7-b7db-9ba74648cee3",
  "fkStockItemId": "bc792e84-f4e8-43e0-8311-2712a3ba45de",
  "Qty": 3,
  "PackQuantity": 4,
  "PackSize": 5,
  "Cost": 1.0,
  "TaxRate": 2.0
}

Response

This is an example of the response JSON. Results will vary depending on your data.

{
  "NewPurchaseOrderItem": {
    "pkPurchaseItemId": "a4ec948c-74b5-4d5d-b8cf-98cd736f107a",
    "fkStockItemId": "dbd3d86b-c1d3-4da4-924f-963a5d694bb9",
    "StockItemIntId": 3,
    "Quantity": 4,
    "Cost": 5.0,
    "Delivered": 6,
    "TaxRate": 7.0,
    "Tax": 8.0,
    "PackQuantity": 9,
    "PackSize": 10,
    "SKU": "sample string 11",
    "ItemTitle": "sample string 12",
    "InventoryTrackingType": 13,
    "IsDeleted": true,
    "SortOrder": 15,
    "DimHeight": 16.0,
    "DimWidth": 17.0,
    "BarcodeNumber": "sample string 18",
    "DimDepth": 19.0,
    "BoundToOpenOrdersItems": 20,
    "BinRack": "sample string 21",
    "QuantityBoundToOpenOrdersItems": 22,
    "SupplierCode": "sample string 24",
    "SupplierBarcode": "sample string 25",
    "SkuGroupIds": [
      1
    ]
  },
  "PurchaseOrderHeader": {
    "pkPurchaseID": "931661c4-3eda-41c3-b3a4-48c52118fc6d",
    "fkSupplierId": "7f5c8701-5fe1-4d2d-9a5a-dffc5333975f",
    "fkLocationId": "9dbc10be-be4a-4ba7-83e1-73afde36f431",
    "ExternalInvoiceNumber": "sample string 4",
    "Status": 0,
    "Currency": "sample string 5",
    "SupplierReferenceNumber": "sample string 6",
    "Locked": true,
    "LineCount": 8,
    "DeliveredLinesCount": 9,
    "UnitAmountTaxIncludedType": 10,
    "DateOfPurchase": "2022-03-09T13:04:12.0821722Z",
    "DateOfDelivery": "2022-03-09T13:04:12.0821722Z",
    "QuotedDeliveryDate": "2022-03-09T13:04:12.0821722Z",
    "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
}