Back

Search

Search

Methods

Inventory

OrderPrintStatus
Orders

ShippingService

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.PurchaseOrder.EditPurchaseOrderNode

Example Request

The following request format is required for this method.

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": "6cbae5c7-5489-47bf-8594-baeeccfd0ca2",
  "ItemsToAdd": [
    {
      "Id": "27143f95-9587-4797-9006-54ff47932e75",
      "StockItemId": "34c57584-be65-40b0-9296-c00c0cd55abe",
      "Qty": 3,
      "PackQuantity": 4,
      "PackSize": 5,
      "Cost": 1.0,
      "TaxRate": 2.0
    }
  ],
  "ItemsToUpdate": [
    {
      "Id": "759b64e0-bdae-4330-80bd-437b04d4eb7a",
      "PurchaseItemId": "dad31e9d-5fd4-4718-8b74-7fba269dcc52",
      "StockItemId": "49e84834-c1a3-4b84-97a2-980bef0fedd5",
      "Qty": 4,
      "PackQuantity": 5,
      "PackSize": 6,
      "Cost": 1.0,
      "TaxRate": 2.0
    }
  ],
  "ItemsToDelete": [
    "26a36924-8cd9-4e3a-8daf-8e5e49b45860"
  ]
}

Response

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

{
  "ModifiedItems": [
    {
      "Id": "3e996a70-b680-4465-9943-a229d8415045",
      "PurchaseItemId": "25b90672-fc76-4076-b651-7b261325ef0b",
      "StockItemId": "8201e3c1-358d-4d40-9f32-6a5755adf7a1",
      "Qty": 4,
      "PackQuantity": 5,
      "PackSize": 6,
      "BoundToOpenOrdersItems": 1,
      "QuantityBoundToOpenOrdersItems": 2,
      "Cost": 3.0,
      "TaxRate": 4.0
    }
  ],
  "PurchaseOrderHeader": {
    "pkPurchaseID": "de468f7e-779f-4cd1-b1eb-aaac70e2dfe5",
    "fkSupplierId": "3d57f6a3-20db-4654-946b-6d261cf9cb6c",
    "fkLocationId": "73f1f2d7-e29d-48cc-952b-5b915931679c",
    "ExternalInvoiceNumber": "sample string 4",
    "Status": 0,
    "Currency": "sample string 5",
    "SupplierReferenceNumber": "sample string 6",
    "Locked": true,
    "LineCount": 8,
    "DeliveredLinesCount": 9,
    "UnitAmountTaxIncludedType": 10,
    "DateOfPurchase": "2021-07-29T09:24:43.2432162Z",
    "DateOfDelivery": "2021-07-29T09:24:43.2432162Z",
    "QuotedDeliveryDate": "2021-07-29T09:24:43.2432162Z",
    "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
  }
}