Skip to main content
Version: 1.0.1

Send invoice by file (async)


This endpoint allows an invoice document to be submitted directly as a file (for example .xml or .pdf) via multipart/form-data, instead of sending it as a base64-encoded string or a structured JSON object. 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 /invoice/document-status/{trackingId} endpoint.

Endpoint​

PropertyValue
URLPOST /invoice/send-by-file-async
MethodPOST
AuthR-Auth: <company-jwt>
Content-Typemultipart/form-data
Base URLStage Environment https://api-stage.docnova.ai/
Production Environment https://api.docnova.ai/

Example Request​

curl --location '{{baseUrl}}/invoice/send-by-file-async?compId={{companyId}}' \
--header 'accept: */*' \
--header 'R-Auth: {{companyJwt}}' \
--header 'Content-Type: multipart/form-data' \
--form 'file=@"invoice.xml";type=text/xml'

To submit an incoming invoice instead, add the direction query parameter:

curl --location '{{baseUrl}}/invoice/send-by-file-async?compId={{companyId}}&direction=INCOMING' \
--header 'accept: */*' \
--header 'R-Auth: {{companyJwt}}' \
--header 'Content-Type: multipart/form-data' \
--form 'file=@"invoice.xml";type=text/xml'

Query parameters​

ParameterTypeRequiredDescription
compIdUUIDYesCompany unique identifier the invoice is submitted for.
directionstringNoDirection of the invoice: OUTGOING or INCOMING. Defaults to OUTGOING when not provided.

Request fields​

FieldTypeRequiredDescription
filefile (form-data)YesThe invoice document to submit, sent as a multipart/form-data part named file (for example a text/xml or application/pdf file).
Direction

If direction is omitted, the document is processed as an outgoing invoice.

Response​

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

Response fields​

FieldDescription
trackingIdTracking UUID returned from invoice submission
statusInitial status — always PENDING on acceptance
messageHuman-readable message confirming the document was queued
Tracking

Use the trackingId to check delivery status via Document status.