Quickstart
Issue your first invoice on the sandbox in about ten minutes, with an API key and curl.
Before you start
- Sign in to the Yona app at app.useyona.com and open API keys.
- Create a sandbox key with the invoicing preset. It starts with
sk_test_and is shown once; copy it now. - Every request below goes to
https://gp.useyona.comwith the key as a Bearer token. The key decides the environment:sk_test_keys use the sandbox,sk_live_keys the live service. The URL never changes.
Sandbox submissions go to the authority’s test system under Yona’s own test taxpayer, so you can submit before you connect your business. Live submissions need your own connection and crypto key; see Tax connection.
Step 1: Add a buyer
The response is 201 with the buyer in data. Keep data.id. For an individual, leave out taxId and send "partyType": "individual".
Step 2: Create an invoice
The response is 201 with a draft invoice. Keep data.id. Notes on the fields:
invoiceKindis required:B2B,B2C,B2GorG2B.- Amounts are in major units, as decimal strings or numbers. Totals and tax are computed for you.
taxCategorytakesstandard,zeroorexempt, or a tax-category code from Reference data.- Goods carry an
hsnCode; services carry anisicCodeinstead. invoiceNumberis allocated when you leave it out.
Step 3: Submit it
finalise=true finalises the draft and submits it in one step. The response is 202 Accepted: the submission is queued, and Yona hands it to the authority from there. Reporting an invoice uses credits; if the balance is short the answer is 402 with BIZ001, and nothing is sent.
Step 4: Watch it get registered
Poll every few seconds. On the sandbox the authority’s test system usually answers within seconds. The answer, with submissions abbreviated:
{
"data": {
"invoiceId": "INVOICE_ID",
"status": "signed",
"authorityState": "registered",
"authorityReference": "INV00042-94ND90NR-20261001",
"parkReason": null,
"lastSyncedAt": "2026-10-01T10:00:05.000Z",
"submissions": [{ "attemptNo": 1, "authorityState": "registered", "rejectReasons": [] }]
}
}status moves from queued to signed when the authority registers the invoice, then to transmitted and accepted as it reaches the buyer’s access point. authorityReference is the IRN. If status is rejected, the reasons are in submissions[].rejectReasons; if it is failed, the submission is on hold and parkReason says why. This read never calls the authority and costs nothing. The full shape, and simpleStatus (issued, reported, transmitted, delivered and the rest) on GET /i/v1/invoices/INVOICE_ID, are in Invoices and Invoice lifecycle.
To download the signed PDF: GET /i/v1/invoices/INVOICE_ID/download.
Next steps
- Webhooks: be told when an invoice is registered, delivered or rejected, instead of polling.
- Tax connection: connect your business to the authority before going live.
- Going live: what changes with a live key.
- API Reference: every endpoint, generated from the API itself.