LumaBill · Schema

InvoiceWrite

AccountingInvoicingSoftware-as-a-ServiceSwitzerlandSmall Business

Properties

Name Type Description
invoice_number stringnull Explicit number (imports, own numbering schemes), stored as given also on a draft; 409 DUPLICATE_INVOICE_NUMBER when another document of the same type in the profile already uses it. If omitted, a dra
client_id string UUID of an existing client. The API fetches the client data and snapshots it on the invoice. Returns `404` if not found.
status string
issue_date string Defaults to today if omitted.
due_date string Defaults to `issue_date` + profile payment deadline days (default 30) if omitted.
currency object Defaults to profile default currency (usually `CHF`).
exchangeRate numbernull Foreign-currency invoice only: CHF per 1 unit of `currency`, stored as a manual rate (MWSTV 45 Abs. 3bis). Omit to use the ESTV/BAZG rate of the invoice date. Taken while the invoice is a draft or by
lines array
notes stringnull
payment_terms stringnull
View JSON Schema on GitHub

JSON Schema

lumabill-ch-invoice-write-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/lumabill-ch/json-schema/lumabill-ch-invoice-write-schema.json",
  "title": "InvoiceWrite",
  "x-generated": "2026-11-17",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/lumabill-ch-openapi.yaml#/components/schemas/InvoiceWrite",
  "type": "object",
  "required": [
    "lines"
  ],
  "properties": {
    "invoice_number": {
      "type": [
        "string",
        "null"
      ],
      "description": "Explicit number (imports, own numbering schemes), stored as given also on a draft; 409 DUPLICATE_INVOICE_NUMBER when another document of the same type in the profile already uses it. If omitted, a draft stays unnumbered and the next number from the profile prefix + counter (e.g. `IV-010`) is assigned when the document is issued (status leaves draft, or it is emailed). null clears the number of a never-issued draft; an issued document keeps its number.\n"
    },
    "client_id": {
      "type": "string",
      "format": "uuid",
      "description": "UUID of an existing client. The API fetches the client data and snapshots it on the invoice. Returns `404` if not found.\n"
    },
    "status": {
      "type": "string",
      "enum": [
        "draft",
        "sent"
      ],
      "default": "draft"
    },
    "issue_date": {
      "type": "string",
      "format": "date",
      "description": "Defaults to today if omitted."
    },
    "due_date": {
      "type": "string",
      "format": "date",
      "description": "Defaults to `issue_date` + profile payment deadline days (default 30) if omitted.\n"
    },
    "currency": {
      "allOf": [
        {
          "$ref": "#/$defs/Currency"
        }
      ],
      "description": "Defaults to profile default currency (usually `CHF`)."
    },
    "exchangeRate": {
      "type": [
        "number",
        "null"
      ],
      "format": "double",
      "description": "Foreign-currency invoice only: CHF per 1 unit of `currency`, stored as a manual rate (MWSTV 45 Abs. 3bis). Omit to use the ESTV/BAZG rate of the invoice date. Taken while the invoice is a draft or by the write that issues it; an issued invoice keeps its rate. Issuing a foreign-currency invoice without any rate (e.g. dated in a Monatsmittel month that has not started) is refused with 400 FX_RATE_UNAVAILABLE; when ESTV/BAZG cannot be reached and no rate is cached the write answers 400 FX_RATE_SOURCE_UNAVAILABLE (retry later, it is not a missing rate); 400 INVALID_EXCHANGE_RATE when not a positive number, 400 EXCHANGE_RATE_IMPLAUSIBLE when outside 0.5x to 2x of the ESTV/BAZG rate of the date (0.0001 to 100 without one; the body carries `officialRate`, `min`, `max`). `null` is the same as omitting it (unlike the expense and revenue update, it does not drop a stored manual rate).\n"
    },
    "lines": {
      "type": "array",
      "minItems": 1,
      "items": {
        "$ref": "#/$defs/InvoiceLine"
      }
    },
    "notes": {
      "type": [
        "string",
        "null"
      ]
    },
    "payment_terms": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "$defs": {
    "Currency": {
      "type": "string",
      "description": "ISO 4217 code of a currency the API converts (ESTV/BAZG rates). The same list applies to every currency field of the API.\n",
      "enum": [
        "CHF",
        "EUR",
        "USD",
        "GBP",
        "JPY",
        "CAD",
        "AUD",
        "SEK",
        "NOK",
        "DKK",
        "HUF"
      ]
    },
    "InvoiceLine": {
      "type": "object",
      "required": [
        "description",
        "quantity",
        "price"
      ],
      "properties": {
        "catalog_item_id": {
          "type": "string",
          "format": "uuid",
          "description": "Takes the line from a catalog item of the profile: title, description (as `details`), price and unit, plus tax rate, discount and VAT code where the document shows those columns. Fields sent with it win; `description` and `price` may then be omitted. `404 CATALOG_ITEM_NOT_FOUND` if unknown.\n"
        },
        "description": {
          "type": "string"
        },
        "details": {
          "type": [
            "string",
            "null"
          ],
          "description": "Detail text printed under the description."
        },
        "quantity": {
          "type": "number",
          "format": "double"
        },
        "price": {
          "type": "number",
          "format": "double"
        },
        "vat_rate": {
          "type": [
            "number",
            "null"
          ],
          "format": "double",
          "description": "VAT rate as a percentage (e.g. 8.1 for 8.1 %). If omitted, the profile's default tax rate is used.\n"
        }
      }
    }
  }
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/lumabill-ch-invoice-write"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.