---
title: "Modify_AdditionalCost"
method: POST
path: "/api/PurchaseOrder/Modify_AdditionalCost"
tags: ["PurchaseOrder"]
---

# Modify_AdditionalCost

`POST /api/PurchaseOrder/Modify_AdditionalCost`

Modify purchase order additional costs. You can add new lines, update and delete existing. The method will return modified list back to you with each record identified by unique identifier.
Purchase Order header will also be returned with new total recalculated
<b>Permissions Required: </b> GlobalPermissions.Inventory.PurchaseOrder.EditPurchaseOrderNode
<b>Rate limit: </b><span style="background-color:#0272d9;color:white;padding:4px 8px;text-align:center;border-radius:5px; font-size: small;"><b>150</b></span> / minute

## Request body

- PurchaseOrderModifyAdditionalCostRequest
  - `request` ModifyAdditionalCostRequest
    - `itemsToAdd` AddAdditionalCostItem[] — list of additional cost items to add. Each item has Id which will be returned to you to match the item you are adding to array on your side
      - `Id` string, uuid — Each item in the request can have unique Id supplied (uniqueidentifier) this Id will be returned to you in the response so you can match request item with the response
      - `AdditionalCostTypeId` integer
      - `Reference` string — Additional cost reference
      - `SubTotalLineCost` number, double — Line Subtotal (Total less tax)
      - `TaxRate` number, double — Tax rate
      - `Currency` string — Currency code
      - `ConversionRate` number, double — Conversion rate from system currency, i.e. system currency rate to additional cost currency. For example if your system currency is GBP and additional cost is in USD the converted value is USD / Rate, example calculation, Rate 1.27, Additional cost total is 100, converted value = 100 USD / 1.27 = 78.98 GBP
      - `AllocationLocked` boolean — If this flag is set, new items added to PO will not be part of the allocation cost
      - `Print` boolean — Indicate if the type will appear on prints and emaisl
      - `AllocationMethod` 'ByValue' | 'ByCBM'
    - `itemsToUpdate` UpdateAdditionalCostItem[] — List of items to update. Each line is identified by
      - `PurchaseAdditionalCostItemId` integer — Additional cost line row id, uniquely identifying each cost line
      - `Id` string, uuid — Each item in the request can have unique Id supplied (uniqueidentifier) this Id will be returned to you in the response so you can match request item with the response
      - `AdditionalCostTypeId` integer
      - `Reference` string — Additional cost reference
      - `SubTotalLineCost` number, double — Line Subtotal (Total less tax)
      - `TaxRate` number, double — Tax rate
      - `Currency` string — Currency code
      - `ConversionRate` number, double — Conversion rate from system currency, i.e. system currency rate to additional cost currency. For example if your system currency is GBP and additional cost is in USD the converted value is USD / Rate, example calculation, Rate 1.27, Additional cost total is 100, converted value = 100 USD / 1.27 = 78.98 GBP
      - `AllocationLocked` boolean — If this flag is set, new items added to PO will not be part of the allocation cost
      - `Print` boolean — Indicate if the type will appear on prints and emaisl
      - `AllocationMethod` 'ByValue' | 'ByCBM'
    - `itemsToDelete` integer[] — List of items to delete, provide list of PurchaseAdditionalCostItemId's
    - `PurchaseId` string, uuid — Purchase order id

## Response `200`

OK

- PurchaseOrderModifyAdditionalCostResponse
  - `ModifiedItems` CommonModifiedAdditionalCostItem[] — List of modified items, added or updated. Each item has Id which was provided in the request
    - `Id` string, uuid — Each item in the request can have unique Id supplied (uniqueidentifier) this Id will be returned to you in the response so you can match request item with the response
    - `PurchaseAdditionalCostItemId` integer — Unique record id
    - `AdditionalCostTypeId` integer — Additional cost type Id
    - `Reference` string — Additional cost reference
    - `SubTotalLineCost` number, double — Line Subtotal (Total less tax)
    - `TaxRate` number, double — Tax rate
    - `Tax` number, double — Tax amount
    - `Currency` string — Currency code
    - `ConversionRate` number, double — Conversion rate from system currency, i.e. system currency rate to additional cost currency. For example if your system currency is GBP and additional cost is in USD the converted value is USD / Rate, example calculation, Rate 1.27, Additional cost total is 100, converted value = 100 USD / 1.27 = 78.98 GBP
    - `TotalLineCost` number, double — Total cost, this is subtotal + tax (in system currency)
    - `CostAllocation` CommonPurchaseOrderAdditionalCostAllocation[] — List of cost allocations. The list defines which PO items the additional cost will be attributed to. If the specific value is not entered, it means the cost is equaly distributed The List is populated as part of Get_PurchaseOrder method
      - `CostAllocationId` integer — Allocation row id. Use this Id to update or delete specific record.
      - `PurchaseAdditionalCostItemId` integer — Relation to additional cost line
      - `PurchaseItemId` string, uuid — Specific purchase order line id the cost is attributed to
      - `AllocationPercentage` number, double — Percentage of the cost that will be attributed to Purchase order item id
    - `AllocationLocked` boolean — If this flag is set, new items added to PO will not be part of the allocation cost
    - `AdditionalCostTypeName` string — Additional cost type name
    - `AdditionalCostTypeIsShippingType` boolean — Indicate if the additional cost type is Shipping type
    - `AdditionalCostTypeIsPartialAllocation` boolean — Indicate if the additional cost type allow partial allocation
    - `Print` boolean — Indicate if the additional cost has to be shown in prints and emails
    - `AllocationMethod` 'ByValue' | 'ByCBM' — Indicate the method to calculate the allocation % for each item
  - `PurchaseOrderHeader` CommonPurchaseOrderHeader — Class represents purchase order header.
    - `pkPurchaseID` string, uuid — Unique identifier for the purchase order. You have to use this ID for all updates to the PO
    - `fkSupplierId` string, uuid — Unique identifier for the supplier. Empty Guid is default supplier. Otherwise use Supplier API to get the names and additional data for the supplier
    - `fkLocationId` string, uuid — Unique idenfidier of the location where the PO is expected to be delivered to. Empty Guid is default location. Use Locations API methods to get the names and additional details for the locations
    - `ExternalInvoiceNumber` string — Purchase order reference number
    - `Status` 'PENDING' | 'OPEN' | 'PARTIAL' | 'DELIVERED' — Purchase order status. PENDING - purchase order can be changed, not yet affecting stock levels OPEN - purchase order is created and stock levels Due are reflected PARTIAL - partially delivered DELIVERED - fully delivered
    - `Currency` string — Currency of the monetary values in the purchase order
    - `SupplierReferenceNumber` string — Supplier reference number for the purchase order
    - `Locked` boolean — Identified whether the PO is locked. This is for external application use only.
    - `UnitAmountTaxIncludedType` integer — Unit amount includes,exclud or no tax. 0 - Tax Exclusive cost, 1 - Cost Inclusive of tax, 2 - No Tax
    - `LineCount` integer — Number of items in the purchase order
    - `DeliveredLinesCount` integer — Count of all purchase order lines which are delivered (lines where some but not all of the stock has been received are counted as undelivered)
    - `DateOfPurchase` string, date-time — DateTime of the purchase order UTC
    - `DateOfDelivery` string, date-time — DateTime of the purchase order delivered, will be set to DateOfPurchase until the PO is fully delivered UTC
    - `QuotedDeliveryDate` string, date-time — DateTime of the purchase order qouted/expected delivery date UTC
    - `PostagePaid` number, double — **DEPRECIATED** Use additional costs with Shipping flag to record shipping costs. This field remains available in the API for backward compatibility and acts pretty much like an additional cost item with type id = 0
    - `TotalCost` number, double — Total purchase price of the purchase order. Calculated from all purchase order items including tax and postage.
    - `taxPaid` number, double — Total tax of the purchase order. Calculated from all purchase order items (excludes postage).
    - `ShippingTaxRate` number, double — **DEPRECIATED** Use additional costs with Shipping flag to record shipping costs. This field remains available in the API for backward compatibility and acts pretty much like an additional cost item with type id = 0
    - `ConversionRate` number, double — Conversion rate of the purchase order currency. When PO is delivered Stock Value will be multipled by this conversion rate. For example if your system currency is GBP and Purchase order is in EUR the conversion rate is 0.81.
    - `ConvertedShippingCost` number, double — Total shipping cost of the purchase order, converted to system currency
    - `ConvertedShippingTax` number, double — Total shipping cost tax of the purchase order, converted to system currency
    - `ConvertedOtherCost` number, double — Total amount of additional costs of the purchase order, converted to system currency
    - `ConvertedOtherTax` number, double — Total tax amount of additional costs of the purchase order, converted to system currency
    - `ConvertedGrandTotal` number, double — Total amount of the purchase order, converted to system currency

---

[API](https://skmtc.net/linnworks/apis/authenticate-api.md) · [All operations](https://skmtc.net/linnworks/apis/authenticate-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/linnworks/authenticate-api/versions/0123569a22fb/schema)
