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": "2fcd96b6-775d-46d1-bd86-bbaa3c6f540c",
  "ItemsToAdd": [
    {
      "Id": "f83759d6-c3c2-4f6b-af82-12683ef08216",
      "StockItemId": "f3ca3a76-e25b-43c7-869c-05c2179886ad",
      "Qty": 3,
      "PackQuantity": 4,
      "PackSize": 5,
      "Cost": 1.0,
      "TaxRate": 2.0
    },
    {
      "Id": "f83759d6-c3c2-4f6b-af82-12683ef08216",
      "StockItemId": "f3ca3a76-e25b-43c7-869c-05c2179886ad",
      "Qty": 3,
      "PackQuantity": 4,
      "PackSize": 5,
      "Cost": 1.0,
      "TaxRate": 2.0
    }
  ],
  "ItemsToUpdate": [
    {
      "Id": "3b6bc652-f15c-470b-82ce-fb37dd94735d",
      "PurchaseItemId": "bbd9104d-adcb-46d6-956e-8e2baa509e01",
      "StockItemId": "2ed79418-d0a9-4431-88b1-2d65745ad48c",
      "Qty": 4,
      "PackQuantity": 5,
      "PackSize": 6,
      "Cost": 1.0,
      "TaxRate": 2.0
    },
    {
      "Id": "3b6bc652-f15c-470b-82ce-fb37dd94735d",
      "PurchaseItemId": "bbd9104d-adcb-46d6-956e-8e2baa509e01",
      "StockItemId": "2ed79418-d0a9-4431-88b1-2d65745ad48c",
      "Qty": 4,
      "PackQuantity": 5,
      "PackSize": 6,
      "Cost": 1.0,
      "TaxRate": 2.0
    }
  ],
  "ItemsToDelete": [
    "d956f994-d200-4299-be38-6fcb3760dd21",
    "be760a2b-3e15-4fa3-9d4c-67d8208627df"
  ]
}

Response

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

{
  "ModifiedItems": [
    {
      "Id": "ef96b24d-6f9e-4bdb-af2b-b579d2fe17ee",
      "PurchaseItemId": "14a4e136-be9f-4af6-8aa5-8d2e0d10af87",
      "StockItemId": "b15c0a76-27e7-4a40-9c75-7d166b1da991",
      "Qty": 4,
      "PackQuantity": 5,
      "PackSize": 6,
      "Cost": 1.0,
      "TaxRate": 2.0
    },
    {
      "Id": "ef96b24d-6f9e-4bdb-af2b-b579d2fe17ee",
      "PurchaseItemId": "14a4e136-be9f-4af6-8aa5-8d2e0d10af87",
      "StockItemId": "b15c0a76-27e7-4a40-9c75-7d166b1da991",
      "Qty": 4,
      "PackQuantity": 5,
      "PackSize": 6,
      "Cost": 1.0,
      "TaxRate": 2.0
    }
  ],
  "PurchaseOrderHeader": {
    "pkPurchaseID": "94ab91cf-ebc1-4422-882f-a94ecee69d7f",
    "fkSupplierId": "0e7435af-20d4-4c2b-80ab-465961d92c89",
    "fkLocationId": "d7f88269-09fc-475e-96d3-613407da84bf",
    "ExternalInvoiceNumber": "sample string 4",
    "Status": 0,
    "Currency": "sample string 5",
    "SupplierReferenceNumber": "sample string 6",
    "Locked": true,
    "LineCount": 8,
    "DeliveredLinesCount": 9,
    "UnitAmountTaxIncludedType": 10,
    "DateOfPurchase": "2018-10-03T11:12:35.2890658Z",
    "DateOfDelivery": "2018-10-03T11:12:35.2890658Z",
    "QuotedDeliveryDate": "2018-10-03T11:12:35.2890658Z",
    "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
  }
}