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": "fa4864f8-d5b9-4c42-aa06-ca0ad822d0f3",
  "itemsToAdd": [
    {
      "PurchaseItemId": "bccb3947-c998-4895-af2a-814f2f8936ad",
      "Id": "6d51ced6-a299-44cd-a9f0-252f916febaa",
      "PurchaseAdditionalCostItemId": 3,
      "AllocationPercentage": 4.0
    },
    {
      "PurchaseItemId": "bccb3947-c998-4895-af2a-814f2f8936ad",
      "Id": "6d51ced6-a299-44cd-a9f0-252f916febaa",
      "PurchaseAdditionalCostItemId": 3,
      "AllocationPercentage": 4.0
    }
  ],
  "itemsToUpdate": [
    {
      "CostAllocationId": 1,
      "Id": "06f6befe-81eb-4931-8c05-004813ba0c84",
      "PurchaseAdditionalCostItemId": 3,
      "AllocationPercentage": 4.0
    },
    {
      "CostAllocationId": 1,
      "Id": "06f6befe-81eb-4931-8c05-004813ba0c84",
      "PurchaseAdditionalCostItemId": 3,
      "AllocationPercentage": 4.0
    }
  ],
  "itemsToDelete": [
    1,
    2
  ]
}

Response

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

{
  "ModifiedItems": [
    {
      "Id": "f9b341be-3adf-4f2d-b69a-eadd94a09d73",
      "CostAllocationId": 2,
      "PurchaseAdditionalCostItemId": 3,
      "PurchaseItemId": "bc7eaf55-1bb3-4b7b-be4d-3379466d6d2b",
      "AllocationPercentage": 5.0
    },
    {
      "Id": "f9b341be-3adf-4f2d-b69a-eadd94a09d73",
      "CostAllocationId": 2,
      "PurchaseAdditionalCostItemId": 3,
      "PurchaseItemId": "bc7eaf55-1bb3-4b7b-be4d-3379466d6d2b",
      "AllocationPercentage": 5.0
    }
  ]
}