Exports
XDENT Enterprise uses an asynchronous export processing model. An export is not processed synchronously when the request is sent – instead it is queued and processed in the background. The export result is downloaded after processing is complete.
Status diagram overview
POST /ExportRequest/{type}
│
▼
QUEUED ──── DELETE /Cancel/{id} ──► CANCELLED
│
▼
PROCESSING
│
┌────┴────┐
▼ ▼
COMPLETED FAILED ──► (automatic retry)
│
(after exhausting retries)
│
▼
CANCELLEDStep 1 – Submit the export request
Call the appropriate POST endpoint based on the type of data you want to export.
The API responds with an object containing the export identifier and status QUEUED. The export is queued and will be processed in the background.
Export options
All exports accept the following optional query parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
format | string | no | Output format: JSON, CSV (default: JSON) |
password | string | no | Password for encrypting the output ZIP file |
email | string | no | Email for notification when the export completes |
callback | string | no | Webhook URL – the API will send a POST request with export data (not the result) to this URL when processing is complete |
Output formats
| Format | Description |
|---|---|
JSON | Result as a JSON file |
CSV | Result as a CSV file with tabular data |
Warning
Not every export type supports all formats. See export types overview.
Step 2 – Track processing status
If no post-processing notification is set (email/webhook), you can query the export status:
GET /api/v1/ExportResult/Status/3fa85f64-5717-4562-b3fc-2c963f66afa6
X-Api-Key: YOUR_API_KEYStatus descriptions
| Status | Description |
|---|---|
QUEUED | Export is waiting in the queue, processing has not yet started |
PROCESSING | Export is actively being processed, the file is being generated |
COMPLETED | Processing complete, file is ready for download |
FAILED | Processing failed, the system will automatically retry |
CANCELLED | Export has been permanently cancelled – either manually or after exhausting all retries |
Automatic retry
If processing fails (FAILED), the system automatically tries to regenerate the export. Only after exhausting the maximum number of retries does the export move to CANCELLED status.
To list all waiting exports:
GET /api/v1/ExportResult/Queued
X-Api-Key: YOUR_API_KEYStep 3 – Processing result
After transitioning to COMPLETED or FAILED/CANCELLED, the response also contains a result field:
| Field | Type | Description |
|---|---|---|
result.success | boolean | Whether processing completed successfully |
result.errors | array | List of error messages (if processing failed) |
result.durationMs | int | Processing time in milliseconds |
result.fileSizeBytes | int | Output file size in bytes |
result.callbackSent | boolean | Whether the callback was successfully sent |
result.notifyEmailSent | boolean | Whether the notification email was successfully sent |
Step 4 – Download the result
Once the status is COMPLETED, download the result file:
GET /api/v1/ExportResult/Download/3fa85f64-5717-4562-b3fc-2c963f66afa6
X-Api-Key: YOUR_API_KEYThe response is a zip file. This file may be password-protected if the password query parameter was set for the export. Inside you will find the export file(s) in the default format, or in the format specified by the format query parameter.
Cancelling a queued export
An export that has not yet been picked up for processing (status QUEUED) can be cancelled:
DELETE /api/v1/ExportRequest/Cancel/3fa85f64-5717-4562-b3fc-2c963f66afa6
X-Api-Key: YOUR_API_KEYExports in PROCESSING, COMPLETED or FAILED status cannot be cancelled – returns 404.
Notifications and callback
Email notification
Add the email parameter to the export request. After processing completes (or fails) you will receive a notification at the given address.
POST /api/v1/ExportRequest/Invoices?format=JSON&email=integration@company.comWebhook callback
Add the callback parameter with your application URL. After processing completes, the API sends an HTTP POST to that address with the following data:
| Field | Type | Description |
|---|---|---|
idExportJob | uuid | Job identifier |
exportType | string | Export type code |
success | boolean | Whether processing completed successfully |
status | string | Final status (COMPLETED, FAILED, CANCELLED) |
errorMessages | array | List of errors (if processing failed) |
durationMs | int | Processing time in milliseconds |
fileName | string | Output file name |
fileSizeBytes | int | File size in bytes |
Implementation recommendations
- Use callback or email notification to avoid actively polling the status.