Back

Search

Search

Methods

Inventory

OrderPrintStatus
Orders

ShippingService

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.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": "2dc560da-1646-47ff-b2e5-5fc30491c634",
  "fkStockItemId": "cbe85146-9a1e-4e62-8d58-a425a60209f5",
  "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": "7f42e080-ee0b-4b36-972a-27dd6aae96db",
    "fkStockItemId": "1580b948-2a39-4b7f-91e7-b20202424215",
    "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": "e12c9c26-6747-4d29-8f7a-d18098fa367b",
    "fkSupplierId": "d6bd2fc9-840a-4230-ae19-badaf4324610",
    "fkLocationId": "7fa098a4-41dc-4411-aa13-884a7f8ed747",
    "ExternalInvoiceNumber": "sample string 4",
    "Status": 0,
    "Currency": "sample string 5",
    "SupplierReferenceNumber": "sample string 6",
    "Locked": true,
    "LineCount": 8,
    "DeliveredLinesCount": 9,
    "UnitAmountTaxIncludedType": 10,
    "DateOfPurchase": "2021-07-29T09:24:43.2522152Z",
    "DateOfDelivery": "2021-07-29T09:24:43.2522152Z",
    "QuotedDeliveryDate": "2021-07-29T09:24:43.2522152Z",
    "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
}