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": "23404f95-8943-4284-9438-2ece6197914f",
  "itemsToAdd": [
    {
      "PurchaseItemId": "d5b8b2bd-dd23-4777-aaa1-23f14f30cc4e",
      "Id": "45b725b1-443d-42f2-93fb-fb32b230ffc0",
      "PurchaseAdditionalCostItemId": 3,
      "AllocationPercentage": 4.0
    },
    {
      "PurchaseItemId": "d5b8b2bd-dd23-4777-aaa1-23f14f30cc4e",
      "Id": "45b725b1-443d-42f2-93fb-fb32b230ffc0",
      "PurchaseAdditionalCostItemId": 3,
      "AllocationPercentage": 4.0
    }
  ],
  "itemsToUpdate": [
    {
      "CostAllocationId": 1,
      "Id": "9b4bb055-20bd-43df-96a1-967e954213f1",
      "PurchaseAdditionalCostItemId": 3,
      "AllocationPercentage": 4.0
    },
    {
      "CostAllocationId": 1,
      "Id": "9b4bb055-20bd-43df-96a1-967e954213f1",
      "PurchaseAdditionalCostItemId": 3,
      "AllocationPercentage": 4.0
    }
  ],
  "itemsToDelete": [
    1,
    2
  ]
}

Response

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

{
  "ModifiedItems": [
    {
      "Id": "35588e9d-5e6b-48ff-92e2-ba0dc92a8be2",
      "CostAllocationId": 2,
      "PurchaseAdditionalCostItemId": 3,
      "PurchaseItemId": "2687a6be-354a-463a-a00e-8210a6bf7bff",
      "AllocationPercentage": 5.0
    },
    {
      "Id": "35588e9d-5e6b-48ff-92e2-ba0dc92a8be2",
      "CostAllocationId": 2,
      "PurchaseAdditionalCostItemId": 3,
      "PurchaseItemId": "2687a6be-354a-463a-a00e-8210a6bf7bff",
      "AllocationPercentage": 5.0
    }
  ]
}