---
title: "Create or update an invoice draft"
method: POST
path: "/invoices"
tags: ["Invoicing"]
---

# Create or update an invoice draft

`POST /invoices`

Creates a sales-invoice draft (or updates an existing one via `draft_id`). Monetary fields are integer cents; VAT rates are basis points (25.5% = 2550); line quantities are decimal strings. Delivery channel is one of `maventa_einvoice`, `email_pdf`, or `pdf_download`. Requires a write-scoped key.

## Request body

- InvoiceDraftInput — Input for creating or updating a sales-invoice draft. All money in integer cents; dates `YYYY-MM-DD`.
  - `customer_id` string — Target company. Optional for API keys.
  - `draft_id` string — Existing draft to update; omit to create a new draft.
  - `customer` Party, required — An invoicing counterparty (the customer you invoice), with e-invoice routing and per-party defaults. Rates in basis points (25.5% = 2550).
    - `id` string — Party id. Include on upsert to update an existing party.
    - `name` string, required
    - `business_id` string — Finnish business ID (Y-tunnus), e.g. `1234567-8`.
    - `vat_number` string — EU VAT number, e.g. `FI12345678`.
    - `address_line1` string
    - `postal_code` string
    - `city` string
    - `country_code` string — ISO 3166-1 alpha-2, e.g. `FI`.
    - `email` string
    - `einvoice_address` string — E-invoice (verkkolasku) address, e.g. an OVT identifier.
    - `einvoice_operator` string — E-invoice operator/intermediator code.
    - `default_payment_terms_days` integer
    - `default_vat_code` string
    - `default_vat_rate_basis_points` integer — Default VAT rate in basis points (25.5% = 2550).
    - `default_invoice_language` string
  - `lines` InvoiceLine[], required
    - `description` string, required
    - `quantity` string, required — Decimal quantity as a string, e.g. `"2.5"`.
    - `unit_price_cents` integer, required — Unit price in integer cents.
    - `vat_rate_basis_points` integer, nullable — VAT rate in basis points (25.5% = 2550); null when not applicable.
    - `vat_code` string — VAT treatment code.
    - `net_cents` integer, required — Line net amount in integer cents.
    - `vat_cents` integer, required — Line VAT amount in integer cents.
    - `gross_cents` integer, required — Line gross amount in integer cents.
  - `issue_date` string — `YYYY-MM-DD`.
  - `delivery_date` string — `YYYY-MM-DD`.
  - `due_date` string — `YYYY-MM-DD`.
  - `seller_iban` string
  - `seller_vat_id` string
  - `terms_days` integer — Payment terms in days.
  - `note` string
  - `language` string
  - `delivery_channel` 'maventa_einvoice' | 'email_pdf' | 'pdf_download' — How the invoice is delivered.
  - `email_subject` string — Subject line when `delivery_channel` is `email_pdf`.
  - `email_message` string — Email body when `delivery_channel` is `email_pdf`.
  - `net_cents` integer — Invoice total net in integer cents.
  - `vat_cents` integer — Invoice total VAT in integer cents.
  - `gross_cents` integer — Invoice total gross in integer cents.

## Response `200`

Draft created or updated.

- object
  - `id` string
  - `entity_id` string
  - `status` string
  - `draft` object
  - `customer` Party — An invoicing counterparty (the customer you invoice), with e-invoice routing and per-party defaults. Rates in basis points (25.5% = 2550).
    - `id` string — Party id. Include on upsert to update an existing party.
    - `name` string, required
    - `business_id` string — Finnish business ID (Y-tunnus), e.g. `1234567-8`.
    - `vat_number` string — EU VAT number, e.g. `FI12345678`.
    - `address_line1` string
    - `postal_code` string
    - `city` string
    - `country_code` string — ISO 3166-1 alpha-2, e.g. `FI`.
    - `email` string
    - `einvoice_address` string — E-invoice (verkkolasku) address, e.g. an OVT identifier.
    - `einvoice_operator` string — E-invoice operator/intermediator code.
    - `default_payment_terms_days` integer
    - `default_vat_code` string
    - `default_vat_rate_basis_points` integer — Default VAT rate in basis points (25.5% = 2550).
    - `default_invoice_language` string

## Other responses

- `401` — Missing or invalid bearer token.
- `403` — Insufficient scope or role — e.g. a read-scoped key on a mutating method, or an API key on an admin/approver-only endpoint.

---

[API](https://skmtc.net/lastaccountingcompany/apis/lac-customer-api.md) · [All operations](https://skmtc.net/lastaccountingcompany/apis/lac-customer-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/lastaccountingcompany/lac-customer-api/versions/52e277b4f031/schema)
