Back

Search

Search

Methods

Inventory

Orders

PurchaseOrder /Modify_AdditionalCostAllocation

Response: Modify_AdditionalCostAllocationResponse



Modify additional cost allocation items

Parameters

NameTypeDescription
requestModify_AdditionalCostAllocationRequest

HTTP Endpoint

Server /PurchaseOrder / Modify_AdditionalCostAllocation

Permissions

GlobalPermissions.PurchaseOrder.EditPurchaseOrderNode

Example Code

Example Request

The following request format is required for this method.

POST https://eu-ext.linnworks.net//api/PurchaseOrder/Modify_AdditionalCostAllocation HTTP/1.1
Host: eu-ext.linnworks.net
Connection: keep-alive
Accept: application/json, text/javascript, */*; q=0.01
Origin: https://www.linnworks.net
Accept-Language: en
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.90 Safari/537.36
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Referer: https://www.linnworks.net/
Accept-Encoding: gzip, deflate
Authorization: INSERT_YOUR_TOKEN_HERE

request={
  "PurchaseId": "76d223e0-ec35-47e1-b02a-cb01aacbfa24",
  "itemsToAdd": [
    {
      "PurchaseItemId": "097581d3-744a-4055-a968-efb0742a1368",
      "Id": "90bbbcbe-b284-458d-9db0-e9ea0f745cfd",
      "PurchaseAdditionalCostItemId": 3,
      "AllocationPercentage": 4.0
    },
    {
      "PurchaseItemId": "097581d3-744a-4055-a968-efb0742a1368",
      "Id": "90bbbcbe-b284-458d-9db0-e9ea0f745cfd",
      "PurchaseAdditionalCostItemId": 3,
      "AllocationPercentage": 4.0
    }
  ],
  "itemsToUpdate": [
    {
      "CostAllocationId": 1,
      "Id": "8645627f-344a-4bf7-aa4e-329f921a1a39",
      "PurchaseAdditionalCostItemId": 3,
      "AllocationPercentage": 4.0
    },
    {
      "CostAllocationId": 1,
      "Id": "8645627f-344a-4bf7-aa4e-329f921a1a39",
      "PurchaseAdditionalCostItemId": 3,
      "AllocationPercentage": 4.0
    }
  ],
  "itemsToDelete": [
    1,
    2
  ]
}

Response

This is an example response. Results may vary depending on your data.

{
  "ModifiedItems": [
    {
      "Id": "a44a876f-fe95-4b98-99a5-9a47e553ca7c",
      "CostAllocationId": 2,
      "PurchaseAdditionalCostItemId": 3,
      "PurchaseItemId": "800a2b60-936e-495f-9d38-96d0dc8291a0",
      "AllocationPercentage": 5.0
    },
    {
      "Id": "a44a876f-fe95-4b98-99a5-9a47e553ca7c",
      "CostAllocationId": 2,
      "PurchaseAdditionalCostItemId": 3,
      "PurchaseItemId": "800a2b60-936e-495f-9d38-96d0dc8291a0",
      "AllocationPercentage": 5.0
    }
  ]
}