---
title: "Create a sales invoice"
method: POST
path: "/api/v1/iqbooks/organisations/{organisationId}/sales-invoices"
tags: ["IQ Books — Invoices"]
---

# Create a sales invoice

`POST /api/v1/iqbooks/organisations/{organisationId}/sales-invoices`

## Request

- Base URL: `https://api.reconcileiq.com`
- URL: `https://api.reconcileiq.com/api/v1/iqbooks/organisations/{organisationId}/sales-invoices`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

Creates a sales invoice. By default the invoice is issued, posting the AR + VAT-control double-entry journal via the native validated path. Pass `issue: false` to leave it as a draft. `document_type: 'quote'` is never auto-issued. Requires scope `iqbooks:write`. Requires a vat_control-role account to exist in the organisation when the posting carries VAT; otherwise 422 unprocessable_entity ("VAT Control account is required ...").

## Path parameters

- `organisationId` integer, required

## Request body

- InvoiceCreate
  - `contact_id` integer, required: Customer id (sales) or supplier id (purchase).
  - `invoice_number` string
  - `invoice_date` string, date
  - `due_date` string, date
  - `currency` string
  - `description` string
  - `document_type` 'invoice' | 'credit_note' | 'quote'
  - `lines` InvoiceLineCreate[], required
    - `description` string
    - `account_id` integer, required: Income account (sales) or expense account (purchase).
    - `quantity` number
    - `unit_price` number
    - `net_amount` number, required
    - `vat_code` string
    - `vat_rate` number: Fraction (e.g. 0.2 for 20%).
    - `vat_amount` number
  - `issue` boolean: Default true (posts the journal). false leaves a draft. Ignored (never issued) for quotes.

## Response `201`

A single invoice (with lines).

- object
  - `data` Invoice, required
    - `id` integer
    - `organisation_id` integer
    - `contact_id` integer, nullable
    - `contact_name` string, nullable
    - `invoice_number` string
    - `invoice_date` string, date, nullable
    - `due_date` string, date, nullable
    - `currency` string
    - `status` string
    - `document_type` string
    - `description` string, nullable
    - `net_amount` number, nullable
    - `vat_amount` number, nullable
    - `gross_amount` number, nullable
    - `outstanding_amount` number, nullable
    - `journal_entry_id` integer, nullable
    - `created_at` string, date-time
    - `updated_at` string, date-time
    - `lines` object[]: Present on single-invoice responses.
      - `id` integer
      - `line_number` integer
      - `description` string, nullable
      - `account_id` integer, nullable
      - `account_code` string, nullable
      - `account_name` string, nullable
      - `quantity` number
      - `unit_price` number, nullable
      - `net_amount` number, nullable
      - `vat_code` string, nullable
      - `vat_rate` number, nullable
      - `vat_amount` number, nullable
      - `gross_amount` number, nullable

## Other responses

- `400`: The request body is not syntactically valid JSON. Returned in the standard envelope with an X-Request-Id, before authentication runs.
- `401`: Missing, invalid, or revoked API key.
- `403`: Authenticated but the key lacks the required scope.
- `404`: Resource not found, or not visible to the caller (no existence leak).
- `422`: CodeIQ / IQ Books strict-format contract violation.

---

[API](https://skmtc.dev/reconcileiq/apis/reconcileiq-public-api.md) · [All operations](https://skmtc.dev/reconcileiq/apis/reconcileiq-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/reconcileiq/apis/reconcileiq-public-api/revisions/5401beef8653?raw)
