Back

Search

Search

Methods

Inventory

OrderPrintStatus
Orders

PurchaseOrder /Modify_PurchaseOrderItems_Bulk

Allows 150 calls per minute

Response: Modify_PurchaseOrderItems_BulkResponse



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

Parameters

NameTypeDescription
requestModify_PurchaseOrderItems_BulkRequest

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/Modify_PurchaseOrderItems_Bulk?request=%7B%0D%0A%20%20%22PurchaseId%22%3A%20%228aff29fe-f2ad-4e89-8e58-2bdb97650e0c%22%2C%0D%0A%20%20%22ItemsToAdd%22%3A%20%5B%0D%0A%20%20%20%20%7B%0D%0A%20%20%20%20%20%20%22Id%22%3A%20%2202f16fd7-ebad-436c-8117-8246b020b0bc%22%2C%0D%0A%20%20%20%20%20%20%22StockItemId%22%3A%20%22e4c2eb0f-d1a5-40bf-ba60-0852554fc2c5%22%2C%0D%0A%20%20%20%20%20%20%22Qty%22%3A%203%2C%0D%0A%20%20%20%20%20%20%22Cost%22%3A%201.0%2C%0D%0A%20%20%20%20%20%20%22TaxRate%22%3A%202.0%2C%0D%0A%20%20%20%20%20%20%22PackQuantity%22%3A%201%2C%0D%0A%20%20%20%20%20%20%22PackSize%22%3A%201%0D%0A%20%20%20%20%7D%0D%0A%20%20%5D%2C%0D%0A%20%20%22ItemsToUpdate%22%3A%20%5B%0D%0A%20%20%20%20%7B%0D%0A%20%20%20%20%20%20%22Id%22%3A%20%22aa72b756-e8aa-475e-ade5-90be85e402ea%22%2C%0D%0A%20%20%20%20%20%20%22PurchaseItemId%22%3A%20%221f7ad16f-cb3a-490e-af5f-600de9bc3447%22%2C%0D%0A%20%20%20%20%20%20%22StockItemId%22%3A%20%229200a308-26e6-4328-bdb7-88698b8d3980%22%2C%0D%0A%20%20%20%20%20%20%22Qty%22%3A%204%2C%0D%0A%20%20%20%20%20%20%22Cost%22%3A%201.0%2C%0D%0A%20%20%20%20%20%20%22TaxRate%22%3A%202.0%2C%0D%0A%20%20%20%20%20%20%22PackQuantity%22%3A%201%2C%0D%0A%20%20%20%20%20%20%22PackSize%22%3A%201%0D%0A%20%20%20%20%7D%0D%0A%20%20%5D%2C%0D%0A%20%20%22ItemsToDelete%22%3A%20%5B%0D%0A%20%20%20%20%229ea15cd9-7eb8-4aa7-b08a-401e35453301%22%0D%0A%20%20%5D%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/Modify_PurchaseOrderItems_Bulk

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.

request={
  "PurchaseId": "8aff29fe-f2ad-4e89-8e58-2bdb97650e0c",
  "ItemsToAdd": [
    {
      "Id": "02f16fd7-ebad-436c-8117-8246b020b0bc",
      "StockItemId": "e4c2eb0f-d1a5-40bf-ba60-0852554fc2c5",
      "Qty": 3,
      "Cost": 1.0,
      "TaxRate": 2.0,
      "PackQuantity": 1,
      "PackSize": 1
    }
  ],
  "ItemsToUpdate": [
    {
      "Id": "aa72b756-e8aa-475e-ade5-90be85e402ea",
      "PurchaseItemId": "1f7ad16f-cb3a-490e-af5f-600de9bc3447",
      "StockItemId": "9200a308-26e6-4328-bdb7-88698b8d3980",
      "Qty": 4,
      "Cost": 1.0,
      "TaxRate": 2.0,
      "PackQuantity": 1,
      "PackSize": 1
    }
  ],
  "ItemsToDelete": [
    "9ea15cd9-7eb8-4aa7-b08a-401e35453301"
  ]
}

Response

This is an example of the response JSON. Results will vary depending on your data.

{
  "ModifiedItems": [
    {
      "Id": "7d8a87a1-36f0-4778-876f-2b77f5133ad8",
      "PurchaseItemId": "d774b61b-714d-4bfc-b4a4-d72cace07ee5",
      "StockItemId": "3861193d-ca4a-4e85-a304-cd2be8790591",
      "Qty": 4,
      "BoundToOpenOrdersItems": 1,
      "QuantityBoundToOpenOrdersItems": 2,
      "Cost": 3.0,
      "TaxRate": 4.0,
      "PackQuantity": 1,
      "PackSize": 1
    }
  ],
  "PurchaseOrderHeader": {
    "pkPurchaseID": "f415091b-51b2-4f06-8243-2604cf87ea31",
    "fkSupplierId": "20d38167-1f2c-4d64-a526-eae1ca38939e",
    "fkLocationId": "3d509a88-bbed-4fbc-91be-74299c047943",
    "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.3566834Z",
    "DateOfDelivery": "2022-01-13T12:45:46.3566834Z",
    "QuotedDeliveryDate": "2022-01-13T12:45:46.3566834Z",
    "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
  }
}