Download OpenAPI specification:
External invoice API, authenticated via the shared Keycloak invoice-api realm (same realm and client credentials as API v1).
This API uses OAuth2 Client Secret Authentication (Client Credentials Grant). Request an access token from the token endpoint, then send it as a Bearer token in the Authorization header of every request.
portal.ebill-service.de/auth/realms/InvoiceApi/protocol/openid-connect/token
Send a POST request with body x-www-form-urlencoded:
POST /auth/realms/InvoiceApi/protocol/openid-connect/token HTTP/1.1
Host: portal.ebill-service.de
Content-Type: application/x-www-form-urlencoded
grant_type=client_credentials&client_id=YOUR_CLIENT_ID&client_secret=YOUR_CLIENT_SECRET
{
"access_token": "eyJhbGciOi...",
"token_type": "Bearer",
"expires_in": 300
}
GET /invoice/sent HTTP/1.1
Host: api-v2.ebill-service.de
Authorization: Bearer eyJhbGciOi...
Limitations: an access_token is valid for 5 minutes; rate limit is 1000 requests/second.
Troubleshooting: invalid client ID/secret, an expired token, or a token scope that doesn't cover the requested resource all result in a 401/403 response - request a fresh token and verify the client credentials if you see one.
List invoices sent by the authenticated company.
| 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 |
| offset | integer Default: 0 Pagination offset (zero-based index of the first item to return) |
| size | integer <= 100 Default: 20 Page size (max 100) |
| includeAttachments | boolean Default: false When true, includes each invoice's attachments as {name, isInvoiceFile, url} with a 5-minute presigned download URL. Off by default (adds per-item S3 presigning latency). |
{- "data": [
- {
- "invoiceId": "string",
- "companyId": null,
- "direction": null,
- "status": "string",
- "createdAt": null,
- "invoiceNumber": null,
- "invoiceTypeCode": null,
- "invoiceFormat": null,
- "invoiceIssueDate": null,
- "invoicePaymentDueDate": null,
- "totalAmountNet": null,
- "totalAmountGross": null,
- "currencyCode": null,
- "buyerName": null,
- "sellerName": null
}
], - "total": null,
- "offset": null,
- "size": null
}List invoices received by the authenticated company.
| 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 |
| offset | integer Default: 0 Pagination offset (zero-based index of the first item to return) |
| size | integer <= 100 Default: 20 Page size (max 100) |
| includeAttachments | boolean Default: false When true, includes each invoice's attachments as {name, isInvoiceFile, url} with a 5-minute presigned download URL. Off by default (adds per-item S3 presigning latency). |
{- "data": [
- {
- "invoiceId": "string",
- "companyId": null,
- "direction": null,
- "status": "string",
- "createdAt": null,
- "invoiceNumber": null,
- "invoiceTypeCode": null,
- "invoiceFormat": null,
- "invoiceIssueDate": null,
- "invoicePaymentDueDate": null,
- "totalAmountNet": null,
- "totalAmountGross": null,
- "currencyCode": null,
- "buyerName": null,
- "sellerName": null
}
], - "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).
| 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. |
{- "deliveryType": "email",
- "autoSend": false,
- "pdfTemplate": null,
- "invoice": {
- "invoiceTypeCode": "380",
- "invoiceNumber": "string",
- "invoiceIssueDate": "string",
- "invoiceCurrencyCode": "EUR",
- "invoiceFormat": "ubl",
- "buyerReference": "B2B_Rechnung",
- "buyerAccountingReference": null,
- "paymentMeansTypeCode": "string",
- "paymentDueDate": null,
- "paymentTerms": null,
- "remittanceInformation": null,
- "paidAmount": null,
- "creditTransfer": null,
- "mandateReferenceIdentifier": null,
- "bankAssignedCreditorIdentifier": null,
- "debitedAccountIdentifier": null,
- "purchaseOrderReference": null,
- "salesOrderReference": null,
- "despatchAdviceReference": null,
- "tenderOrLotReference": null,
- "contractReference": null,
- "projectReference": null,
- "invoicingPeriodStartDate": null,
- "invoicingPeriodEndDate": null,
- "invoiceDocumentReference": null,
- "deliverToParty": null,
- "documentAllowance": null,
- "documentCharge": null,
- "buyer": {
- "name": "string",
- "electronicAddress": "string",
- "addressLine1": "string",
- "addressLine2": null,
- "addressLine3": null,
- "postCode": "string",
- "city": "string",
- "countryCode": null,
- "electronicAddressScheme": null,
- "contactPoint": null,
- "contactEmailAddress": null,
- "contactTelephoneNumber": null,
- "vatIdentifier": null,
- "identifier": null,
- "identifierScheme": null
}, - "seller": {
- "name": "string",
- "electronicAddress": "string",
- "addressLine1": "string",
- "addressLine2": null,
- "addressLine3": null,
- "postCode": "string",
- "city": "string",
- "countryCode": "string",
- "electronicAddressScheme": null,
- "contactPoint": "string",
- "contactEmailAddress": "string",
- "contactTelephoneNumber": "string",
- "vatIdentifier": null,
- "identifier": null,
- "identifierScheme": null,
- "additionalLegalInformation": null
}, - "invoiceLine": [
- {
- "identifier": "string",
- "name": "string",
- "quantityUnitMeasureCode": "string",
- "description": null,
- "quantity": null,
- "netPrice": null,
- "priceBaseQuantity": null,
- "vatRate": null,
- "vatCategoryCode": null,
- "netAmount": null,
- "sellersIdentifier": null,
- "buyersIdentifier": null,
- "standardIdentifier": null,
- "standardIdentifierScheme": null,
- "referencedPurchaseOrderLineReference": null,
- "buyerAccountingReference": null,
- "itemAttributes": null,
- "allowance": null,
- "charge": null
}
]
}
}{- "batchId": "string",
- "invoiceId": "string",
- "invoiceNumber": ""
}Get the full invoice record by id.
| invoiceId required | string <uuid> |
| includeAttachments | boolean Default: true When true (the default here, unlike the list endpoints), includes attachments as {name, isInvoiceFile, url} with a 5-minute presigned download URL. Set to false to skip presigning. |
{- "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.
| invoiceId required | string <uuid> |
{- "invoiceId": "string",
- "status": "string"
}Create up to 200 invoice drafts in a single call.
required | Array of objects (Invoices) [ 1 .. 200 ] items |
{- "invoices": [
- {
- "deliveryType": "email",
- "autoSend": false,
- "invoice": {
- "invoiceTypeCode": "380",
- "invoiceNumber": "string",
- "invoiceIssueDate": "string",
- "invoiceCurrencyCode": "EUR",
- "invoiceFormat": "ubl",
- "buyerReference": "B2B_Rechnung",
- "buyerAccountingReference": null,
- "paymentMeansTypeCode": "string",
- "paymentDueDate": null,
- "paymentTerms": null,
- "remittanceInformation": null,
- "paidAmount": null,
- "creditTransfer": null,
- "mandateReferenceIdentifier": null,
- "bankAssignedCreditorIdentifier": null,
- "debitedAccountIdentifier": null,
- "purchaseOrderReference": null,
- "salesOrderReference": null,
- "despatchAdviceReference": null,
- "tenderOrLotReference": null,
- "contractReference": null,
- "projectReference": null,
- "invoicingPeriodStartDate": null,
- "invoicingPeriodEndDate": null,
- "invoiceDocumentReference": null,
- "deliverToParty": null,
- "documentAllowance": null,
- "documentCharge": null,
- "buyer": {
- "name": "string",
- "electronicAddress": "string",
- "addressLine1": "string",
- "addressLine2": null,
- "addressLine3": null,
- "postCode": "string",
- "city": "string",
- "countryCode": null,
- "electronicAddressScheme": null,
- "contactPoint": null,
- "contactEmailAddress": null,
- "contactTelephoneNumber": null,
- "vatIdentifier": null,
- "identifier": null,
- "identifierScheme": null
}, - "seller": {
- "name": "string",
- "electronicAddress": "string",
- "addressLine1": "string",
- "addressLine2": null,
- "addressLine3": null,
- "postCode": "string",
- "city": "string",
- "countryCode": "string",
- "electronicAddressScheme": null,
- "contactPoint": "string",
- "contactEmailAddress": "string",
- "contactTelephoneNumber": "string",
- "vatIdentifier": null,
- "identifier": null,
- "identifierScheme": null,
- "additionalLegalInformation": null
}, - "invoiceLine": [
- {
- "identifier": "string",
- "name": "string",
- "quantityUnitMeasureCode": "string",
- "description": null,
- "quantity": null,
- "netPrice": null,
- "priceBaseQuantity": null,
- "vatRate": null,
- "vatCategoryCode": null,
- "netAmount": null,
- "sellersIdentifier": null,
- "buyersIdentifier": null,
- "standardIdentifier": null,
- "standardIdentifierScheme": null,
- "referencedPurchaseOrderLineReference": null,
- "buyerAccountingReference": null,
- "itemAttributes": null,
- "allowance": null,
- "charge": null
}
]
}
}
]
}{- "batchId": "string",
- "total": 0,
- "createdCount": 0,
- "failedCount": 0,
- "created": [
- {
- "invoiceId": "string",
- "invoiceNumber": ""
}
], - "errors": [
- {
- "invoiceId": null,
- "error": "string",
- "invoice": { }
}
]
}List all invoices created by a single POST /invoice/draft/batch call. Proxies live to the OpenSearch-backed /invoice/search endpoint, filtered by batchId - not a separate index.
| batchId required | string <uuid> |
| includeAttachments | boolean Default: false When true, includes each invoice's attachments as {name, isInvoiceFile, url} with a 5-minute presigned download URL. Off by default (adds per-item S3 presigning latency). |
{- "batchId": "string",
- "total": 0,
- "data": [
- {
- "invoiceId": "string",
- "invoiceNumber": null,
- "createdAt": null,
- "status": null,
- "validationStatus": null,
- "isBounced": null
}
]
}