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.

Endpoint URL

GET | 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": "364f52a3-0660-43b8-8d68-28509f794955",
  "ItemsToAdd": [
    {
      "Id": "6fdce869-7907-4190-a558-1e05c3809697",
      "StockItemId": "b6a471e3-795e-4068-a642-dd0e49df6441",
      "Qty": 3,
      "Cost": 1.0,
      "TaxRate": 2.0,
      "PackQuantity": 1,
      "PackSize": 1
    }
  ],
  "ItemsToUpdate": [
    {
      "Id": "d6128b82-0024-49dd-af75-b1bb2c3fd2d3",
      "PurchaseItemId": "a7c858c1-9c9b-44ec-8075-a3bb27cf7d7a",
      "StockItemId": "cb23022e-e2ca-44d8-92a0-ca04d982fd04",
      "Qty": 4,
      "Cost": 1.0,
      "TaxRate": 2.0,
      "PackQuantity": 1,
      "PackSize": 1
    }
  ],
  "ItemsToDelete": [
    "2701e6f0-1773-4a7d-8a29-1cedc9c2f6fd"
  ]
}

Response

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

{
  "ModifiedItems": [
    {
      "Id": "63d76d2c-f793-42c3-87b5-36c1f96a8f8c",
      "PurchaseItemId": "c901e2b9-e807-49c5-a561-bcdf7d65b61e",
      "StockItemId": "55e18cf8-93c1-4455-b126-058552b33b9e",
      "Qty": 4,
      "BoundToOpenOrdersItems": 1,
      "QuantityBoundToOpenOrdersItems": 2,
      "Cost": 3.0,
      "TaxRate": 4.0,
      "PackQuantity": 1,
      "PackSize": 1
    }
  ],
  "PurchaseOrderHeader": {
    "pkPurchaseID": "3b6aec13-e1ee-4a85-8687-090096b9b25b",
    "fkSupplierId": "a249747c-21e9-43af-9f94-e79b2158fd4d",
    "fkLocationId": "30a299ab-8687-4a97-a979-5740486104a2",
    "ExternalInvoiceNumber": "sample string 4",
    "Status": 0,
    "Currency": "sample string 5",
    "SupplierReferenceNumber": "sample string 6",
    "Locked": true,
    "LineCount": 8,
    "DeliveredLinesCount": 9,
    "UnitAmountTaxIncludedType": 10,
    "DateOfPurchase": "2022-09-05T15:10:03.9106886Z",
    "DateOfDelivery": "2022-09-05T15:10:03.9106886Z",
    "QuotedDeliveryDate": "2022-09-05T15:10:03.9106886Z",
    "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
  }
}