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.

Get

Endpoint URL

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

GET https://eu-ext.linnworks.net/api/PurchaseOrder/Add_PurchaseOrderItem?addItemParameter=%7B%0D%0A%20%20%22pkPurchaseId%22%3A%20%22b9850fd9-684a-472d-96b5-dca1ffb8e5ff%22%2C%0D%0A%20%20%22fkStockItemId%22%3A%20%2240698c17-5b6e-4c3a-b5b4-39cf4722e0ee%22%2C%0D%0A%20%20%22Qty%22%3A%203%2C%0D%0A%20%20%22PackQuantity%22%3A%204%2C%0D%0A%20%20%22PackSize%22%3A%205%2C%0D%0A%20%20%22Cost%22%3A%201.0%2C%0D%0A%20%20%22TaxRate%22%3A%202.0%0D%0A%7D

Headers

Connection: keep-alive
Accept: application/json
Accept-Encoding: gzip, deflate
Authorization: INSERT_YOUR_TOKEN_HERE

Post

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": "b9850fd9-684a-472d-96b5-dca1ffb8e5ff",
  "fkStockItemId": "40698c17-5b6e-4c3a-b5b4-39cf4722e0ee",
  "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": "c79f3f89-df7a-49a9-8b64-56008598e172",
    "fkStockItemId": "dcf5a5ef-2d45-4748-ba17-2f4a63a26fa6",
    "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": "88ed4f2f-65dc-4e0c-9f84-0f0db81563bf",
    "fkSupplierId": "1e19d672-443c-4459-9543-40570ed86b1b",
    "fkLocationId": "0f990959-5f2b-472d-bbf0-0f12a9f96b28",
    "ExternalInvoiceNumber": "sample string 4",
    "Status": 0,
    "Currency": "sample string 5",
    "SupplierReferenceNumber": "sample string 6",
    "Locked": true,
    "LineCount": 8,
    "DeliveredLinesCount": 9,
    "UnitAmountTaxIncludedType": 10,
    "DateOfPurchase": "2022-01-13T12:45:46.3666562Z",
    "DateOfDelivery": "2022-01-13T12:45:46.3666562Z",
    "QuotedDeliveryDate": "2022-01-13T12:45:46.3666562Z",
    "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
}