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": "e6cc73f3-ec92-4c67-bda7-0965e58a5076",
  "itemsToAdd": [
    {
      "PurchaseItemId": "4b0e6ea1-9a63-4f99-86f8-043e4bafe518",
      "Id": "22ed0e84-c331-46eb-b044-31495e8f0d07",
      "PurchaseAdditionalCostItemId": 3,
      "AllocationPercentage": 4.0
    },
    {
      "PurchaseItemId": "4b0e6ea1-9a63-4f99-86f8-043e4bafe518",
      "Id": "22ed0e84-c331-46eb-b044-31495e8f0d07",
      "PurchaseAdditionalCostItemId": 3,
      "AllocationPercentage": 4.0
    }
  ],
  "itemsToUpdate": [
    {
      "CostAllocationId": 1,
      "Id": "3f09b208-bd3f-4581-8478-0c9a9d97e39a",
      "PurchaseAdditionalCostItemId": 3,
      "AllocationPercentage": 4.0
    },
    {
      "CostAllocationId": 1,
      "Id": "3f09b208-bd3f-4581-8478-0c9a9d97e39a",
      "PurchaseAdditionalCostItemId": 3,
      "AllocationPercentage": 4.0
    }
  ],
  "itemsToDelete": [
    1,
    2
  ]
}

Response

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

{
  "ModifiedItems": [
    {
      "Id": "a408f5d6-7aa1-4c46-805a-2d919d230aac",
      "CostAllocationId": 2,
      "PurchaseAdditionalCostItemId": 3,
      "PurchaseItemId": "effdcc05-8fe4-4b41-befc-b666bc7b0195",
      "AllocationPercentage": 5.0
    },
    {
      "Id": "a408f5d6-7aa1-4c46-805a-2d919d230aac",
      "CostAllocationId": 2,
      "PurchaseAdditionalCostItemId": 3,
      "PurchaseItemId": "effdcc05-8fe4-4b41-befc-b666bc7b0195",
      "AllocationPercentage": 5.0
    }
  ]
}