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

# Create a draft invoice

`POST /invoices`

## Request

- Base URL: `https://ledgerhq.pro/api/v1`
- URL: `https://ledgerhq.pro/api/v1/invoices`
- Auth: one of:
  - HTTP bearer and API key in header `x-organization-id`
  - HTTP bearer and API key in header `x-organization-id`

Creates a draft invoice in the company base currency. Numbering and due-date defaulting are automatic; the invoice posts to the books only when sent.

## Request body

- object
  - `ensureCatalogItems` boolean: Create/reuse active catalog items with revenue accounts atomically with the draft
  - `contactId` string, uuid, required
  - `issueDate` string, date, required
  - `dueDate` string, date: Defaults from the customer's payment terms
  - `reference` string, nullable
  - `notes` string, nullable
  - `currencyCode` string: Must equal the company base currency
  - `lines` object[], required
    - `itemId` string, uuid, nullable: Reusable catalog item UUID
    - `description` string, required
    - `quantity` number
    - `unitPrice` number: Major currency units (e.g. 125.50)
    - `accountId` string, uuid, nullable
    - `taxRateId` string, uuid, nullable
    - `discountPercent` integer: Basis points (500 = 5%)

## Response `201`

Created draft invoice

## Other responses

- `422`: Non-base currency or locked period
- `default`: Error response

---

[API](https://skmtc.dev/ledgerhq-pro/apis/ledgerhq-bookkeeping-api.md) · [All operations](https://skmtc.dev/ledgerhq-pro/apis/ledgerhq-bookkeeping-api/llms.txt) · [OpenAPI document](https://skmtc.dev/ledgerhq-pro/apis/ledgerhq-bookkeeping-api/revisions/9a8269f0a586?raw)
