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
| Property | Value |
|---|---|
| URL | POST /invoice/send-by-file-async |
| Method | POST |
| Auth | R-Auth: <company-jwt> |
| Content-Type | multipart/form-data |
| Base URL | Stage 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
| Parameter | Type | Required | Description |
|---|---|---|---|
compId | UUID | Yes | Company unique identifier the invoice is submitted for. |
direction | string | No | Direction of the invoice: OUTGOING or INCOMING. Defaults to OUTGOING when not provided. |
Request fields
| Field | Type | Required | Description |
|---|---|---|---|
file | file (form-data) | Yes | The 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
| Field | Description |
|---|---|
trackingId | Tracking UUID returned from invoice submission |
status | Initial status — always PENDING on acceptance |
message | Human-readable message confirming the document was queued |
Tracking
Use the trackingId to check delivery status via Document status.