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": "4154344c-44e3-471f-b845-e2ee5ac40847",
  "ItemsToAdd": [
    {
      "Id": "4ce6325b-91e0-4f8a-9651-165fa4b59c76",
      "StockItemId": "e61d993a-5aaa-442d-ae4c-4cc071abd52a",
      "Qty": 3,
      "Cost": 1.0,
      "TaxRate": 2.0,
      "PackQuantity": 1,
      "PackSize": 1
    }
  ],
  "ItemsToUpdate": [
    {
      "Id": "bd08b5bb-5e8c-4737-bc6a-9b20f4a42ea0",
      "PurchaseItemId": "161bfb12-5c42-4e65-a45b-4f0ed0a6a92d",
      "StockItemId": "4f787caf-ef67-47bc-90a9-ca077a19883f",
      "Qty": 4,
      "Cost": 1.0,
      "TaxRate": 2.0,
      "PackQuantity": 1,
      "PackSize": 1
    }
  ],
  "ItemsToDelete": [
    "158563e4-cd8c-45ea-845a-063f43a74169"
  ]
}

Response

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

{
  "ModifiedItems": [
    {
      "Id": "3d295123-23ea-4710-afde-c55d7058a601",
      "PurchaseItemId": "c7fb5c74-f166-4be6-aa77-371b1aecbf9e",
      "StockItemId": "2db3a7f3-a960-4016-88da-5e96f8339aaf",
      "Qty": 4,
      "BoundToOpenOrdersItems": 1,
      "QuantityBoundToOpenOrdersItems": 2,
      "Cost": 3.0,
      "TaxRate": 4.0,
      "PackQuantity": 1,
      "PackSize": 1
    }
  ],
  "PurchaseOrderHeader": {
    "pkPurchaseID": "cddf25af-1011-43d2-b2ef-3e484e5c499a",
    "fkSupplierId": "a1f9d7fd-9787-46a8-b13b-f6a205086a93",
    "fkLocationId": "76d35362-c946-4c1e-a1b5-c9a983d81742",
    "ExternalInvoiceNumber": "sample string 4",
    "Status": 0,
    "Currency": "sample string 5",
    "SupplierReferenceNumber": "sample string 6",
    "Locked": true,
    "LineCount": 8,
    "DeliveredLinesCount": 9,
    "UnitAmountTaxIncludedType": 10,
    "DateOfPurchase": "2022-08-03T16:02:32.0809063Z",
    "DateOfDelivery": "2022-08-03T16:02:32.0809063Z",
    "QuotedDeliveryDate": "2022-08-03T16:02:32.0809063Z",
    "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
  }
}