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": "139609fd-29a6-4721-8557-b69b66535e35",
  "ItemsToAdd": [
    {
      "Id": "040832e6-26f4-47f0-b50a-acbdb4c2a4bc",
      "StockItemId": "b337245a-ac9b-4c2b-83df-d70af84a4174",
      "Qty": 3,
      "Cost": 1.0,
      "TaxRate": 2.0,
      "PackQuantity": 1,
      "PackSize": 1
    }
  ],
  "ItemsToUpdate": [
    {
      "Id": "69b3a56c-03e4-460b-a5d4-b5c8a45c2af4",
      "PurchaseItemId": "9e2c1d0e-8074-41c5-8673-6991df1ea0ff",
      "StockItemId": "55220c8f-5498-42e7-8de7-3e5e325d48f9",
      "Qty": 4,
      "Cost": 1.0,
      "TaxRate": 2.0,
      "PackQuantity": 1,
      "PackSize": 1
    }
  ],
  "ItemsToDelete": [
    "a2148f20-a3c8-4bd0-ba0a-637b472b760f"
  ]
}

Response

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

{
  "ModifiedItems": [
    {
      "Id": "04d3e68e-3083-420b-bc8e-38dcda76919f",
      "PurchaseItemId": "a61526fe-2571-4370-9d49-b46863c32752",
      "StockItemId": "c74dd69d-db54-4e08-a2ac-58a538e1b2ff",
      "Qty": 4,
      "BoundToOpenOrdersItems": 1,
      "QuantityBoundToOpenOrdersItems": 2,
      "Cost": 3.0,
      "TaxRate": 4.0,
      "PackQuantity": 1,
      "PackSize": 1
    }
  ],
  "PurchaseOrderHeader": {
    "pkPurchaseID": "d75be326-ab3d-4e0a-9c13-6c5dcfd53c03",
    "fkSupplierId": "764d973a-f3ea-4d3a-a523-06313954368b",
    "fkLocationId": "c6bfd066-a1b6-4229-a163-d80f3bb77615",
    "ExternalInvoiceNumber": "sample string 4",
    "Status": 0,
    "Currency": "sample string 5",
    "SupplierReferenceNumber": "sample string 6",
    "Locked": true,
    "LineCount": 8,
    "DeliveredLinesCount": 9,
    "UnitAmountTaxIncludedType": 10,
    "DateOfPurchase": "2023-01-10T13:49:49.9067103Z",
    "DateOfDelivery": "2023-01-10T13:49:49.9067103Z",
    "QuotedDeliveryDate": "2023-01-10T13:49:49.9067103Z",
    "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
  }
}