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": "f470df1a-0727-4c43-b74f-fbb4b91bd7a3",
  "itemsToAdd": [
    {
      "PurchaseItemId": "52eeab58-6c10-445e-8e8b-45c7f862bd96",
      "Id": "9ccfbc51-ea4d-4a28-bbf8-8a42ace434b5",
      "PurchaseAdditionalCostItemId": 3,
      "AllocationPercentage": 4.0
    },
    {
      "PurchaseItemId": "52eeab58-6c10-445e-8e8b-45c7f862bd96",
      "Id": "9ccfbc51-ea4d-4a28-bbf8-8a42ace434b5",
      "PurchaseAdditionalCostItemId": 3,
      "AllocationPercentage": 4.0
    }
  ],
  "itemsToUpdate": [
    {
      "CostAllocationId": 1,
      "Id": "0d10b823-983d-4988-8197-084006f6c147",
      "PurchaseAdditionalCostItemId": 3,
      "AllocationPercentage": 4.0
    },
    {
      "CostAllocationId": 1,
      "Id": "0d10b823-983d-4988-8197-084006f6c147",
      "PurchaseAdditionalCostItemId": 3,
      "AllocationPercentage": 4.0
    }
  ],
  "itemsToDelete": [
    1,
    2
  ]
}

Response

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

{
  "ModifiedItems": [
    {
      "Id": "4c6f3c3a-4221-4668-b1ad-f37e3b25c0d8",
      "CostAllocationId": 2,
      "PurchaseAdditionalCostItemId": 3,
      "PurchaseItemId": "febb25bd-12a2-4dfc-8a41-6915e191df26",
      "AllocationPercentage": 5.0
    },
    {
      "Id": "4c6f3c3a-4221-4668-b1ad-f37e3b25c0d8",
      "CostAllocationId": 2,
      "PurchaseAdditionalCostItemId": 3,
      "PurchaseItemId": "febb25bd-12a2-4dfc-8a41-6915e191df26",
      "AllocationPercentage": 5.0
    }
  ]
}