Skip to main content

Belgium E-Invoice Peppol


How to get “API Key” from Portal ?

To obtain the API key to be used in the request body of the login endpoint, navigate to Settings > ERP Management > API Management in the Portal and use the "Generate" button.

Login and Authorization Configuration

Technical Details

PropertyValue
Endpoint/auth/login
MethodPOST
Content-Typeapplication/json
Base URL
Stage Environment URLhttps://app-stage.docnova.ai/
Production Environment URLhttps://api.docnova.ai/
AuthorizationNone (Initial access)

Request Body (JSON)

The following fields are used to define login criteria:

FieldTypeDescription
apiKeyStringA unique key assigned specifically to the user for portal access, verifying the system identity. (it is explained in previous section “How to get API Key from portal”)
emailStringThe registered email address in the system belonging to the authorized user performing the operation.

Response Details

Upon a successful request, a 200 OK code is returned with the following details:

FieldTypeDescription
jwtThe secure session token that must be used as a 'R-Auth' API Key in all subsequent API calls.
expirationDateDateTimeIndicates the exact time the session key will expire; the ERP system can use this data to manage automatic re-login processes.

The JWT token successfully obtained during the authentication step (auth/login) acts as a key to access the secure endpoints of the APIs. After the first successful login, the JWT token obtained from the response of a successful login is used as the R-Auth value in the authorization section of other queries. This configuration ensures that every data exchange between the ERP and the portal occurs over an authenticated and secure channel.

Technical Details

PropertyValue
KeyEnter R-Auth in the Key field.
Value{{apiKey}} or {{jwt}} (Copy the jwt string returned from the login endpoint.)
Header SettingNavigate to the "Headers" tab of the request to be sent.

1. Introduction

efactuurhub is a cloud-based e-invoice management portal developed by Melasoft, fully compliant with Belgium's digital transformation requirements and Peppol network standards. This API documentation is designed to ensure that your ERP systems integrate seamlessly with Belgian e-invoicing regulations.

Our portal abstracts complex XML structures and Peppol communication protocols (AS4), providing developers with an easy-to-use, secure, and scalable interface. By utilizing the efactuurhub API, you can submit invoices asynchronously, track real-time statuses, manage incoming invoices, and automatically process technical responses (MLR) from the recipient back into your ERP system.

Our compliance-oriented architecture guarantees the legal validity of every document, ensures data integrity, and establishes an end-to-end traceable audit trail.

2. Authentication POST

Purpose of Use: The  POST /auth/login endpoint is used to authenticate to the Docnova API platform using an API Key. This endpoint allows users to log in to the system with a pre-defined API key. API key authentication is commonly used in machine-to-machine (M2M) integrations, automation scenarios, and external system integrations. Upon successful login, the user receives a JWT access token, refresh token, user details, and a list of authorized companies. This token is then used in subsequent API calls via the Authorization: Bearer JWT header.

Endpoint Information

PropertyValue
URL/auth/login
MethodPOST
Content-Typeapplication/json
Base URL
Stage Environment URLhttps://app-stage.docnova.ai/
Production Environment URLhttps://api.docnova.ai/
AuthorizationNot required (public endpoint)

Example Request

curl --location 'https://api-stage.docnova.ai/auth/login' \ 
--header 'Content-Type: application/json' \
--header 'Accept: */*' \
--data '{
"apiKey": "YOUR_API_KEY"
}'

Request Parameters

Field NameTypeRequiredDescription
apiKeyStringRequiredUnique API key used for system authentication. It is a 32 character alphanumeric value generated through the Docnova panel.

API Key Types

TypeDescription
USERAPI key assigned to a specific user. Returns that user's information upon login.
COMPANYAPI key assigned to a company. Returns the first active admin user's information of that company upon login.

Responses


200 - Login Successful

When logging in with an API Key, an AccountInfo object is returned:

{ 

"id": "99913890-b7fd-4126-b3fd-...",
"superAdmin": false,
"companies": [
{
"id": "b8d79b88-44b1-4347-a3f9-...",
"name": "Example Company",
"taxNumber": "0401065997",
"website": null,
"address": "Sample Address 157 9000 City",
"city": "City",
"state": null,
"country": "BE",
"portalType": "BE",
"postalCode": "9000",
"phoneNumber": "+32 9 000 00 00",
"credit": 852,
"iconUrl": "stage/.../company_logo.jpg",
"email": "info@example.com",
"userCount": 16,
"vatNumber": "BE0401065997",
"faxNumber": null,
"mailLanguage": "EN",
"subscriptionType": "ENCRYPTED_VALUE",
"cif": null,
"sftp": false,
"isSubCompany": false,
"participants": [
{
"id": "4fcb57ae-09d8-4068-ba3e-...",
"fullParticipantId": "iso6523-actorid-upis::0208:...",
"scheme": "iso6523-actorid-upis::",
"icd": "0208",
"identifier": "0401065997",
"existInOurService": true,
"status": "APPROVED",
"deleteRequestExists": false
}
],
"featureAllowed": false,
"subCompanies": [],
"stripeObj": {
"stripeCustomerId": "cus_XXXXXXXXX",
"type": "FREE",
"renewalDate": "2026-02-26T13:00:00.141125",
"melaAiTokenCount": 47,
"googleAiTokenCount": null,
"docnovaCount": 0,
"renewal": true
},
"authorities": "ENCRYPTED_VALUE",
"compAuthTypes": "ENCRYPTED_VALUE",
"currencyCode": "EUR",
"remainingDocumentPercentage": 10.87,
"remainingPromotionDays": null,
"trialUsed": false,
"defaultParticipantId": {
"id": "4fcb57ae-09d8-4068-ba3e-...",
"fullParticipantId": "iso6523-actorid-upis::0208:0401065997",
"scheme": "iso6523-actorid-upis::",
"icd": "0208",
"identifier": "0401065997",
"existInOurService": true,
"status": "APPROVED",
"deleteRequestExists": false
}
}
],
"jwt": "eyJhbGciOiJIUzUxMiJ9...",
"expirationDate": "2026-02-18T08:16:23.516+00:00",
"user": {
"id": null,
"email": "user@example.com",
"firstName": null,
"lastName": null,
"phoneNumber": null,
"creationTime": null,
"photoUrl": null,
"mailLang": "EN",
"isSuperAdmin": null,
"lastLoginTime": null,
"authorities": null,
"adminAuthorities": "ENCRYPTED_VALUE",
"featureAllowed": false
},
"mfaEnabled": false,
"secretImageUri": null,
"lastCompanyId": "b8d79b88-44b1-4347-a3f9-...",
"requiresRecaptchaV2": null,
"message": null,
"active": true,
"isAppLogin": false,
"mfaType": null,
"refreshToken": "REFRESH_TOKEN_VALUE",
"refreshTokenExpiration": "2026-03-19T08:16:23.518+00:00"
}

Response Fields

Field NameTypeDescription
idString (UUID)Unique identifier of the user
superAdminBooleanWhether the user is a super admin
companiesList<AuthorizedCompany>List of companies the user has access to
jwtStringJWT access token. Used as Authorization: Bearer <jwt> in subsequent API calls
expirationDateDateTime (ISO 8601)JWT token expiration time
userUserUser detail information (id, email, first name, last name)
mfaEnabledBooleanWhether Multi Factor Authentication (MFA) is enabled
secretImageUriString | nullGoogle Authenticator QR code URI if MFA is active
lastCompanyIdString (UUID)ID of the last company accessed by the user
requiresRecaptchaV2Boolean | nullWhether reCAPTCHA v2 verification is required
messageString | nullAdditional information message
activeBooleanActive status of the user account
isAppLoginBooleanWhether login was performed via OAuth2
mfaTypeString | nullMFA type: GOOGLE or WHATSAPP
refreshTokenStringRefresh token. Used to obtain a new JWT when the current one expires
refreshTokenExpirationDateTime (ISO 8601)Refresh token expiration time

User Object

Field NameTypeDescription
idString (UUID)User ID
emailStringUser email address
firstNameStringUser first name
lastNameStringUser last name
phoneNumberString | nullPhone number
creationTimeDateTimeAccount creation time
photoUrlString | nullProfile photo URL
mailLangStringEmail language preference
lastLoginTimeDateTimeLast login time

400 - API Key Not Found

When the API key is not registered in the database:

{
"errorMessage": "API key not found!",
"errorType": "API key not found!",
"errorTitle": "BAD_REQUEST",
"status": 400,
"errorId": "corr-id-xxxx",
"timestamp": "2026-02-12T14:30:00",
"path": "/auth/login"
}

Description: The provided apiKey value does not match any registered API key in the system. Verify that the API key is entered correctly. Check your API key from the Docnova panel.

400 - API Key Out of Use

When the API key has been deactivated or deleted:

{
"errorMessage": "Provided api key is out of use! Please login with your credentials and try again.",
"errorType": "Provided api key is out of use! Please login with your credentials and try again.",
"errorTitle": "BAD_REQUEST",
"status": 400,
"errorId": "corr-id-xxxx",
"timestamp": "2026-02-12T14:30:00",
"path": "/auth/login"
}

Description: The API key exists in the system but is marked as active=false or deleted=true. This occurs when the key has been deactivated or deleted by an administrator. Create a new API key or reactivate the existing one.

400 - API Key Expired

When the API key's validity period has ended:

{
"errorMessage": "Provided api key has expired! Please login with your credentials and try again.",
"errorType": "Provided api key has expired! Please login with your credentials and try again.",
"errorTitle": "BAD_REQUEST",
"status": 400,
"errorId": "corr-id-xxxx",
"timestamp": "2026-02-12T14:30:00",
"path": "/auth/login"
}

Description: The API key's expireDate field points to a past date. API keys have a maximum validity of 1 year. You need to renew the expired key or create a new one.

400 - Invalid / Empty Request Body

When invalid JSON or an empty body is sent:

{
"errorMessage": "Required request body is missing",
"errorType": "HttpMessageNotReadableException",
"errorTitle": "BAD_REQUEST",
"status": 400,
"errorId": "corr-id-xxxx",
"timestamp": "2026-02-12T14:30:00",
"path": "/auth/login"
}

Description: The request body is not in valid JSON format or was sent empty. Ensure that the Content-Type: application/json header is set correctly and that the body contains valid JSON.

401 - Invalid Login Attempt

When the API key is valid but the returned response is of an unexpected type:

{
"errorMessage": "Invalid login attempt!",
"errorType": "NOT_AUTHORITY",
"errorTitle": "UNAUTHORIZED",
"status": 401,
"errorId": "corr-id-xxxx",
"timestamp": "2026-02-12T14:30:00",
"path": "/auth/login"
}

Description: The API key was validated but the login process could not be completed. This can occur when a COMPANY type API key's associated company does not have any active admin users. Ensure that the relevant company has at least one active admin user.

3. Send Document Async POST

Purpose of Use: This endpoint is used for asynchronous processing of a Base64-encoded e-invoice or waybill document. The document is not processed immediately upon submission; it is placed into a Kafka queue and processed in the background by an independent consumer.

When the endpoint is called, the server immediately returns a trackingId. This trackingId can be used to query the current status of the document via the GET /document-status/{trackingId} endpoint.

Endpoint Information

InfoValue
HTTP MethodPOST
URL/invoice/send-document-async
Content-Typeapplication/json
Base URL
Stage Environment URLhttps://app-stage.docnova.ai/
Production Environment URLhttps://api.docnova.ai/
AuthenticationJWT Token (Header: R-Auth)
Response Formatapplication/json

Example Request

curl --location "https://api-stage.docnova.ai/invoice/send-document-async" \
--header "Content-Type: application/json" \
--header "Accept: */*" \
--header "R-Auth: <JWT_TOKEN>" \
--data "{
\"apiKey\": \"<API_KEY>\",
\"base64Document\": \"<BASE64_ENCODED_XML>\",
\"invoiceType\": \"PEPPOL_BIS\"
}"

Request Parameters

Field NameTypeRequiredDescription
apiKeyStringConditionalAPI key. Required if compId is not provided. Used to identify the company.
compIdString (UUID)ConditionalCompany identifier. Required if apiKey is not provided.
base64DocumentStringConditionalBase64 encoded XML document. Required if base64Pdf is not provided.
base64PdfStringConditionalBase64 encoded PDF document. Required if base64Document is not provided.
invoiceTypeDataType (Enum)ConditionalInvoice type. Required if waybillType is not provided.
waybillTypeWaybillDataType (Enum)ConditionalWaybill type. Required if invoiceType is not provided.
invoiceSourceInvoiceSource (Enum)NoSource of the invoice. Default: ERP
receiverEmailsList<String>NoList of receiver email addresses
mailTemplateIdStringNoEmail template identifier
businessTypeBusinessModelType (Enum)NoBusiness model type

Parameter Values

invoiceType

ValueDescription
PEPPOL_BISPeppol BIS 3.0 standard
RO_EFACTURARomania e-Factura format
XRECHNUNGGermany XRechnung standard
MY_INVOISMalaysia MyInvois format
MY_PINTMalaysia PINT format
DK_OIOUBLDenmark OIOUBL format
EG_INVOICEEgypt invoice format
HR_INVOICECroatia invoice format
UAE_PINTUnited Arab Emirates PINT format
ZUGFERDZUGFeRD structured invoice
FACTUR_XFrance Factur-X format
XRECHNUNG_CIIXRechnung CII format
CIIUN/CEFACT CII format
CIDUN/CEFACT CID format
PDFUnstructured PDF documents
KZ_ESF_V2Kazakhstan ESF V2 format
KSEFPoland KSeF format
KSEF_OFFLINEPoland KSeF offline format

waybillType

ValueDescription
RS_WAYBILL_DESPATCHSerbia waybill (despatch)
RS_WAYBILL_RECEIPTSerbia waybill (receipt)
RS_APPLICATION_RESPONSESerbia application response
RO_ETRANSPORTRomania e-Transport

invoiceSource

ValueDescription
ERPERP system (default)
PORTALWeb portal
PORTAL_OCRPortal via OCR
EMAILEmail
EMAIL_OCREmail via OCR
PEPPOLPeppol network
SFTPSFTP integration
SERVICEService
HARVESTHarvest integration
SHOPIFYShopify integration
AMAZON_SPAmazon SP integration
EBAYeBay integration
HUBSPOTHubSpot integration
STRIPEStripe integration
LHDNMLHDNM (Malaysia)
NEMHANDELNemhandel (Denmark)
ANAFANAF (Romania)
LAZADALazada integration
KSEFKSeF (Poland)
RS_APISerbia API
ETAETA (Egypt)
ERACUNeRacun (Croatia)

businessType

ValueDescription
B2BBusiness to Business
B2CBusiness to Consumer
B2GBusiness to Government

Responses

200 - Successful Response

{
"trackingId": "a1b2c3d4-e5f6-7890-abcd-...",
"status": "PENDING",
"message": "Document processing request submitted successfully"
}

200 - OK - Processing Submission Failed (Internal Failure)

Scenario: Kafka message submission or database operation fails internally.

{
"trackingId": "a1b2c3d4-e5f6-7890-abcd-...",
"status": "FAILED",
"message": "Failed to submit document processing request: <error detail>"
}

Description: The document was accepted but could not be submitted to the async processing queue. If a trackingId is returned, it cannot be used for subsequent status queries as processing never started. Retry the request.

Response Fields

Field NameTypeDescription
trackingIdUUIDUnique identifier for tracking the document processing
statusDocumentProcessStatus (Enum)Current processing status of the document
messageStringDescriptive message about the operation

Status Values

ValueDescription
PENDINGDocument accepted, awaiting processing
PROCESSINGDocument is being processed
COMPLETEDProcessing completed successfully
FAILEDProcessing failed
SENDING_FAILEDSending to external system failed
PERMANENT_FAILEDPermanent failure (max retry attempts reached)

400 - Bad Request

Scenario: Neither apiKey nor compId is provided in the request.

{
"errorMessage": "Document process required fields: apiKey or companyId",
"errorType": "DOCUMENT_PROCESS_REQUIRED_FIELDS",
"errorTitle": "BAD_REQUEST",
"status": 400,
"errorId": "corr-abc-123",
"timestamp": "2026-02-12T10:30:00",
"path": "/invoice/send-document-async"
}

Description: At least one field (apiKey or compId) must be provided to identify the company. The API uses this field to determine which company the document belongs to.

400 - Bad Request - Missing Document Type

Scenario: Neither invoiceType nor waybillType is provided in the request.

{
"errorMessage": "Document process required fields: invoiceType or waybillType",
"errorType": "DOCUMENT_PROCESS_REQUIRED_FIELDS",
"errorTitle": "BAD_REQUEST",
"status": 400,
"errorId": "corr-abc-123",
"timestamp": "2026-02-12T10:30:00",
"path": "/invoice/send-document-async"
}

Description: At least one of invoiceType (for invoices) or waybillType (for waybills) must be provided to determine the document type. The system uses this field to select the appropriate processing strategy.

400 - Bad Request - Missing Document Content

Scenario:  Neither base64Document nor base64Pdf is provided in the request.

{
"errorMessage": "Document process required fields: base64Document or base64Pdf",
"errorType": "DOCUMENT_PROCESS_REQUIRED_FIELDS",
"errorTitle": "BAD_REQUEST",
"status": 400,
"errorId": "corr-abc-123",
"timestamp": "2026-02-12T10:30:00",
"path": "/invoice/send-document-async"
}

Description: Document content must be provided as Base64-encoded data. Use base64Document for XML documents and base64Pdf for PDF documents.

400 - Bad Request - Invalid API Key

Scenario: The provided apiKey is not found in the system or apiKey and compId are missing.

{
"errorMessage": "At least one of apiKey or companyId fields must be filled.",
"errorType": "ILLEGAL_ARGUMENT",
"errorTitle": "BAD_REQUEST",
"status": 400,
"errorId": "corr-abc-123",
"timestamp": "2026-02-12T10:30:00",
"path": "/invoice/send-document-async"
}

Description: The provided apiKey value is not registered in the database. Use a valid API key. Alternatively, the company identifier can be specified directly using the compId field.

401 - Unauthorized

Scenario: JWT token is invalid or expired.

{
"errorMessage": "Authentication is required. Please complete the authentication process.",
"errorType": "AUTHENTICATION_REQUIRED",
"errorTitle": "UNAUTHORIZED",
"status": 401,
"errorId": "corr-abc-123",
"timestamp": "2026-02-12T10:30:00",
"path": "/invoice/send-document-async"
}

Description: The JWT token sent in the R-Auth header is invalid, expired, or was not provided. Retry with a valid JWT token.

401 - Unauthorized - Company Authorization Error

Scenario: The user in the JWT token is not associated with the specified company.

{
"errorMessage": "User is not authorized for this operation",
"errorType": "AUTHORIZATION_FAILED",
"errorTitle": "UNAUTHORIZED",
"status": 401,
"errorId": "corr-abc-123",
"timestamp": "2026-02-12T10:30:00",
"path": "/invoice/send-document-async"
}

Description: The authenticated user is not authorized for the company identified by apiKey or compId. Verify that the user is assigned to the relevant company.

498 - Token Expired

Returned when the JWT token has expired (custom HTTP status code).

{
"errorMessage": "Your session has expired. Please login again.",
"errorType": "TOKEN_EXPIRED",
"errorTitle": "UNAUTHORIZED",
"status": 401,
"timestamp": "2026-02-12T14:30:00"
}

Description: The JWT token's exp (expiration) claim has passed. The user needs to refresh their session to obtain a new token.

500 - Internal Server Error

Scenario: An unexpected server error occurs.

{
"errorMessage": "An unexpected error occurred",
"errorType": "INTERNAL_ERROR",
"errorTitle": "INTERNAL_SERVER_ERROR",
"status": 500,
"errorId": "corr-abc-123",
"timestamp": "2026-02-12T10:30:00",
"path": "/invoice/send-document-async"
}

Description: An unexpected error occurred on the server side. Use the errorId value to contact the support team for investigating the root cause.

4. Send Document Async JSON POST

Purpose of Use: This endpoint allows invoice data compliant with UBL 2.1 / PEPPOL BIS standards to be submitted asynchronously as a JSON object (ublDto). No Base64-encoded file upload is required; all invoice details are provided directly in a structured JSON format.

When the request is accepted, the document is placed in the processing queue and a trackingId is returned. The processing status can be queried at any time using this ID via the GET /invoice/document-status/{trackingId} endpoint.

Endpoint Information

InfoValue
HTTP MethodPOST
URL/invoice/send-document-async-json
Content-Typeapplication/json
Base URL
Stage Environment URLhttps://app-stage.docnova.ai/
Production Environment URLhttps://api.docnova.ai/
AuthenticationBearer Token (Header: R-Auth)
Response Formatapplication/json

Example Request

curl --location 'https://api-stage.docnova.ai/invoice/send-document-async-json' \
--header 'r-auth: YOUR_R_AUTH_BEARER_TOKEN' \
--header 'Content-Type: application/json' \
--data-raw '{
   "apiKey": "YOUR_DOCNOVA_API_KEY",
   "ublDto": {
      
           "Type": "PEPPOL_BIS",
           "IsPeppolParticipant": true,
           "ProfileType": "EN16931",
            "CustomizationID": {
           "Value": "urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0"
       },
       "ProfileID": {
           "Value": "urn:fdc:peppol.eu:2017:poacc:billing:01:1.0"
       },
           "ID": {
               "Value": "INV-DEMO-2026-001"
           },
           "IssueDate": {
               "Value": "2026-04-22"
           },
           "DueDate": {
               "Value": "2026-04-22"
           },
           "InvoiceTypeCode": {
               "Value": "380"
           },
           "Note": [
               {
                   "Value": "NA"
               }
           ],
           "DocumentCurrencyCode": {
               "Value": "EUR"
           },
           "BuyerReference": {
               "Value": "na"
           },
           "OrderReference": {
               "ID": {
                   "Value": ""
               },
               "SalesOrderID": {
                   "Value": "NA"
               }
           },
           "AccountingSupplierParty": {
               "Party": {
                   "EndpointID": {
                       "Value": "0123456789",
                       "schemeID": "0208"
                   },
                   "PartyIdentification": [
                       {
                           "ID": {
                               "schemeID": "0208",
                               "Value": "0123456789"
                           }
                       }
                   ],
                   "PartyName": [
                       {
                           "Name": {
                               "Value": "Demo Supplier NV"
                           }
                       }
                   ],
                   "PostalAddress": {
                       "StreetName": {
                           "Value": "Rue du Commerce 10, bus 2,1000 Bruxelles, BELGIUM"
                       },
                       "CityName": {
                           "Value": "Brussels"
                       },
                       "PostalZone": {
                           "Value": 2000
                       },
                       "AddressLine": [
                           {
                               "Line": {
                                   "Value": "Rue du Commerce 10, bus 2,1000 Bruxelles, BELGIUM"
                               }
                           }
                       ],
                       "Country": {
                           "IdentificationCode": {
                               "Value": "BE"
                           }
                       }
                   },
                   "PartyTaxScheme": [
                       {
                           "CompanyID": {
                               "schemeID": "VAT",
                               "Value": "BE0123456789"
                           },
                           "TaxScheme": {
                               "ID": {
                                   "Value": "VAT"
                               }
                           }
                       }
                   ],
                   "PartyLegalEntity": [
                       {
                           "RegistrationName": {
                               "Value": "Demo Supplier NV"
                           },
                           "CompanyID": {
                               "Value": "0123456789",
                               "schemeID": "0208"
                           }
                       }
                   ],
                   "Contact": {
                       "Name": {
                           "Value": "Demo Contact"
                       },
                       "Telephone": {
                           "Value": "+32 2 555 01 23"
                       },
                       "ElectronicMail": {
                           "Value": "billing@demo-supplier.example"
                       }
                   }
               }
           },
           "AccountingCustomerParty": {
               "Party": {
                   "EndpointID": {
                       "Value": "0987654321",
                       "schemeID": "0208"
                   },
                   "PartyIdentification": [
                       {
                           "ID": {
                               "schemeID": "0208",
                               "Value": "0987654321"
                           }
                       }
                   ],
                   "PartyName": [
                       {
                           "Name": {
                               "Value": "Demo Customer BVBA"
                           }
                       }
                   ],
                   "PostalAddress": {
                       "StreetName": {
                           "Value": "Avenue des Tests 25,3000 Leuven, BELGIUM"
                       },
                       "CityName": {
                           "Value": ""
                       },
                       "PostalZone": {
                           "Value": "2000"
                       },
                       "AddressLine": [
                           {
                               "Line": {
                                   "Value": "Avenue des Tests 25,3000 Leuven, BELGIUM"
                               }
                           }
                       ],
                       "Country": {
                           "IdentificationCode": {
                               "Value": "BE"
                           }
                       }
                   },
                   "PartyTaxScheme": [
                       {
                           "CompanyID": {
                               "schemeID": "VAT",
                               "Value": "BE0987654321"
                           },
                           "TaxScheme": {
                               "ID": {
                                   "Value": "VAT"
                               }
                           }
                       }
                   ],
                   "PartyLegalEntity": [
                       {
                           "RegistrationName": {
                               "Value": "Demo Customer BVBA"
                           },
                           "CompanyID": {
                               "Value": "0987654321",
                               "schemeID": "0208"
                           }
                       }
                   ],
                   "Contact": {
                       "Name": {
                           "Value": ""
                       },
                       "Telephone": {
                           "Value": ""
                       },
                       "ElectronicMail": {
                           "Value": ""
                       }
                   }
               }
           },
           "Delivery": [
               {
                   "ActualDeliveryDate": {
                       "Value": "2026-04-22"
                   },
                   "DeliveryLocation": {
                       "Address": {
                           "StreetName": {
                               "Value": "Avenue des Tests 25,3000 Leuven, BELGIUM"
                           },
                           "CityName": {
                               "Value": ""
                           },
                           "PostalZone": {
                               "Value": "2000"
                           },
                           "AddressLine": [
                               {
                                   "Line": {
                                       "Value": "Avenue des Tests 25,3000 Leuven, BELGIUM"
                                   }
                               }
                           ],
                           "Country": {
                               "IdentificationCode": {
                                   "Value": "BE"
                               }
                           }
                       }
                   },
                   "DeliveryParty": {
                       "PartyName": [
                           {
                               "Name": {
                                   "Value": "Demo Customer BVBA"
                               }
                           }
                       ]
                   }
               }
           ],
           "PaymentMeans": [
               {
                   "PaymentMeansCode": {
                       "name": "SEPA credit transfer",
                       "Value": "58"
                   },
                   "PayeeFinancialAccount": {
                       "ID": {
                           "Value": "BE68 5390 0754 7034"
                       },
                       "Name": {
                           "Value": "Demo Supplier NV"
                       }
                   }
               }
           ],
           "PaymentTerms": [
               {
                   "Note": [
                       {
                           "Value": "NA"
                       }
                   ]
               }
           ],
           "TaxTotal": [
               {
                   "TaxAmount": {
                       "currencyID": "EUR",
                       "Value": 0.00
                   },
                   "TaxSubtotal": [
                       {
                           "TaxableAmount": {
                               "currencyID": "EUR",
                               "Value": 3910.00
                           },
                           "TaxAmount": {
                               "currencyID": "EUR",
                               "Value": 0.00
                           },
                           "TaxCategory": {
                               "ID": {
                                   "Value": "Z"
                               },
                               "Percent": {
                                   "Value": 0.00
                               },
                               "TaxScheme": {
                                   "ID": {
                                       "Value": "VAT"
                                   }
                               }
                           }
                       }
                   ]
               }
           ],
           "LegalMonetaryTotal": {
               "LineExtensionAmount": {
                   "currencyID": "EUR",
                   "Value": 3910.00
               },
               "TaxExclusiveAmount": {
                   "currencyID": "EUR",
                   "Value": 3910.00
               },
               "TaxInclusiveAmount": {
                   "currencyID": "EUR",
                   "Value": 3910.00
               },
               "AllowanceTotalAmount": {
                   "currencyID": "EUR",
                   "Value": 0
               },
               "ChargeTotalAmount": {
                   "currencyID": "EUR",
                   "Value": 0
               },
               "PrepaidAmount": {
                   "currencyID": "EUR",
                   "Value": 0
               },
               "PayableAmount": {
                   "currencyID": "EUR",
                   "Value": 3910.00
               }
           },
           "InvoiceLine": [
               {
                   "ID": {
                       "Value": "1"
                   },
                   "InvoicedQuantity": {
                       "unitCode": "E53",
                       "Value": 1.000
                   },
                   "LineExtensionAmount": {
                       "currencyID": "EUR",
                       "Value": 3650.00
                   },
                   "DocumentReference": [
                       {
                           "ID": {
                               "schemeID": "",
                               "Value": "1"
                           },
                           "DocumentTypeCode": {
                               "Value": "130"
                           }
                       }
                   ],
                   "Item": {
                       "Name": {
                           "Value": "Ocean Freight"
                       },
                       "SellersItemIdentification": {
                           "ID": {
                               "Value": "01"
                           }
                       },
                       "ClassifiedTaxCategory": [
                           {
                               "ID": {
                                   "Value": "Z"
                               },
                               "Percent": {
                                   "Value": 0.00
                               },
                               "TaxScheme": {
                                   "ID": {
                                       "Value": "VAT"
                                   }
                               }
                           }
                       ]
                   },
                   "Price": {
                       "PriceAmount": {
                           "currencyID": "EUR",
                           "Value": 3650.00
                       },
                       "BaseQuantity": {
                           "Value": 1
                       }
                   }
               },
               {
                   "ID": {
                       "Value": "2"
                   },
                   "InvoicedQuantity": {
                       "unitCode": "E53",
                       "Value": 1.000
                   },
                   "LineExtensionAmount": {
                       "currencyID": "EUR",
                       "Value": 260.00
                   },
                   "DocumentReference": [
                       {
                           "ID": {
                               "schemeID": "",
                               "Value": "2"
                           },
                           "DocumentTypeCode": {
                               "Value": "130"
                           }
                       }
                   ],
                   "Item": {
                       "Name": {
                           "Value": "Others"
                       },
                       "SellersItemIdentification": {
                           "ID": {
                               "Value": "01"
                           }
                       },
                       "ClassifiedTaxCategory": [
                           {
                               "ID": {
                                   "Value": "Z"
                               },
                               "Percent": {
                                   "Value": 0.00
                               },
                               "TaxScheme": {
                                   "ID": {
                                       "Value": "VAT"
                                   }
                               }
                           }
                       ]
                   },
                   "Price": {
                       "PriceAmount": {
                           "currencyID": "EUR",
                           "Value": 260.00
                       },
                       "BaseQuantity": {
                           "Value": 1
                       }
                   }
               }
           ]
       }
   }
'

Request Parameters

Field NameTypeRequiredDescription
apiKeyStringConditionalAPI key used to identify the company. Required if ublDto.CompanyId is not provided.
ublDtoObject (UBLDto)RequiredUBL 2.1 compliant invoice data structure containing all invoice details.
ublDto.TypeString (enum)NoDocument format type (e.g. PEPPOL_BIS, XRECHNUNG, ZUGFERD). See Parameter Values Reference.
ublDto.IsPeppolParticipantBooleanNoIf true, the document is routed via Peppol when the recipient is on the network.
ublDto.CompanyIdString (UUID)ConditionalUUID of the sending company. Required if apiKey is not provided.
ublDto.ProfileTypeString (enum)NoZUGFeRD / Factur-X profile type. Default: EN16931.
ublDto.CustomizationID.ValueStringNoCustomization ID (URN) for PEPPOL / EN16931 compliance.
ublDto.ID.ValueStringNoInvoice number / unique document identifier.
ublDto.IssueDate.ValueString (ISO 8601)NoInvoice issue date (YYYY-MM-DD).
ublDto.DueDate.ValueString (ISO 8601)NoDue date (YYYY-MM-DD).
ublDto.InvoiceTypeCode.ValueStringNoUN/CEFACT code (e.g. 380 = commercial invoice, 381 = credit note).
ublDto.Note[].ValueStringNoFree-text note on the invoice.
ublDto.DocumentCurrencyCode.ValueStringNoCurrency (ISO 4217), e.g. EUR.
ublDto.BuyerReference.ValueStringNoBuyer reference / Leitweg-ID.
ublDto.OrderReference.ID.ValueStringNoPurchase order number.
ublDto.OrderReference.SalesOrderID.ValueStringNoSales order number.
ublDto.AccountingSupplierPartyObjectNoSupplier party (EndpointID, PartyName, address, tax, legal entity, contact).
ublDto.AccountingSupplierParty.Party.EndpointID.ValueStringNoSupplier Peppol endpoint ID value.
ublDto.AccountingSupplierParty.Party.EndpointID.schemeIDStringNoScheme code (e.g. 9930, 0088).
ublDto.AccountingCustomerPartyObjectNoCustomer party (same structure as supplier).
ublDto.Delivery[].ActualDeliveryDate.ValueStringNoActual delivery date.
ublDto.Delivery[].DeliveryLocation.AddressObjectNoDelivery address (street, city, postal zone, country).
ublDto.PaymentMeans[].PaymentMeansCode.ValueStringNoPayment means code (e.g. 58 = SEPA credit transfer).
ublDto.PaymentMeans[].PayeeFinancialAccount.ID.ValueStringNoPayee IBAN.
ublDto.PaymentMeans[].PayeeFinancialAccount.Name.ValueStringNoAccount holder name.
ublDto.PaymentTerms[].Note[].ValueStringNoPayment terms text.
ublDto.TaxTotal[].TaxAmount.ValueNumberNoTotal tax amount.
ublDto.TaxTotal[].TaxAmount.currencyIDStringNoCurrency for tax amount.
ublDto.TaxTotal[].TaxSubtotal[].TaxableAmount.ValueNumberNoTaxable base.
ublDto.TaxTotal[].TaxSubtotal[].TaxCategory.ID.ValueStringNoTax category (e.g. S, Z, E, AE).
ublDto.TaxTotal[].TaxSubtotal[].TaxCategory.Percent.ValueNumberNoVAT rate (%).
ublDto.LegalMonetaryTotal.LineExtensionAmount.ValueNumberNoSum of line net amounts.
ublDto.LegalMonetaryTotal.TaxExclusiveAmount.ValueNumberNoTotal excl. VAT.
ublDto.LegalMonetaryTotal.TaxInclusiveAmount.ValueNumberNoTotal incl. VAT.
ublDto.LegalMonetaryTotal.PayableAmount.ValueNumberNoAmount payable.
ublDto.InvoiceLine[].ID.ValueStringNoLine number.
ublDto.InvoiceLine[].InvoicedQuantity.ValueNumberNoQuantity.
ublDto.InvoiceLine[].InvoicedQuantity.unitCodeStringNoUnit (UN/ECE Rec. 20, e.g. MTQ, C62, KGM).
ublDto.InvoiceLine[].LineExtensionAmount.ValueNumberNoLine net amount.
ublDto.InvoiceLine[].Item.Name.ValueStringNoItem name.
ublDto.InvoiceLine[].Item.SellersItemIdentification.ID.ValueStringNoSeller item code.
ublDto.InvoiceLine[].Price.PriceAmount.ValueNumberNoUnit price.
ublDto.InvoiceLine[].Price.BaseQuantity.ValueNumberNoBase quantity for price (usually 1).
receiverEmailsArray<String>NoEmail recipients after processing.
mailTemplateIdStringNoOptional mail template id.
businessTypeString (enum)NoB2B, B2C, or B2G.

Request notes

  • At least one of apiKey or ublDto.CompanyId must be provided. Both cannot be omitted.
  • When ublDto.CompanyId is omitted, the company is resolved from apiKey.
  • For AccountingSupplierParty / AccountingCustomerParty, EndpointID.schemeID uses Peppol participant identifier schemes (e.g. 9930, 0088, 0184).
  • InvoiceLine[].InvoicedQuantity.unitCode uses UN/ECE Recommendation 20 codes (e.g. MTQ, C62, KGM, LTR).

Parameter Values Reference

ublDto.Type (document format)
ValueDescription
PEPPOL_BISPEPPOL BIS Billing 3.0 (UBL-based)
XRECHNUNGGermany XRechnung (UBL)
ZUGFERDZUGFeRD (PDF/A-3 + embedded XML)
FACTUR_XFrance Factur-X
XRECHNUNG_CIIGermany XRechnung CII
CIIUN/CEFACT CII
CIDCross Industry Document
MY_INVOISMalaysia MyInvois
MY_PINTMalaysia PINT
DK_OIOUBLDenmark OIOUBL
RO_EFACTURARomania e-Factura
UAE_PINTUAE PINT
HR_INVOICECroatia
EG_INVOICEEgypt
KSEFPoland KSeF
ublDto.ProfileType
ValueDescription
EN16931EN 16931 profile (default)
EXTENDEDExtended profile
BASICBasic profile
businessType
ValueDescription
B2BBusiness to Business
B2CBusiness to Consumer
B2GBusiness to Government
Response status (immediate async status)
ValueDescription
PENDINGQueued, not yet started
PROCESSINGActively processed
COMPLETEDCompleted successfully
FAILEDProcessing failed
SENDING_FAILEDGenerated but Peppol/email delivery failed
PERMANENT_FAILEDPermanent failure, no retry

Responses

200 - Success

Request accepted; the document is queued for asynchronous processing.

{
"trackingId": "{{entity_uuid}}",
"status": "PENDING",
"message": "Document process started successfully"
}

Response Fields

Field NameTypeDescription
trackingIdString (UUID)Use with GET /invoice/document-status/{trackingId}.
statusString (enum)Initial status (typically PENDING).
messageStringInformational message.

400 - Bad Request

Scenario: Both apiKey and ublDto.CompanyId are missing.

{
"errorMessage": "apiKey or companyId field is required",
"errorType": "DOCUMENT_PROCESS_REQUIRED_FIELDS",
"errorTitle": "BAD_REQUEST",
"status": 400,
"errorId": "{{correlation_id}}",
"timestamp": "2026-01-15T12:00:00",
"path": "/invoice/send-document-async-json"
}

400 - Bad Request

Scenario: apiKey does not match any registered company.

{
"errorMessage": "Api Key Didnt Match",
"errorType": "API_ERROR",
"errorTitle": "BAD_REQUEST",
"status": 400,
"errorId": "{{correlation_id}}",
"timestamp": "2026-01-15T12:00:00",
"path": "/invoice/send-document-async-json"
}

401 - Unauthorized

Scenario: JWT in R-Auth is invalid or expired, or the user is not authorized for the company.

{
"errorMessage": "Not authorized for this action",
"errorType": "NOT_AUTHORITY",
"errorTitle": "UNAUTHORIZED",
"status": 401,
"errorId": "{{correlation_id}}",
"timestamp": "2026-01-15T12:00:00",
"path": "/invoice/send-document-async-json"
}

500 - Internal Server Error

Scenario: Unexpected server error.

{
"errorMessage": "An unexpected error occurred",
"errorType": "RUNTIME_ERROR",
"errorTitle": "INTERNAL_SERVER_ERROR",
"status": 500,
"errorId": "{{correlation_id}}",
"timestamp": "2026-01-15T12:00:00",
"path": "/invoice/send-document-async-json"
}

5. Get Document Status GET

Purpose of Use: This endpoint is used to query the processing status of documents (invoices, waybills, etc.) that have been submitted asynchronously. After submitting a document via endpoints such as /invoice/send-document-async or /invoice/send-document-async-json, the user receives a trackingId (UUID) and uses this endpoint to monitor the document's current processing stage whether it is pending, being processed, completed, or has failed.

The typical workflow is as follows: The user submits a document and immediately receives a trackingId. The user then polls this endpoint at regular intervals to track the document through its conversion, validation, signing, and delivery stages. When the document reaches a terminal status (COMPLETED, FAILED, PERMANENT_FAILED, SENDING_FAILED), the process is finished. On success, documentId, invoiceNumber, and country-specific additionalData are populated in the response; on failure, errorType and errors fields provide detailed error information.

Endpoint Information

GET /invoice/document-status/"{trackingId}"

Example Request

curl --location 'https://api-stage.docnova.ai/invoice/document-status/"{trackingId}"' \
--header 'Accept: */*' \
--header 'R-Auth: {JWT_TOKEN}'

Request Parameters

Path Parameters

Field NameTypeRequiredDescription
trackingIdUUIDYesTracking identifier returned from async document submission.
Example: 550e8400-e29b-41d4-a716-446655440000

Header Parameters

Field NameTypeRequiredDescription
R-AuthString (JWT)YesJWT token for authentication. Signed with HS512 algorithm. Payload includes: userId, companyId, authorities, correlationId

type Parameter Accepted Values

ValueGroupDescription
PEPPOL_BISUBL/PeppolPeppol BIS Billing 3.0 format
XRECHNUNGUBL/PeppolGermany XRechnung UBL format
RO_EFACTURAUBL/PeppolRomania e-Invoice format
DK_OIOUBLCountry-SpecificDenmark OIOUBL format
EG_INVOICECountry-SpecificEgypt e-Invoice format
HR_INVOICECountry-SpecificCroatia e-Invoice format
UAE_PINTCountry-SpecificUAE PINT format
MY_INVOISCountry-SpecificMalaysia MyInvois format
MY_PINTCountry-SpecificMalaysia PINT format
ZUGFERDZUGFeRD/CIIZUGFeRD 2.x format (XML embedded in PDF)
FACTUR_XZUGFeRD/CIIFactur-X format (XML embedded in PDF)
XRECHNUNG_CIIZUGFeRD/CIIXRechnung CII format
CIIZUGFeRD/CIIUN/CEFACT CII format
CIDZUGFeRD/CIICID format
PDFZUGFeRD/CIIUnstructured invoice, processed with ZUGFeRD template
KZ_ESF_V2Poland/KazakhstanKZ ESF v2 invoice format
KSEFPolandPoland KSeF format
KSEF_OFFLINEPolandPoland KSeF offline format

country Parameter Example Values

ValueCountryCurrency
DEGermanyEUR
FRFranceEUR
BEBelgiumEUR
NLNetherlandsEUR
ATAustriaEUR
ITItalyEUR
PLPolandPLN
RORomaniaRON
TRTurkeyTRY
EGEgyptEGP
AEUAEAED
MYMalaysiaMYR
DKDenmarkDKK
HRCroatiaEUR
KZKazakhstanKZT

All country codes following the ISO 3166-1 Alpha-2 standard are supported.

Responses

200 - Successful Response

{
"trackingId": "5e3c7f09-6f5f-4597-b38b-...",
"companyId": "b8d79b88-44b1-4347-a3f9-...",
"direction": null,
"documentType": "PEPPOL_BIS",
"waybillType": null,
"source": "ERP",
"target": null,
"status": "FAILED",
"filename": null,
"invoiceNumber": null,
"documentId": null,
"sendingResult": null,
"errorType": "INVOICE_ALREADY_EXISTS",
"createdAt": "2026-02-12T08:47:00",
"statusUpdatedAt": "2026-02-12T08:47:19",
"completedAt": "2026-02-12T08:47:19",
"errors": [
"Invoice already exists!"
],
"additionalData": null
}

Response Fields (200 OK)

Field NameTypeNullableDescription
trackingIdUUIDNoProcess tracking identifier
companyIdUUIDNoCompany identifier the document belongs to
directionDocumentTypeNoDocument direction (INCOMING/OUTGOING)
documentTypeDataTypeYesDocument format (see DataType Values table)
waybillTypeWaybillDataTypeYesWaybill type, only populated for waybill operations
sourceInvoiceSourceYesSource the document originated from (ERP, PORTAL, PEPPOL, etc.)
targetInvoiceSourceYesDestination the document is being sent to
statusDocumentProcessStatusNoCurrent processing status (see Status Values table)
filenameStringYesOriginal file name
invoiceNumberStringYesInvoice number (assigned upon completion)
documentIdUUIDYesSystem-generated document identifier (assigned upon completion)
sendingResultStringYesPeppol/target system delivery result
errorTypeErrorTypeYesError classification (only on failure)
createdAtISO 8601 DateTimeNoProcess creation timestamp
statusUpdatedAtISO 8601 DateTimeYesLast status update timestamp
completedAtISO 8601 DateTimeYesProcess completion timestamp (success or failure)
errorsObjectYesError details. Can be List<ValidationError>, List<String>, or String
additionalDataObjectYesCountry-specific metadata (KSeF reference no, eFactura submissionId, etc.)

Enum Value Tables

DocumentProcessStatus

ValueDescription
PENDINGInitial state, processing has not yet started
PROCESSINGCurrently being processed (conversion, validation, signing)
COMPLETEDSuccessfully completed
FAILEDProcessing failed (may be retried)
SENDING_FAILEDDelivery to target system failed
PERMANENT_FAILEDPermanent failure, will not be retried

DocumentType

ValueDescription
INCOMINGIncoming document
OUTGOINGOutgoing document

DataType

ValueDescription
PEPPOL_BISPeppol BIS 3.0 format
RO_EFACTURARomania eFactura format
XRECHNUNGGermany XRechnung (UBL) format
XRECHNUNG_CIIGermany XRechnung (CII) format
MY_INVOISMalaysia MyInvois format
MY_PINTMalaysia PINT format
DK_OIOUBLDenmark OIOUBL format
EG_INVOICEEgypt e-Invoice format
HR_INVOICECroatia e-Invoice format
UAE_PINTUAE PINT format
ZUGFERDZUGFeRD format
FACTUR_XFactur-X format
CIICross-Industry Invoice
CIDCID format
PDFPDF document
KZ_ESF_V2Kazakhstan ESF v2 format
KSEFPoland KSeF format
KSEF_OFFLINEPoland KSeF offline format

InvoiceSource

ValueDescription
PORTALWeb portal
PORTAL_OCRDocument read via OCR through portal
EMAILDocument received via email
EMAIL_OCRDocument read via OCR through email
ERPERP integration
PEPPOLPeppol network
LHDNMMalaysia LHDNM
NEMHANDELDenmark Nemhandel
SERVICEService layer
HARVESTHarvest integration
SHOPIFYShopify integration
AMAZON_SPAmazon SP integration
EBAYeBay integration
HUBSPOTHubSpot integration
ANAFRomania ANAF
LAZADALazada integration
SFTPSFTP transfer
KSEFPoland KSeF
RS_APISerbia API
ETAEgypt ETA
ERACUNeRacun
STRIPEStripe integration

WaybillDataType

ValueDescription
RS_WAYBILL_DESPATCHSerbia despatch waybill
RS_WAYBILL_RECEIPTSerbia receipt waybill
RS_APPLICATION_RESPONSESerbia application response
RO_ETRANSPORTRomania eTransport

401 - Unauthorized

Returned when the token is missing or invalid.

{
"error": "Full authentication is required to access this resource"
}

Description: The R-Auth header is missing, the token format is invalid, or the token signature cannot be verified. Retry with a valid JWT token.

498 - Token Expired

Returned when the JWT token has expired (custom HTTP status code).

{
"errorMessage": "Your session has expired. Please login again.",
"errorType": "TOKEN_EXPIRED",
"errorTitle": "UNAUTHORIZED",
"status": 401,
"timestamp": "2026-02-12T14:30:00"
}

Description: The JWT token's exp (expiration) claim has passed. The user needs to refresh their session to obtain a new token.

404 - Not Found

Returned when no document process matches the provided trackingId.

(body: null)

Description: An invalid or non-existent trackingId was provided. Ensure you are using the correct UUID returned from the async submission. This error originates from ErrorType.INVOICE_PROCESS_NOT_FOUND ("Tracking ID not found").

400 - Bad Request

Returned by the Spring framework when the trackingId path parameter is not a valid UUID format.

{
"timestamp": "2026-02-12T14:30:00.000+00:00",
"status": 400,
"error": "Bad Request",
"message": "Failed to convert value of type 'java.lang.String' to required type 'java.util.UUID'",
"path": "/invoice/document-status/invalid-uuid"
}

Description: The trackingId parameter must be in standard UUID format (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).

500 Internal Server Error

Returned when an unexpected error occurs during processing.

(body: null)

Description: An unexpected server-side error occurred. If the issue persists, contact the support team.

6. Search Document Process POST

Purpose of Use: This endpoint is used to search and filter records in the Document Processing Queue with paginated results. When an invoice or document is submitted for processing in the system (from sources such as email, ERP integration, portal upload, etc.), its processing lifecycle is tracked in the DocumentProcess table. Each document passes through status transitions such as PENDING -> PROCESSING -> COMPLETED or FAILED / SENDING_FAILED / PERMANENT_FAILED.

The endpoint requires JWT-based authentication and the user must have at least one of ADMIN, INCOMING_INVOICE_DISPLAY, or OUTGOING_INVOICE_DISPLAY authorities on the specified company.

Endpoint Information

PropertyValue
HTTP MethodPOST
URL/invoice/document-process/search
Content-Typeapplication/json
Base URL
Stage Environment URLhttps://app-stage.docnova.ai/
Production Environment URLhttps://api.docnova.ai/
AuthenticationJWT Token (R-Auth header)
AuthorizationADMIN, INCOMING_INVOICE_DISPLAY, or OUTGOING_INVOICE_DISPLAY

Example Request

curl --location 'https://api-stage.docnova.ai/invoice/document-process/search?page=0&size=20&sort=createdAt,desc' \
--header 'Content-Type: application/json' \
--header 'Accept: */*' \
--header 'R-Auth: <JWT_TOKEN>' \
--data '{
"companyId": "<COMPANY_UUID>",
"createdAt": {
"from": "2026-01-01",
"to": "2026-09-09"
},
"direction": "INCOMING",
"filename": "invoice_001.xml",
"source": "EMAIL",
"status": "PERMANENT_FAILED"
}'

Query Parameters (Pagination)

ParameterTypeRequiredDefaultDescription
pageIntegerNo0Page number (0-indexed)
sizeIntegerNo20Records per page (max: 100)
sortStringNocreatedAt,descSort field and direction. Format: field,asc

Request Parameters

FieldTypeRequiredDescription
companyIdUUIDYesUnique identifier of the company to search. Format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
directionString (Enum)NoDocument direction filter
sourceString (Enum)NoDocument ingestion source filter
filenameStringNoExact match filter by document filename
statusString (Enum)NoDocument processing status filter
createdAtObjectNoDate range filter
createdAt.fromLocalDateNoStart date (inclusive). Format: YYYY-MM-DD
createdAt.toLocalDateNoEnd date (inclusive, until 23:59:59 of the day). Format: YYYY-MM-DD

Enum Values

direction — Document Direction

ValueDescription
INCOMINGIncoming documents (invoices, waybills received from suppliers)
OUTGOINGOutgoing documents (invoices, waybills sent to customers)

source — Document Source

ValueDescription
PORTALManual upload via web portal
PORTAL_OCRUploaded via portal with OCR scanning
EMAILAutomatically received via email
EMAIL_OCRReceived via email and processed with OCR
ERPReceived via ERP system integration
PEPPOLReceived/sent via Peppol network
SFTPTransferred via SFTP server
KSEFReceived via Poland KSeF system
ANAFReceived via Romania ANAF/eFactura system
RS_APIReceived via Serbia eFaktura API
LHDNMReceived via Malaysia LHDNM/MyInvois system
NEMHANDELReceived via Denmark NemHandel network
ETAReceived via Egypt ETA system
ERACUNReceived via Indonesia eRacun system
SERVICEGenerated by internal service
HARVESTReceived via Harvest integration

status — Processing Status

ValueDescription
PENDINGDocument queued, processing has not started yet
PROCESSINGDocument is actively being processed (conversion, validation, submission)
COMPLETEDDocument successfully processed and completed
FAILEDProcessing failed, eligible for automatic retry
SENDING_FAILEDDocument prepared but failed during transmission to target system
PERMANENT_FAILEDPermanent failure, no retry will be attempted (validation error, format mismatch, etc.)

Responses

200 - Successful Response

{
"content": [
{
"trackingId": "a1b2c3d4-e5f6-7890-abcd-...",
"companyId": "b8d79b88-44b1-4347-a3f9-...",
"direction": "INCOMING",
"documentType": "PEPPOL_BIS",
"waybillType": null,
"source": "EMAIL",
"target": "PORTAL",
"status": "PERMANENT_FAILED",
"filename": "invoice_001.xml",
"invoiceNumber": "INV-2026-001",
"documentId": "d4e5f6a7-b8c9-0123-4567-...",
"sendingResult": null,
"errorType": "VALIDATION_FAILED",
"createdAt": "2026-01-15T10:30:00",
"statusUpdatedAt": "2026-01-15T10:31:15",
"completedAt": null,
"errors": [
{
"field": "buyerReference",
"message": "Buyer reference is required for INCOMING invoices"
}
],
"additionalData": null
}
],
"totalElements": 42,
"totalPages": 3,
"number": 0,
"size": 20,
"sort": {
"sorted": true,
"unsorted": false,
"empty": false
},
"first": true,
"last": false,
"empty": false
}

Response Fields — content[] Array

FieldTypeNullableDescription
trackingId UUIDNoUnique tracking identifier of the document processing record
companyId UUIDNoUnique identifier of the associated company
direction String (Enum)YesDocument direction (INCOMING/OUTGOING)
documentType String (Enum)YesDocument format/type (e.g., XRECHNUNG, ZUGFERD, KSEF, MY_INVOIS)
waybillType String (Enum)YesWaybill type. Values: RS_WAYBILL_DESPATCH, RS_WAYBILL_RECEIPT, RS_APPLICATION_RESPONSE, RO_ETRANSPORT
source String (Enum)YesSource from which the document originated
target String (Enum)YesTarget system where the document will be delivered
status String (Enum)NoCurrent processing status
filename StringYesName of the processed file
invoiceNumber StringYesInvoice number (parsed from document content)
documentId UUIDYesID of the created document if processing completed
sendingResult StringYesResult message from submission to target system
errorType String (Enum)YesError category (e.g., VALIDATION_FAILED, INVOICE_PROCESS_NOT_FOUND)
createdAt DateTimeNoTimestamp when the processing record was created. Format: YYYY-MM-DDTHH:mm:ss
statusUpdatedAt DateTimeNoTimestamp of the last status update
completedAt DateTimeYesTimestamp when processing completed (only populated for COMPLETED status)
errors ObjectYesError details. Can be ValidationErrors[], String[], or String
additionalData ObjectYesCountry-specific metadata (e.g., KSeF reference number, ANAF submission ID)

Response Fields — Pagination Metadata

FieldTypeDescription
totalElements LongTotal number of records matching the filters
totalPages IntegerTotal number of pages
number IntegerCurrent page number (0-indexed)
size IntegerNumber of records per page
sort.sorted BooleanWhether results are sorted
first BooleanWhether this is the first page
last BooleanWhether this is the last page
empty BooleanWhether the page content is empty

The following error codes may be returned by this endpoint.

400 - Invalid Request

Returned when request body validation fails. The companyId field is marked as @NotNull and is required. Invalid enum values or format errors also trigger this code.

{
"errorMessage": "Validation failed",
"errorType": "BAD_REQUEST",
"errorTitle": "BAD_REQUEST",
"status": 400,
"errorId": "corr-abc123",
"timestamp": "2026-01-15T10:30:00",
"path": "/invoice/document-process/search",
"validationErrors": [
{
"field": "companyId",
"message": "must not be null"
}
]
}

Trigger Conditions:

  • companyId field is missing or null
  • direction field contains an invalid enum value (e.g., "BOTH" instead of "INCOMING" or "OUTGOING")
  • source field contains an invalid enum value
  • status field contains an invalid enum value
  • createdAt.from or createdAt.to has an invalid date format (must be YYYY-MM-DD)
  • createdAt.from or createdAt.to contains a future date (@PastOrPresent constraint)

401 - Authentication Failure

Returned when the JWT token is missing, expired, or invalid.

{
"errorMessage": "AUTHORIZATION_FAILED",
"errorType": "AUTHORIZATION_FAILED",
"errorTitle": "UNAUTHORIZED",
"status": 401,
"errorId": "corr-def456",
"timestamp": "2026-01-15T10:30:00",
"path": "/invoice/document-process/search"
}

Trigger Conditions:

  • R-Auth header is not provided
  • JWT token has expired (exp claim has passed)
  • JWT token signature is invalid (secret key mismatch)
  • JWT token format is malformed or cannot be parsed

403 - Authorization Failure

The user has passed authentication but does not have the required authority on the specified company.

{
"errorMessage": "AUTHORIZATION_FAILED",
"errorType": "AUTHORIZATION_FAILED",
"errorTitle": "UNAUTHORIZED",
"status": 401,
"errorId": "corr-ghi789",
"timestamp": "2026-01-15T10:30:00",
"path": "/invoice/document-process/search"
}

Note: In the project architecture, AuthorizationServiceException is mapped to 401 UNAUTHORIZED. Even if the user has a valid token, this error is returned if the user does not have ADMIN, INCOMING_INVOICE_DISPLAY, or OUTGOING_INVOICE_DISPLAY authority on the specified company.

Trigger Conditions:

  • User has no role on the company specified by companyId
  • User's current role does not include any of ADMIN, INCOMING_INVOICE_DISPLAY, or OUTGOING_INVOICE_DISPLAY

500 - Internal Server Error

Returned when an unexpected server error occurs.

{
"errorMessage": "An unexpected error occurred",
"errorType": "INTERNAL_SERVER_ERROR",
"errorTitle": "INTERNAL_SERVER_ERROR",
"status": 500,
"errorId": "corr-jkl012",
"timestamp": "2026-01-15T10:30:00",
"path": "/invoice/document-process/search"
}

Trigger Conditions:

  • Database connection failure
  • Redis connection issue
  • Unexpected RuntimeException or IOException

7. Get PDF From UBL POST

Purpose of Use: This API endpoint converts e-invoice XML data in UBL (Universal Business Language) format into a human-readable PDF document. Client applications (ERP systems, accounting software, portal interfaces) use this service to generate visual previews, printable copies, or archival PDF outputs of invoices sent or received over the Peppol network.

Endpoint Information

PropertyValue
URL/invoice/generate/pdf
MethodPOST
Content-Typeapplication/json
Base URL
Stage Environment URLhttps://app-stage.docnova.ai/
Production Environment URLhttps://api.docnova.ai/
AuthenticationR-Auth header (JWT token)
Success Response200 OK — Binary PDF data (byte[])

Example Request

curl --location 'https://api-stage.docnova.ai/invoice/generate/pdf' \
--header 'Content-Type: application/json' \
--header 'Accept: */*' \
--header 'R-Auth: eyJhbGciOiJIUzUxMiJ9...' \
--data '{
"base64XML": "PD94bWwgdmVyc2...",
"country": "BE",
"type": "PEPPOL_BIS",
"vatNumber": "BE0401065997"
}'

Request Parameters

Field NameTypeRequiredDescription
base64XMLStringYesBase64-encoded invoice XML data. Supports UBL 2.1, ZUGFeRD, CII, and country-specific XML formats.
typeDataType(Enum)YesSpecifies the format type of the invoice data. Determines which XSLT template will be used to process the XML.
countryCountry(Enum)NoCompany country country code (ISO 3166-1 Alpha-2). When specified, company details (logo, language) are applied to the PDF.
vatNumberStringNoCompany VAT/Tax number. Used together with country to apply company settings (language, template) to the PDF.

type Parameter Accepted Values

ValueGroupDescription
PEPPOL_BISUBL/PeppolPeppol BIS Billing 3.0 format
XRECHNUNGUBL/PeppolGermany XRechnung UBL format
RO_EFACTURAUBL/PeppolRomania e-Invoice format
DK_OIOUBLCountry-SpecificDenmark OIOUBL format
EG_INVOICECountry-SpecificEgypt e-Invoice format
HR_INVOICECountry-SpecificCroatia e-Invoice format
UAE_PINTCountry-SpecificUAE PINT format
MY_INVOISCountry-SpecificMalaysia MyInvois format
MY_PINTCountry-SpecificMalaysia PINT format
ZUGFERDZUGFeRD/CIIZUGFeRD 2.x format (XML embedded in PDF)
FACTUR_XZUGFeRD/CIIFactur-X format (XML embedded in PDF)
XRECHNUNG_CIIZUGFeRD/CIIXRechnung CII format
CIIZUGFeRD/CIIUN/CEFACT CII format
CIDZUGFeRD/CIICID format
PDFZUGFeRD/CIIUnstructured invoice, processed with ZUGFeRD template
KZ_ESF_V2Poland/KazakhstanKZ ESF v2 invoice format
KSEFPolandPoland KSeF format
KSEF_OFFLINEPolandPoland KSeF offline format

country Parameter Example Values

ValueCountryCurrency
DEGermanyEUR
FRFranceEUR
BEBelgiumEUR
NLNetherlandsEUR
ATAustriaEUR
ITItalyEUR
PLPolandPLN
RORomaniaRON
TRTurkeyTRY
EGEgyptEGP
AEUAEAED
MYMalaysiaMYR
DKDenmarkDKK
HRCroatiaEUR
KZKazakhstanKZT

All country codes following the ISO 3166-1 Alpha-2 standard are supported.

Responses

200 - Successful Response

PropertyValue
HTTP Status200 OK
Content-Typeapplication/octet-stream
Base URL
Stage Environment URLhttps://app-stage.docnova.ai/
Production Environment URLhttps://api.docnova.ai/
BodyBinary PDF data (byte[])

A successful response does not return JSON; the binary content of the PDF file is returned directly.

400 - Bad Request

Cause: Base64 decoding error, invalid XML structure, or XSLT transformation failure.

{
"errorMessage": "PDF convert error: Illegal base64 character",
"errorType": "PDF_CONVERT_ERROR",
"errorTitle": "BAD_REQUEST",
"status": 400,
"errorId": "a1b2c3d4-e5f6-7890",
"timestamp": "2026-02-12T14:30:00.000000",
"path": "/invoice/generate/pdf"
}

400 - Bad Request — IllegalStateException (PDF Conversion Failure)

Cause: An unexpected error occurred during HTML-to-PDF conversion (corrupted HTML output, missing fonts, etc.).

{
"errorMessage": "PDF convert error: PDF conversion failed due to an unexpected error",
"errorType": "PDF_CONVERT_ERROR",
"errorTitle": "BAD_REQUEST",
"status": 400,
"errorId": "b2c3d4e5-f6a7-8901",
"timestamp": "2026-02-12T14:31:00.000000",
"path": "/invoice/generate/pdf"
}

400 - Bad Request — Invalid type Value

Cause: An undefined enum value was sent for the type field.

{
"errorMessage": "JSON parse error: Cannot deserialize value of type `DataType` from String \"INVALID_TYPE\"",
"errorType": "BAD_REQUEST",
"errorTitle": "BAD_REQUEST",
"status": 400,
"errorId": "c3d4e5f6-a7b8-9012",
"timestamp": "2026-02-12T14:32:00.000000",
"path": "/invoice/generate/pdf"
}

400 - Bad Request — Invalid country Value

Cause: An undefined enum value was sent for the country field.

{
"errorMessage": "JSON parse error: Cannot deserialize value of type `Country` from String \"XX\"",
"errorType": "BAD_REQUEST",
"errorTitle": "BAD_REQUEST",
"status": 400,
"errorId": "d4e5f6a7-b8c9-0123",
"timestamp": "2026-02-12T14:33:00.000000",
"path": "/invoice/generate/pdf"
}

401 - Unauthorized

Cause: Missing, invalid, or expired JWT token in R-Auth header.

{
"errorMessage": "Unauthorized access",
"errorType": "UNAUTHORIZED",
"errorTitle": "UNAUTHORIZED",
"status": 401,
"errorId": "e5f6a7b8-c9d0-1234",
"timestamp": "2026-02-12T14:34:00.000000",
"path": "/invoice/generate/pdf"
}

500 - Internal Server Error

Cause: Disk I/O errors, memory insufficiency, or other unexpected runtime errors during PDF generation.

{
"errorMessage": "An unexpected error occurred during PDF generation",
"errorType": "RUNTIME_ERROR",
"errorTitle": "INTERNAL_SERVER_ERROR",
"status": 500,
"errorId": "f6a7b8c9-d0e1-2345",
"timestamp": "2026-02-12T14:35:00.000000",
"path": "/invoice/generate/pdf"
}

8. Invoice Search POST

Purpose of Use: The POST /invoice/search-documents endpoint is used to search for invoices and documents belonging to a specific company using various filter criteria. Users can search by date range, document direction (incoming/outgoing), invoice status, document format, and other attributes, receiving paginated results. The response includes a list of matching documents, total document count, and amount summaries (tax-exclusive and tax-inclusive totals). This endpoint performs document search operations across all supported country solutions (Germany, Austria, Belgium, Netherlands, Norway, Sweden, Poland, Denmark, Slovakia, Croatia, Malaysia, UAE, Romania). Key use cases include: listing incoming invoices within a specific date range, tracking the status of sent documents, searching documents by reference number, and obtaining amount summaries for financial reporting.

Endpoint Information

PropertyValue
URL/invoice/search-documents
MethodPOST
AuthenticationR-Auth header (JWT token)

Example Request

curl --location 'https://api-stage.docnova.ai/invoice/search-documents' \
--header 'Content-Type: application/json' \
--header 'Accept: */*' \
--header 'R-Auth: {JWT_TOKEN}' \
--data '{
"companyId": "{COMPANY_UUID}",
"documentType": "INCOMING",
"endDate": "2026-09-09",
"page": 1,
"size": 5,
"startDate": "2025-09-09"
}'

Request Parameters

FieldTypeRequiredDescription
companyIdUUIDYesUnique identifier of the company to search within
documentTypeDocumentTypeNoDocument direction filter (INCOMING or OUTGOING)
statusInvoiceStatusNoInvoice status filter (see values table below)
typeDataTypeNoDocument format type filter (see values table below)
startDateLocalDateNoStart of the search date range (YYYY-MM-DD)
endDateLocalDateNoEnd of the search date range (YYYY-MM-DD)
tinStringNoFilter by Tax Identification Number
uitStringNoFilter by additional identifier
referenceDocumentStringNoSearch by reference document number, supplier/customer name, or VAT number
pageIntegerNoPage number (default: 0, zero-indexed)
sizeIntegerNoNumber of records per page (default: 50)

Parameter Value Tables

documentType Values

ValueDescription
INCOMINGIncoming invoices (received from suppliers)
OUTGOINGOutgoing invoices (sent to customers)

status Values

CategoryValueDescription
GeneralCREATEDInvoice created
PENDINGProcessing pending
CANCELEDCancelled
DELETEDDeleted (soft delete)
CREDIT_BLOCKEDCredit blocked
Format SaveSAVED_AS_UBLSaved as UBL format
SAVED_AS_ZUGFERDSaved as ZUGFeRD format
SAVED_AS_FACTUR_XSaved as Factur-X format
SAVED_AS_CIISaved as CII format
SAVED_AS_CIDSaved as CID format
SAVED_AS_KSEFSaved as KSeF format
SAVED_AS_PDFSaved as PDF format
TransmissionSENT_TO_ACCESS_POINTSent to access point
SENT_VIA_EMAILSent via email
OCROCR_WAITINGOCR processing pending
OCR_PARSEDOCR parsed successfully
OCR_FAILEDOCR failed
OCR_PARSED_PENDING_PAYMENTOCR parsed, payment pending
OCR_WAITING_TOKENOCR waiting for token
COMPLETED_BY_MELA_AICompleted by Mela AI
PeppolSENT_TO_PEPPOLSent to Peppol network
SUCCESSSuccessful
INVALID_PARAMETERSInvalid parameters
TRANSPORT_ERRORTransport error
NO_SIGNAL_MESSAGE_RECEIVEDNo signal message received
AS4_ERROR_MESSAGE_RECEIVEDAS4 error message received
INVALID_SIGNAL_MESSAGE_RECEIVEDInvalid signal message received
INCOMING_RESPONSE_ACKNOWLEDGEDIncoming response acknowledged (MLR/MLS)
INCOMING_RESPONSE_REJECTEDIncoming response rejected
INCOMING_RESPONSE_ACCEPTEDIncoming response accepted
OUTGOING_RESPONSE_ACKNOWLEDGEDOutgoing response acknowledged (MLR/MLS)
OUTGOING_RESPONSE_REJECTEDOutgoing response rejected
OUTGOING_RESPONSE_ACCEPTEDOutgoing response accepted
ANAF (RO)SENT_TO_ANAFSent to ANAF
PORTAL_OKAYPortal approved
PORTAL_ERRORPortal error
PORTAL_ERRORSPortal errors (multiple)
PORTAL_SYSTEM_ERRORPortal system error
PORTAL_IN_PROCESSPortal processing
LHDNM (MY)LHDNM_SUBMITTEDSubmitted to LHDNM
LHDNM_VALIDValidated by LHDNM
LHDNM_INVALIDInvalidated by LHDNM
LHDNM_CANCELLEDCancelled by LHDNM
LHDNM_REJECT_REQUESTEDLHDNM rejection requested
LHDNM_REJECTEDRejected by LHDNM
LHDNM_ERRORLHDNM error
ETA (EG)ETA_SUBMITTEDSubmitted to ETA
KSeF (PL)KSEF_PENDINGPending in KSeF
KSEF_ACCEPTEDAccepted by KSeF
KSEF_REJECTEDRejected by KSeF
KSEF_DUPLICATEDuplicate in KSeF
eRačun (HR)ERACUN_ERROReRačun error
ERACUN_PENDINGeRačun pending
ERACUN_WAITING_TO_SENDeRačun waiting to send
ERACUN_SENTeRačun sent
ERACUN_RECEIVEDeRačun received
ERACUN_APPROVEDeRačun approved
ERACUN_REJECTEDeRačun rejected
ERACUN_FULLY_PAIDeRačun fully paid
ERACUN_PARTIALLY_PAIDeRačun partially paid
ERACUN_DELIVERY_FAILEDeRačun delivery failed
Nemhandel (DK)SENT_TO_NEMHANDELSent to Nemhandel

type Values

ValueGroupDescription
PEPPOL_BISXRECHNUNGPeppol BIS standard
RO_EFACTURAXRECHNUNGRomania e-Invoice
XRECHNUNGXRECHNUNGGermany XRechnung standard
MY_INVOISMY_INVOISMalaysia MyInvois
MY_PINTMY_PINTMalaysia PINT
DK_OIOUBLDK_OIOUBLDenmark OIOUBL
EG_INVOICEEG_INVOICEEgypt e-Invoice
HR_INVOICEHR_INVOICECroatia e-Invoice
UAE_PINTUAE_PINTUAE PINT
ZUGFERDZUGFERDZUGFeRD standard
FACTUR_XZUGFERDFactur-X (France)
XRECHNUNG_CIIZUGFERDXRechnung CII format
CIIZUGFERDCross Industry Invoice
CIDZUGFERDCID format
PDFZUGFERDPDF document
KZ_ESF_V2KZ_ESF_V2Kazakhstan ESF v2
KSEFKSEFPoland KSeF
KSEF_OFFLINEKSEF_OFFLINEPoland KSeF offline

Responses

200 - Successful Response

{
"totalCount": 50,
"netTotal": 8422.0,
"invoiceList": [
{
"id": "89596abc-1aa2-4d28-ade4-...",
"companyId": "b8d79b88-44b1-4347-a3f9-...",
"userId": null,
"customerName": "Germany Demo Company",
"supplierName": "Belgium Demo Company",
"supplierId": "BE234233327",
"supplierVat": "BE234233327",
"status": "OUTGOING_RESPONSE_ACCEPTED",
"invoiceNumber": "90002002",
"taxExclusiveAmount": 1000.0,
"taxInclusiveAmount": 1210.0,
"lineExtensionAmount": 1000.0,
"payableAmount": 1210.0,
"allowanceTotalAmount": null,
"currency": "EUR",
"createdTime": "2026-01-15T09:22:00.703586",
"localCreatedTime": "2026-01-15T10:22:00.703768",
"issueDate": "2026-01-14",
"deliveryDate": "2026-01-14",
"dueDate": "2026-01-14",
"supplierCountryCode": "BE",
"supplierEndpoint": "iso6523-actorid-upis::9925:...",
"customerId": "BE0401065997",
"customerVat": "BE0401065997",
"customerEndpoint": "iso6523-actorid-upis::9925:...",
"customerCountryCode": "BE",
"typeCode": "380",
"documentType": "INCOMING",
"errorMessage": null,
"lastUpdatedTime": "2026-01-15T09:22:00.703817",
"localLastUpdatedTime": "2026-01-15T10:22:00.703818",
"type": "PEPPOL_BIS",
"idIncarcare": null,
"idDescarcare": null,
"source": "PEPPOL",
"sendViaPeppol": false,
"statusTime": "2026-01-15T09:22:00.703812",
"localStatusTime": "2026-01-15T10:22:00.703815",
"fileName": null,
"ocrParser": null,
"paymentDetails": {
"paymentStatus": "LATE",
"paidAmount": 0.0,
"totalAmount": 1210.0,
"remainingAmount": 1210.0,
"paymentDate": null
},
"profileType": "EN16931",
"isActive": true,
"countrySpecificData": null
},
{
"id": "c3b82ec0-e91f-40eb-924e-...",
"companyId": "b8d79b88-44b1-4347-a3f9-...",
"userId": null,
"customerName": "Germany Demo Company",
"supplierName": "Belgium Demo Company",
"supplierId": "BE0401065997",
"supplierVat": "BE0401065997",
"status": "SAVED_AS_UBL",
"invoiceNumber": "90001998",
"taxExclusiveAmount": 1000.0,
"taxInclusiveAmount": 1210.0,
"lineExtensionAmount": 1000.0,
"payableAmount": 1210.0,
"allowanceTotalAmount": null,
"currency": "EUR",
"createdTime": "2026-01-13T12:02:00.875403",
"localCreatedTime": "2026-01-13T13:02:00.87577",
"issueDate": "2026-01-13",
"deliveryDate": "2026-01-09",
"dueDate": "2026-01-15",
"supplierCountryCode": "BE",
"supplierEndpoint": "iso6523-actorid-upis::9925:...",
"customerId": "BE0401065997",
"customerVat": "BE0401065997",
"customerEndpoint": "iso6523-actorid-upis::9925:...",
"customerCountryCode": "BE",
"typeCode": "380",
"documentType": "INCOMING",
"errorMessage": null,
"lastUpdatedTime": "2026-01-13T12:02:00.875844",
"localLastUpdatedTime": "2026-01-13T13:02:00.875851",
"type": "PEPPOL_BIS",
"idIncarcare": null,
"idDescarcare": null,
"source": "PEPPOL",
"sendViaPeppol": false,
"statusTime": "2026-01-13T12:02:00.875836",
"localStatusTime": "2026-01-13T13:02:00.875841",
"fileName": null,
"ocrParser": null,
"paymentDetails": {
"paymentStatus": "LATE",
"paidAmount": 0.0,
"totalAmount": 1210.0,
"remainingAmount": 1210.0,
"paymentDate": null
},
"profileType": "EN16931",
"isActive": true,
"countrySpecificData": null
}
],
"total": 9262.0
}
FieldTypeDescription
totalCountLongTotal number of documents matching the filters
netTotalDoubleSum of tax-exclusive amounts
TotalDoubleSum of tax-inclusive amounts
invoiceListList<Invoice>Paginated list of invoices

Invoice Object within invoiceList

FieldTypeDescription
idStringUnique invoice identifier (UUID)
companyIdStringCompany identifier
userIdStringUser identifier
customerNameStringCustomer name
supplierNameStringSupplier name
supplierIdStringSupplier identifier
supplierVatStringSupplier VAT number
statusInvoiceStatusInvoice status
invoiceNumberStringInvoice number
taxExclusiveAmountDoubleTax-exclusive amount
taxInclusiveAmountDoubleTax-inclusive amount
lineExtensionAmountDoubleLine extension total amount
payableAmountDoublePayable amount
allowanceTotalAmountDoubleTotal allowance amount
currencyStringCurrency code (ISO 4217)
createdTimeDateTimeCreation timestamp (UTC)
localCreatedTimeDateTimeLocal creation timestamp
issueDateDateTimeIssue date
deliveryDateDateTimeDelivery date
dueDateDateTimeDue date
supplierCountryCodeStringSupplier country code
supplierEndpointStringSupplier endpoint address
customerIdStringCustomer identifier
customerVatStringCustomer VAT number
customerEndpointStringCustomer endpoint address
customerCountryCodeStringCustomer country code
typeCodeStringDocument type code
documentTypeDocumentTypeDocument direction (INCOMING/OUTGOING)
errorMessageStringError message (if applicable)
lastUpdatedTimeDateTimeLast update timestamp (UTC)
localLastUpdatedTimeDateTimeLocal last update timestamp
typeDataTypeDocument format type
sourceInvoiceSourceInvoice source
sendViaPeppolBooleanWhether sent via Peppol
statusTimeDateTimeStatus change timestamp
fileNameStringFile name
ocrParserOcrParserOCR parser type
paymentDetailsInvoicePaymentDetailsPayment details
profileTypeProfileTypeProfile type
isActiveBooleanActive status
countrySpecificDataObjectCountry-specific data

400 - Bad Request

Trigger: When companyId is sent in an invalid UUID format, when documentType or status fields contain a value not defined in the enum, or when the date format is incorrect.

{
"errorMessage": "Invalid UUID string: invalid-uuid",
"errorType": "ILLEGAL_ARGUMENT",
"errorTitle": "BAD_REQUEST",
"errorId": "corr-xxxx-xxxx",
"status": 400,
"timestamp": "2026-02-13T10:30:00",
"path": "/invoice/search-documents"
}

401 - Unauthorized

Trigger: When the R-Auth header is missing, contains an expired JWT token, or an invalid token. Also returned when the user does not have authorization for the specified company.

{
"errorMessage": "Not authorized for this action",
"errorType": "NOT_AUTHORITY",
"errorTitle": "UNAUTHORIZED",
"errorId": "corr-xxxx-xxxx",
"status": 401,
"timestamp": "2026-02-13T10:30:00",
"path": "/invoice/search-documents"
}

404 - Not Found

Trigger: When no company matching the specified companyId is found.

{
"errorMessage": "Company not found with id: b8d79b88-44b1-4347-a3f9-5438c2a4f936",
"errorType": "NOT_FOUND",
"errorTitle": "NOT_FOUND",
"errorId": "corr-xxxx-xxxx",
"status": 404,
"timestamp": "2026-02-13T10:30:00",
"path": "/invoice/search-documents"
}

422 - Unprocessable Entity

Trigger: When the request is syntactically correct but violates business rules. For example, when startDate is greater than endDate or an invalid date range is specified.

{
"errorMessage": "Start date cannot be after end date",
"errorType": "BUSINESS_ERROR",
"errorTitle": "UNPROCESSABLE_ENTITY",
"errorId": "corr-xxxx-xxxx",
"status": 422,
"timestamp": "2026-02-13T10:30:00",
"path": "/invoice/search-documents"
}

500 - Internal Server Error

Trigger: Triggered by server-side issues such as database connection errors, unexpected runtime exceptions, or I/O errors.

{
"errorMessage": "An unexpected error occurred",
"errorType": "RUNTIME_ERROR",
"errorTitle": "INTERNAL_SERVER_ERROR",
"errorId": "corr-xxxx-xxxx",
"status": 500,
"timestamp": "2026-02-13T10:30:00",
"path": "/invoice/search-documents"
}

9. Peppol - Get MLR GET

Purpose of Use This endpoint is used to query Message Level Response (MLR) records for invoices sent or received through the Peppol network.
MLR is a message level response mechanism in the Peppol infrastructure that indicates whether a document was successfully delivered, accepted, or rejected by the receiving party.

With this API you can:

  • List all MLR responses belonging to a specific company
  • Query MLR status for a specific invoice (invoiceId) or document (documentId)
  • Filter by the counterpart’s Peppol participant identifier (counterpartParticipantId)
  • Perform time based searches by specifying a date range (fromDate, toDate)
  • Returned responses include detail lines for each MLR record (error field, status reason, description)

This enables developers to programmatically track the final status of the invoice delivery process and take necessary actions in case of errors.

Endpoint Information

PropertyValue
URL/peppol/search-mlr
MethodGET
AuthenticationR-Auth header (JWT token)

Example Request

{
curl --location 'https://api-stage.docnova.ai/peppol/search-mlr?companyId={companyId}&counterpartParticipantId={counterpartParticipantId}&documentId={documentId}&fromDate={fromDate}&invoiceId={invoiceId}&toDate={toDate}' \
--header 'Accept: */*' \
--header 'R-Auth: {jwt_token}'
}

Request Parameters

FieldTypeRequiredFormatDescription
companyIdString(UUID)Yesxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxUnique identifier of the company to query
documentIdString(UUID)Noxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxPeppol document identifier (instance identifier)
counterpartParticipantIdStringNo{scheme}:{identifier} (e.g., 9930:de111222777)Counterpart’s Peppol participant identifier
invoiceIdStringNoFree textInvoice number or identifier
fromDateString(ISO Date)Noyyyy-MM-dd (e.g., 2025-09-09)Search start date (inclusive)
toDateString(ISO Date)Noyyyy-MM-dd (e.g., 2026-09-09)Search end date (inclusive)

Request Headers

HeaderTypeRequiredDescription
R-AuthString (JWT)YesUser authentication token. JWT signed with HS512 algorithm
AcceptStringNoDefault /. Response is returned as application/json

Parameter Values

counterpartParticipantId Format

SchemeDescriptionExample
9930Germany VAT number9930:de111222777
0204Leitweg-ID0204:1234567890123
0088EAN location code0088:1234567890123

responseType Response Type Enum Values

ValueDescription
ACCEPTANCEDocument was accepted by the counterpart
ACKNOWLEDGINGDocument was acknowledged (received) by the counterpart
REJECTIONDocument was rejected by the counterpart

statusReasonCode Status Reason Code Enum Values

ValueDescription
BUSINESS_RULE_VIOLATION_FATALBusiness rule violation. Critical error. Document was not processed
BUSINESS_RULE_VIOLATION_WARNINGBusiness rule violation. Warning. Document can still be processed
SYNTAX_VIOLATIONSyntax error. Document format is invalid

Responses

200 - Successful Response

Type: List<SearchMLRResponse>

{
[
{
"id": "a1b2c3d4-e5f6-7890-abcd-...",
"companyId": "60ccd1a7-5348-47b2-9ef6-...",
"documentId": "8fa4606f-94f2-45e1-a8cb-...",
"responseType": "ACCEPTANCE",
"receivedTime": "2026-01-15T14:30:00",
"counterpartParticipantId": "9930:de111222777",
"invoiceId": "2026_007_peppol",
"responseLines": [
{
"id": "f1e2d3c4-b5a6-7890-abcd-...",
"errorField": null,
"responseCode": "ACCEPTANCE",
"description": "Document successfully processed",
"statusReasonCode": null
}
]
}
]
}

Response Fields

FieldTypeDescription
idUUIDUnique identifier of the MLR record
companyIdStringIdentifier of the related company
documentIdStringPeppol document identifier
responseTypeEnum (MessageLevelResponseType)Overall response type: ACCEPTANCE, ACKNOWLEDGING, REJECTION
receivedTimeDateTime (ISO 8601)Date and time the MLR response was received
counterpartParticipantIdStringCounterpart’s Peppol participant identifier
invoiceIdStringRelated invoice number
responseLinesList<SearchMLRLineResponse>MLR detail lines

Response Detail Lines

FieldTypeDescription
idUUIDUnique identifier of the detail line
errorFieldString (nullable)The field / XPath expression where the error occurred
responseCodeEnum (MessageLevelResponseType)Line level response code: ACCEPTANCE, ACKNOWLEDGING, REJECTION
descriptionString (nullable)Error or status description
statusReasonCodeEnum (MLRStatusReasonCode) (nullable)Status reason code: BUSINESS_RULE_VIOLATION_FATAL, BUSINESS_RULE_VIOLATION_WARNING, SYNTAX_VIOLATION

400 - Bad Request

Occurs when the required companyId parameter is missing or when the date format is invalid.

{
"errorMessage": "Required request parameter 'companyId' for method parameter type String is not present",
"errorType": "BAD_REQUEST",
"errorTitle": "BAD_REQUEST",
"status": 400,
"errorId": "corr-xxx-xxx",
"timestamp": "2026-01-15T14:30:00",
"path": "/peppol/search-mlr"
}

Description: The companyId parameter is mandatory and Spring framework automatically returns this error when it is missing. Additionally, if fromDate or toDate parameters do not conform to the yyyy-MM-dd ISO format, the same error code is returned.

401 - Unauthorized

Occurs when the JWT token is invalid, expired, or the R-Auth header is missing. Also returned when the user is not associated with the specified companyId.

{
"errorMessage": "Not authorized for this action",
"errorType": "NOT_AUTHORITY",
"errorTitle": "UNAUTHORIZED",
"status": 401,
"errorId": "corr-xxx-xxx",
"timestamp": "2026-01-15T14:30:00",
"path": "/peppol/search-mlr"
}

Description: The authorizationService.checkIfCompanyUser(companyId, userId) method verifies that the user identity in the JWT token matches the specified companyId. If they do not match, an AuthorizationServiceException is thrown. This error is also returned when the token is expired or its signature is invalid.

500 - Internal Server Error

Returned in case of database access errors, unexpected runtime exceptions, or other server-side failures.

{
"errorMessage": "An unexpected error occurred",
"errorType": "RUNTIME_ERROR",
"errorTitle": "INTERNAL_SERVER_ERROR",
"status": 500,
"errorId": "corr-xxx-xxx",
"timestamp": "2026-01-15T14:30:00",
"path": "/peppol/search-mlr"
}

Description: Returned in case of database connection errors, JPA/Hibernate query failures, or unexpected internal server errors. The errorId (correlation id) field can be used to trace detailed error information from log records.

Error Response General Format

FieldTypeDescription
errorMessageStringHuman readable description of the error
errorTypeStringError classification code (e.g., NOT_AUTHORITY, RUNTIME_ERROR)
errorTitleString (HttpStatus)HTTP status code name (e.g., BAD_REQUEST, UNAUTHORIZED, INTERNAL_SERVER_ERROR)
statusIntegerHTTP status code numeric value (e.g., 400, 401, 500)
errorIdString (nullable)Correlation ID used for log tracing
dataString (nullable)Additional data (if available)
detailsMap<String, Object> (nullable)Detailed error information (if available)
validationErrorsList<ValidationError> (nullable)Field level validation errors (if available)
timestampDateTime (ISO 8601)Time when the error occurred
pathStringEndpoint path where the error occurred

10. Peppol - Send MLR POST

Purpose of Use The POST /peppol/send-mlr endpoint is used to send a Message Level Response (MLR) within the Peppol infrastructure.

An MLR is the official response given by the receiving party to an e-invoice received through Peppol. This response communicates to the sender whether the invoice was successfully received and accepted, is being processed (acknowledged), or has been rejected. The receiver can inform the sender in detail by specifying errors in the invoice (IBAN error, syntax error, business rule violation, etc.).

After the MLR is sent, the related invoice status is automatically updated.

Endpoint Information

PropertyValue
URL/peppol/send-mlr
MethodPOST
Content-Typeapplication/json
Base URL
Stage Environment URLhttps://app-stage.docnova.ai/
Production Environment URLhttps://api.docnova.ai/
AuthenticationR-Auth header (JWT token)

Example Request


curl --location 'https://api-stage.docnova.ai/peppol/send-mlr' \
--header 'Content-Type: application/json' \
--header 'Accept: */*' \
--header 'R-Auth: <JWT_TOKEN>' \
--data '{
"errorLines": [
{
"description": "The IBAN number provided in the payment instructions is invalid or missing",
"errorField": "PaymentMeans/PayeeFinancialAccount/ID",
"responseCode": "ACKNOWLEDGING",
"statusReasonCode": "BUSINESS_RULE_VIOLATION_WARNING"
}
],
"invoiceId": "<INVOICE_UUID>",
"responseCode": "ACCEPTANCE"
}'

Request Parameters


Root Level Parameters
Field NameTypeRequiredDescription
invoiceIdString (UUID)YesUnique identifier of the invoice to send the MLR for (UUID format)
responseCodeEnum (MessageLevelResponseType)YesOverall response code for the invoice
errorLinesArray<MLRErrorLine>NoList of error details in the invoice. Can be left empty
errorLines Array Element
Field NameTypeRequiredDescription
descriptionStringNoHuman readable description of the error
errorFieldStringNoUBL/XML field path where the error was detected (XPath-like)
responseCodeEnum (MessageLevelResponseType)NoResponse code specific to this error line
statusReasonCodeEnum (MLRStatusReasonCode)NoClassification code of the error

Allowed Parameter Values


MessageLevelResponseType (responseCode)
ValueDescription
ACCEPTANCEInvoice accepted. It has been processed and approved
ACKNOWLEDGINGInvoice received. Receipt is confirmed but not yet fully processed
REJECTIONInvoice rejected. Not processed due to errors
MLRStatusReasonCode (statusReasonCode)
ValueDescription
BUSINESS_RULE_VIOLATION_FATALFatal business rule violation. A critical error that prevents the invoice from being processed
BUSINESS_RULE_VIOLATION_WARNINGWarning level business rule violation. The invoice can be processed but correction is recommended
SYNTAX_VIOLATIONSyntax error. Format or schema incompatibility in the XML/UBL structure

Responses

200 - Successful Response

FieldTypeValueDescription
HTTP StatusInteger200Operation successful
BodyString"MLR sent successfully"Response text returned from the Access Point service
"MLR sent successfully"

404 - Not Found

Trigger Condition: When no invoice matching the provided invoiceId is found in the database.

{
"errorMessage": "<invoiceId> Invoice not found",
"errorType": "NOT_FOUND_INVOICE",
"errorTitle": "NOT_FOUND",
"errorId": "<correlation-id>",
"status": 404,
"timestamp": "2026-02-12T14:30:00",
"path": "/peppol/send-mlr"
}

Description: The invoiceId parameter contains an invalid or unregistered UUID in the database. Ensure the invoice ID is correct.

400 - Bad Request

Trigger Condition: When an error occurs while forwarding the MLR to the Access Point service (connection error, timeout, Access Point rejection).

{
"errorMessage": "Failed to send MLR: <detailed error message>",
"errorType": "API_ERROR",
"errorTitle": "BAD_REQUEST",
"errorId": "<correlation-id>",
"status": 400,
"timestamp": "2026-02-12T14:30:00",
"path": "/peppol/send-mlr"
}

Description: The MLR was saved to the database but could not be forwarded to the Access Point. The error message contains the detail returned from the Access Point. Check your network connectivity and Access Point service availability.

400 - Bad Request — Invalid responseCode

Trigger Condition: When the responseCode field contains an invalid enum value (i.e., a value other than ACCEPTANCE, ACKNOWLEDGING, REJECTION).

{
"errorMessage": "Unknown response code: <invalid_value>",
"errorType": "API_ERROR",
"errorTitle": "BAD_REQUEST",
"errorId": "<correlation-id>",
"status": 400,
"timestamp": "2026-02-12T14:30:00",
"path": "/peppol/send-mlr"
}

Description: The responseCode field only accepts ACCEPTANCE, ACKNOWLEDGING, or REJECTION values. Verify the value you are sending.

400 - Bad Request — Invalid UUID Format

Trigger Condition: When the invoiceId field is not in a valid UUID format.

{
"errorMessage": "Invalid UUID string: <invalid_value>",
"errorType": "API_ERROR",
"errorTitle": "BAD_REQUEST",
"errorId": "<correlation-id>",
"status": 400,
"timestamp": "2026-02-12T14:30:00",
"path": "/peppol/send-mlr"
}

Description: : The invoiceId value must be a valid UUID in the format xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.

401 - Unauthorized

Trigger Condition: When the R-Auth header is missing, invalid, or contains an expired JWT token.

{
"errorMessage": "Not authorized for this action",
"errorType": "NOT_AUTHORITY",
"errorTitle": "UNAUTHORIZED",
"errorId": "<correlation-id>",
"status": 401,
"timestamp": "2026-02-12T14:30:00",
"path": "/peppol/send-mlr"
}

Description:  The JWT token has expired or is malformed. Obtain a new token and retry.

500 - Internal Server Error

Trigger Condition: When a database error, network error, or unexpected exception occurs.

{
"errorMessage": "An unexpected error occurred",
"errorType": "RUNTIME_ERROR",
"errorTitle": "INTERNAL_SERVER_ERROR",
"errorId": "<correlation-id>",
"status": 500,
"timestamp": "2026-02-12T14:30:00",
"path": "/peppol/send-mlr"
}

Description: An unexpected error occurred on the server side. Forward the errorId (correlation ID) value to the support team for detailed investigation.

Error Response Model (ExceptionResponse)

Field NameTypeDescription
errorMessageStringDetailed description of the error
errorTypeStringError classification code (e.g., NOT_FOUND_INVOICE, API_ERROR)
errorTitleString (HttpStatus)HTTP status name (e.g., NOT_FOUND, BAD_REQUEST)
errorIdStringCorrelation identifier (for log tracing)
statusIntegerHTTP status code (e.g., 400, 404, 500)
dataStringAdditional data (if available)
detailsMap<String, Object>Additional detail information (if available)
validationErrorsArray<ValidationError>Validation error list (if available)
timestampString (ISO 8601)Timestamp of when the error occurred
pathStringEndpoint path of the request