---
title: "Add a line item to an invoice"
method: POST
path: "/companies/{companyId}/invoices/{invoiceId}/line-items"
tags: ["invoices"]
---

# Add a line item to an invoice

`POST /companies/{companyId}/invoices/{invoiceId}/line-items`

Adds a line item to an existing draft invoice. The item will be added last in the list of line items on the invoice.

**NOTE:** The invoice must be in draft status.

**Scope:** `invoices:write`

## Request body

- union
  - object
    - `id` integer, nullable — Should not be set for new items
    - `itemRef` object, nullable — Identifier of an existing salesItem to use as a template. Fields itemType and quantity are required. Values in other fields will be overridden by values from this referenced item
      - `id` string, uuid — Reference to existing salesItem id
      - `description` string, nullable
    - `description` string, required
    - `itemType` 'salesItem', required
    - `productType` 'goods' | 'services', required
    - `unitType` 'unspecified' | 'piece' | 'hour' | 'day' | 'month' | 'kilogram' | 'gram' | 'liter' | 'meter' | 'centimeter' | 'millimeter' | 'meterSquared' | 'meterCubic' | 'mile' | 'kilometer' | 'gigabyte' | 'hectar' | 'words' | 'year' | 'week' | 'minute' | 'megabyte' | 'ton'
    - `quantity` number, double, required
    - `unitPrice` number, double, required
    - `taxRate` number, double, required
    - `bookkeepingAccountNumber` integer, nullable — Use the `bookkeepingAccountNumber` field in the line items to specify an accounting account other than the account that would be automatically be selected based on the item productType, taxRate, customer and company settings. Accounts that would be automatically selected cannot be set on this field.
    - `taxReduction` LineItemTaxReduction, nullable — Tax reduction details for a line item. Only applicable to line items with productType `services` and unitType `hour` or `unspecified`.
      - `taxReductionType` 'rot' | 'rut', required — The tax reduction type for this line item. Must match the invoice-level taxReduction type.
      - `jobType` 'rotConstruction' | 'rotElectricity' | 'rotGlassPlate' | 'rotSoilWork' | 'rotSweeping' | 'rotPainting' | 'rotPlumbing' | 'rutChildServices' | 'rutDataITServices' | 'rutRemovalServices' | 'rutClothingCare' | 'rutPersonalHelpCare' | 'rutRepair' | 'rutSnow' | 'rutCleaning' | 'rutGardening' | 'rutWaterWashingOfTextiles' | 'rutFurnishing' | 'rutTransportOfHouseholdGoods' | 'rutHousingSupervision', required — The job type categorizing the work. The prefix must match the tax reduction type: - ROT types: rotConstruction, rotElectricity, rotGlassPlate, rotSoilWork, rotSweeping, rotPainting, rotPlumbing - RUT types: rutChildServices, rutDataITServices, rutRemovalServices, rutClothingCare, rutPersonalHelpCare, rutRepair, rutSnow, rutCleaning, rutGardening, rutWaterWashingOfTextiles, rutFurnishing, rutTransportOfHouseholdGoods, rutHousingSupervision
  - object
    - `id` integer, nullable — Should not be set for new items
    - `itemRef` object, nullable — Identifier of an existing descriptionOnlyItem to use as a template. The field itemType is required.
      - `id` string, uuid — Reference to existing descriptionOnlyItem id
      - `description` string, nullable
    - `description` string, required
    - `itemType` 'descriptionOnlyItem', required

## Response `200`

Line item added

- union
  - object
    - `id` integer, nullable — Should not be set for new items
    - `itemRef` object, nullable — Identifier of an existing salesItem to use as a template. Fields itemType and quantity are required. Values in other fields will be overridden by values from this referenced item
      - `id` string, uuid — Reference to existing salesItem id
      - `description` string, nullable
    - `description` string, required
    - `itemType` 'salesItem', required
    - `productType` 'goods' | 'services', required
    - `unitType` 'unspecified' | 'piece' | 'hour' | 'day' | 'month' | 'kilogram' | 'gram' | 'liter' | 'meter' | 'centimeter' | 'millimeter' | 'meterSquared' | 'meterCubic' | 'mile' | 'kilometer' | 'gigabyte' | 'hectar' | 'words' | 'year' | 'week' | 'minute' | 'megabyte' | 'ton'
    - `quantity` number, double, required
    - `unitPrice` number, double, required
    - `taxRate` number, double, required
    - `bookkeepingAccountNumber` integer, nullable — Use the `bookkeepingAccountNumber` field in the line items to specify an accounting account other than the account that would be automatically be selected based on the item productType, taxRate, customer and company settings. Accounts that would be automatically selected cannot be set on this field.
    - `taxReduction` LineItemTaxReduction, nullable — Tax reduction details for a line item. Only applicable to line items with productType `services` and unitType `hour` or `unspecified`.
      - `taxReductionType` 'rot' | 'rut', required — The tax reduction type for this line item. Must match the invoice-level taxReduction type.
      - `jobType` 'rotConstruction' | 'rotElectricity' | 'rotGlassPlate' | 'rotSoilWork' | 'rotSweeping' | 'rotPainting' | 'rotPlumbing' | 'rutChildServices' | 'rutDataITServices' | 'rutRemovalServices' | 'rutClothingCare' | 'rutPersonalHelpCare' | 'rutRepair' | 'rutSnow' | 'rutCleaning' | 'rutGardening' | 'rutWaterWashingOfTextiles' | 'rutFurnishing' | 'rutTransportOfHouseholdGoods' | 'rutHousingSupervision', required — The job type categorizing the work. The prefix must match the tax reduction type: - ROT types: rotConstruction, rotElectricity, rotGlassPlate, rotSoilWork, rotSweeping, rotPainting, rotPlumbing - RUT types: rutChildServices, rutDataITServices, rutRemovalServices, rutClothingCare, rutPersonalHelpCare, rutRepair, rutSnow, rutCleaning, rutGardening, rutWaterWashingOfTextiles, rutFurnishing, rutTransportOfHouseholdGoods, rutHousingSupervision
  - object
    - `id` integer, nullable — Should not be set for new items
    - `itemRef` object, nullable — Identifier of an existing descriptionOnlyItem to use as a template. The field itemType is required.
      - `id` string, uuid — Reference to existing descriptionOnlyItem id
      - `description` string, nullable
    - `description` string, required
    - `itemType` 'descriptionOnlyItem', required

## Other responses

- `400` — Missing required information
- `404` — Invoice not found

---

[API](https://skmtc.net/bokio/apis/company-api.md) · [All operations](https://skmtc.net/bokio/apis/company-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/bokio/company-api/revisions/1bb5d09ce15e/schema)
