---
title: "Create product calculation line item V3"
method: POST
path: "/api/v3/products/{id}/calculationItems"
tags: ["ProductCalculation"]
---

# Create product calculation line item V3

`POST /api/v3/products/{id}/calculationItems`

This endpoint requires the following scopes: `productCalculation:create`.

Create a product calculation line item

## Path parameters

- `id` string, required

## Request body

- object — Payload to create a product calculation line item
  - `designation` union, required — Designation of the line item.
    - string
    - 'additionalCosts' | 'productionCosts' | 'purchaseCosts' | 'additionalParts' | 'freightCosts' | 'additionalFreightCosts'
  - `date` string, date, required — Date of the cost.
  - `costType` 'oneTime' | 'perPiece' | 'perLot' | 'purchase' | 'oldMovingAverage', required — Type of the cost.
  - `includeInCalculation` boolean — Includes the line item into the calculation of the purchase price.
  - `totalCost` object, required — Total cost of the line item.
    - `amount` string, decimal, required — Total cost amount of the line item.
    - `currency` string, required — Total cost currency of the line item.
  - `forQuantity` integer — Quantity for the total cost of the line item.
  - `archived` boolean — Marks a calculation line item as archived. Archived line items will not be used for further calculations.
  - `internalComment` string — Internal comment. Intended to be used for company-internal notes.

## Response `201`

Create a product calculation line item

- object
  - `data` object — A product calculation line item
    - `id` string — ID of the line item.
    - `designation` union — Designation of the line item.
      - string
      - 'additionalCosts' | 'productionCosts' | 'purchaseCosts' | 'additionalParts' | 'freightCosts' | 'additionalFreightCosts'
    - `date` string, date — Date of the cost.
    - `costType` 'oneTime' | 'perPiece' | 'perLot' | 'purchase' | 'oldMovingAverage' — Type of the cost.
    - `includeInCalculation` boolean — Whether the line item is included in the purchase price calculation.
    - `totalCost` object — Total cost of the line item.
      - `amount` string — Total cost amount.
      - `currency` string — Total cost currency.
    - `forQuantity` unknown
    - `costPerUnit` object — Cost per unit.
      - `amount` string — Cost per unit amount.
      - `currency` string — Cost per unit currency.
    - `purchaseOrder` object — The purchase order connected to this line item.
      - `id` string — Purchase order ID.
    - `archived` boolean — Whether the line item is archived.
    - `editor` object — The editor who created/modified the line item.
      - `id` string — User ID of the editor.
      - `name` string — Username of the editor.
    - `internalComment` string — Internal comment. Intended to be used for company-internal notes.

## Other responses

- `400` — Failed validation
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `429` — Too Many Requests

---

[API](https://skmtc.dev/xentral/apis/xentral-api.md) · [All operations](https://skmtc.dev/xentral/apis/xentral-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/xentral/xentral-api/revisions/8a27ba392442/schema)
