Create an invoice
Creates an invoice for one of your customers. AlphaCount numbers it, books it, renders the PDF (with ZUGFeRD or XRechnung where the customer needs one) and, with send: true, mails it from the company's mailbox. With issue: false it stays a draft for review in the app.
Requires an Idempotency-Key header: a repeated request with the same key and body answers 200 with the first answer; the same key with another body is refused. A request that fails leaves nothing behind and may be repeated as it is. Scope partner:invoices:write.
apiKey partner:invoices:writeAuthorizationBearer <ab_…>An API key from Integrations → Connect AI assistants (MCP) → New access, bound to exactly one company. Each operation names the scope the key must carry.
Scope: partner:invoices:write
Idempotency-Key*stringYour key for this request — a UUID, for example. The same key with the same body answers with the first answer; with another body it is refused.
1 <= length <= 255AlphaCount-Version?stringThe API version to use. Default: the current one.
application/json- body
POST /invoices (with the Idempotency-Key header).
attribution?|nullcustomer*external_ref*External Ref^[A-Za-z0-9][A-Za-z0-9._:@+-]{0,254}$issue?Issuefalselines*array<>1 <= items <= 200notes?|nullpayment_terms_days?|nullsend?Sendfalseservice_period*OK
application/json- response
amount_paid*Amount Paidcancelled_by*|nullcancels_invoice*|nullcontract_external_ref*|The contract that billed it, if any.
currency*Currencycustomer_external_ref*string|nulldue_date*|nulldunning_level*|Highest dunning level sent (0 = payment reminder).
external_ref*string|nullexternal_source*string|nullid*Idissue_date*|nullnumber*|Invoice number; null while a draft.
overdue*Overduepaid_at*|Paid in full, UTC.
send_error*|Set when send was requested and the mail failed; the invoice exists either way.
sent_at*|First mail, UTC.
service_period*status*Status"draft""issued""sent""partially_paid""paid""cancelled"total_gross*Total Grosstotal_net*Total Nettotal_tax*Total Taxtype*TypeA cancellation invoice (Stornorechnung) is type storno with negative amounts.
"invoice""storno"curl -X POST 'https://app.alphacount.ai/api/partner/v1/invoices' \ -H 'Authorization: Bearer ab_...' \ -H 'Idempotency-Key: 8e0b3c5e-2f7a-4f6e-9a51-0c2d6f0e1a77' \ -H 'Content-Type: application/json' \ -d '{ "customer": { "external_ref": "org-17", "source": "alphalearn" }, "external_ref": "order-1", "issue": true, "lines": [ { "description": "Lizenz", "quantity": 1, "unit_price_net": "100.00", "vat_rate": 19 } ], "service_period": { "end": "2026-10-31", "start": "2026-10-01" }}'{ "amount_paid": "0.00", "cancelled_by": null, "cancels_invoice": null, "contract_external_ref": null, "currency": "EUR", "customer_external_ref": "org-17", "due_date": "2026-11-02", "dunning_level": null, "external_ref": "order-1", "external_source": "alphalearn", "id": "00000000-0000-4000-8000-000000000001", "issue_date": "2026-10-19", "number": "RE-2026-0001", "overdue": false, "paid_at": null, "send_error": null, "sent_at": null, "service_period": { "end": "2026-10-31", "start": "2026-10-01" }, "status": "issued", "total_gross": "119.00", "total_net": "100.00", "total_tax": "19.00", "type": "invoice"}