eBill Invoice API v2 (2.0.0)

Download OpenAPI specification:

External invoice API, authenticated via the shared Keycloak invoice-api realm.

Invoices

List invoices sent by the authenticated company

Authorizations:
CustomAuthorizer
query Parameters
search
string

Free-text search across invoice number, buyer/seller name and article labels

createdDateStart
string <date-time>
createdDateEnd
string <date-time>
invoiceIssueDateStart
string <date-time>
invoiceIssueDateEnd
string <date-time>
invoicePaymentDueDateStart
string <date-time>
invoicePaymentDueDateEnd
string <date-time>
totalAmountNetFrom
number
totalAmountNetTo
number
totalAmountGrossFrom
number
totalAmountGrossTo
number
invoiceTypeCode
string
sortBy
string

Comma-separated field:asc|desc pairs, e.g. createdAt:desc

offset
integer
Default: 0

Pagination offset (zero-based index of the first item to return)

size
integer <= 100
Default: 20

Page size (max 100)

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "total": null,
  • "offset": null,
  • "size": null
}

List invoices received by the authenticated company

Authorizations:
CustomAuthorizer
query Parameters
search
string

Free-text search across invoice number, buyer/seller name and article labels

createdDateStart
string <date-time>
createdDateEnd
string <date-time>
invoiceIssueDateStart
string <date-time>
invoiceIssueDateEnd
string <date-time>
invoicePaymentDueDateStart
string <date-time>
invoicePaymentDueDateEnd
string <date-time>
totalAmountNetFrom
number
totalAmountNetTo
number
totalAmountGrossFrom
number
totalAmountGrossTo
number
invoiceTypeCode
string
sortBy
string

Comma-separated field:asc|desc pairs, e.g. createdAt:desc

offset
integer
Default: 0

Pagination offset (zero-based index of the first item to return)

size
integer <= 100
Default: 20

Page size (max 100)

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "total": null,
  • "offset": null,
  • "size": null
}

Create exactly one invoice draft

Otherwise identical to POST /invoice/draft/batch - the only endpoint that also accepts a pdfTemplate (base64 PDF).

Authorizations:
CustomAuthorizer
Request Body schema: application/json
required
deliveryType
string (Deliverytype)
Default: "email"

'email' or 'nop' (do not send)

autoSend
boolean (Autosend)
Default: false

Finalize and send the draft immediately after creation (mirrors the old external API's autoSendDraft). Best-effort: a failure here does not fail the draft creation itself.

Pdftemplate (string) or Pdftemplate (null) (Pdftemplate)
Default: null

Base64-encoded PDF (max 1MB) stored as the invoice's document, same as the old external API's pdfTemplate field.

required
object (InvoiceData)

Invoice payload. Only lightly validated here - full EN 16931 validation happens downstream.

Responses

Request samples

Content type
application/json
{
  • "deliveryType": "email",
  • "autoSend": false,
  • "pdfTemplate": null,
  • "invoice": {
    }
}

Response samples

Content type
application/json
{
  • "batchId": "string",
  • "invoiceId": "string",
  • "invoiceNumber": ""
}

Get the full invoice record by id

Authorizations:
CustomAuthorizer
path Parameters
invoiceId
required
string <uuid>

Responses

Response samples

Content type
application/json
{
  • "invoiceId": "string",
  • "companyId": null,
  • "direction": null,
  • "status": "string",
  • "createdAt": null,
  • "invoiceNumber": null,
  • "invoiceType": null,
  • "invoice": null
}

Finalize and send an existing draft invoice

Fire-and-forget: a 202 response means the send was triggered, not that the invoice has been sent yet.

Authorizations:
CustomAuthorizer
path Parameters
invoiceId
required
string <uuid>

Responses

Response samples

Content type
application/json
{
  • "invoiceId": "string",
  • "status": "string"
}

Create up to 200 invoice drafts in a single call

Authorizations:
CustomAuthorizer
Request Body schema: application/json
required
required
Array of objects (Invoices) [ 1 .. 200 ] items

Responses

Request samples

Content type
application/json
{
  • "invoices": [
    ]
}

Response samples

Content type
application/json
{
  • "batchId": "string",
  • "total": 0,
  • "createdCount": 0,
  • "failedCount": 0,
  • "created": [
    ],
  • "errors": [
    ]
}

List all invoices created by a single POST /invoice/draft/batch call

Reads from a short-term index (30-day TTL), not the OpenSearch-backed /invoice/search endpoint.

Authorizations:
CustomAuthorizer
path Parameters
batchId
required
string <uuid>

Responses

Response samples

Content type
application/json
{
  • "batchId": "string",
  • "total": 0,
  • "data": [
    ]
}