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

GET | 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": "95df4e18-6293-4e40-a60b-3e85d7cecd83",
  "fkStockItemId": "5e7c976a-14e6-4726-b593-b7af480f96b4",
  "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": "92c89448-e231-4583-89c5-00ce4e64bef7",
    "fkStockItemId": "4dc8f41a-d0c3-4d8c-a67c-fe0c329629c8",
    "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": "d48effdd-1826-44bf-b4de-0f2c6e672366",
    "fkSupplierId": "7f91cb57-d209-437a-98c7-ad504f89e68a",
    "fkLocationId": "ebcb0faf-abf1-41ac-8273-80278e41e8ad",
    "ExternalInvoiceNumber": "sample string 4",
    "Status": 0,
    "Currency": "sample string 5",
    "SupplierReferenceNumber": "sample string 6",
    "Locked": true,
    "LineCount": 8,
    "DeliveredLinesCount": 9,
    "UnitAmountTaxIncludedType": 10,
    "DateOfPurchase": "2023-01-10T13:49:49.9162618Z",
    "DateOfDelivery": "2023-01-10T13:49:49.9162618Z",
    "QuotedDeliveryDate": "2023-01-10T13:49:49.9162618Z",
    "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
}