Back

Search

Search

Methods

Inventory

Orders

PurchaseOrder /Modify_PurchaseOrderItems_Bulk

Response: Modify_PurchaseOrderItems_BulkResponse



Delete, add and update purchase order items and cause purchase order totals recalculation

Parameters

NameTypeDescription
requestModify_PurchaseOrderItems_BulkRequest

HTTP Endpoint

Server /PurchaseOrder / Modify_PurchaseOrderItems_Bulk

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/Modify_PurchaseOrderItems_Bulk 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

request={
  "PurchaseId": "76d86796-4a36-477c-8331-5892be51c14d",
  "ItemsToAdd": [
    {
      "Id": "5eaee51a-4692-48f0-b588-7f82f817582f",
      "StockItemId": "260bbf5e-54fd-4753-8118-d9b8cde3ea4b",
      "Qty": 3,
      "PackQuantity": 4,
      "PackSize": 5,
      "Cost": 1.0,
      "TaxRate": 2.0
    },
    {
      "Id": "5eaee51a-4692-48f0-b588-7f82f817582f",
      "StockItemId": "260bbf5e-54fd-4753-8118-d9b8cde3ea4b",
      "Qty": 3,
      "PackQuantity": 4,
      "PackSize": 5,
      "Cost": 1.0,
      "TaxRate": 2.0
    }
  ],
  "ItemsToUpdate": [
    {
      "Id": "326da24a-27b6-4a35-aa31-fcf289d87067",
      "PurchaseItemId": "81032a75-b2a7-43f0-8154-fae479d65223",
      "StockItemId": "90b21b1d-fd07-42c4-8250-6fb36524e487",
      "Qty": 4,
      "PackQuantity": 5,
      "PackSize": 6,
      "Cost": 1.0,
      "TaxRate": 2.0
    },
    {
      "Id": "326da24a-27b6-4a35-aa31-fcf289d87067",
      "PurchaseItemId": "81032a75-b2a7-43f0-8154-fae479d65223",
      "StockItemId": "90b21b1d-fd07-42c4-8250-6fb36524e487",
      "Qty": 4,
      "PackQuantity": 5,
      "PackSize": 6,
      "Cost": 1.0,
      "TaxRate": 2.0
    }
  ],
  "ItemsToDelete": [
    "06af4f48-23a2-4a2d-8925-fc2f77db622e",
    "8840e201-4df7-4d54-909a-26af99a98689"
  ]
}

Response

This is an example response. Results may vary depending on your data.

{
  "ModifiedItems": [
    {
      "Id": "fea394e0-361e-4f11-94d5-95a5122cefad",
      "PurchaseItemId": "76aedb29-bf66-44d1-aad2-2d7b872d432e",
      "StockItemId": "d4de2327-0302-4640-bf45-451239ef685a",
      "Qty": 4,
      "PackQuantity": 5,
      "PackSize": 6,
      "BoundToOpenOrdersItems": 1,
      "QuantityBoundToOpenOrdersItems": 2,
      "Cost": 3.0,
      "TaxRate": 4.0
    },
    {
      "Id": "fea394e0-361e-4f11-94d5-95a5122cefad",
      "PurchaseItemId": "76aedb29-bf66-44d1-aad2-2d7b872d432e",
      "StockItemId": "d4de2327-0302-4640-bf45-451239ef685a",
      "Qty": 4,
      "PackQuantity": 5,
      "PackSize": 6,
      "BoundToOpenOrdersItems": 1,
      "QuantityBoundToOpenOrdersItems": 2,
      "Cost": 3.0,
      "TaxRate": 4.0
    }
  ],
  "PurchaseOrderHeader": {
    "pkPurchaseID": "dd9d8256-527d-4372-936e-ef626a84e53b",
    "fkSupplierId": "d9958240-1982-431c-9519-38f1c70848e3",
    "fkLocationId": "96b7e9d5-7a18-49c3-8e2c-cd66699b5f2d",
    "ExternalInvoiceNumber": "sample string 4",
    "Status": 0,
    "Currency": "sample string 5",
    "SupplierReferenceNumber": "sample string 6",
    "Locked": true,
    "LineCount": 8,
    "DeliveredLinesCount": 9,
    "UnitAmountTaxIncludedType": 10,
    "DateOfPurchase": "2019-11-28T09:46:00.3194337Z",
    "DateOfDelivery": "2019-11-28T09:46:00.3194337Z",
    "QuotedDeliveryDate": "2019-11-28T09:46:00.3194337Z",
    "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
  }
}