Exports
XDENT Enterprise uses an asynchronous export processing model. The export is not processed synchronously when you send the request. Instead, it is queued and processed in the background. You download the export output only after processing is complete.
Availability
Exports are available only for Business and Enterprise plans.
Date range limitation
For exports filtered by a time period, the general maximum allowed interval is 1 year. Some export types define stricter limits.
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 |
Timestamps in JSON exports
Date and time values in export files without Utc in the field name are XDENT local time.
Fields with Utc in the field name indicate real UTC time and may use UTC notation with a Z suffix.
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 the Result field:
| Field | Type | Description |
|---|---|---|
Result | ExportResult | Processing result details |
ExportResult
| Field | Type | Description |
|---|---|---|
Success | boolean | Whether processing completed successfully |
Errors | ExportError[] | List of error messages (if processing failed) |
DurationMs | int | Processing time in milliseconds |
FileSizeBytes | int | Output file size in bytes |
CallbackSent | boolean | Whether the callback was successfully sent |
NotifyEmailSent | boolean | Whether the notification email was successfully sent |
ExportError
| Field | Type | Description |
|---|---|---|
ErrorMessage | string | Error message text |
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 can be password-protected if the password query parameter was set on the export. Inside this file, you will find export file(s) in the default format or in the format set 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_KEYIf the export does not exist (for example, an incorrect idExportJob), the API returns 404 with code EXPORT_NOT_FOUND.
Exports in PROCESSING, COMPLETED, FAILED, or CANCELLED status cannot be cancelled – the API returns 409 Conflict with code EXPORT_NOT_CANCELLABLE.
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 | Export identifier |
ExportType | string | Export type code |
Success | boolean | Whether processing completed successfully |
Status | string | Final status (COMPLETED, FAILED, CANCELLED) |
ErrorMessages | ExportError[] | List of errors (if processing failed) |
DurationMs | int | Processing time in milliseconds |
FileName | string | Output file name |
FileSizeBytes | int | File size in bytes |
ExportError
| Field | Type | Description |
|---|---|---|
ErrorMessage | string | Error message text |
Implementation recommendations
- Use callback or email notification so you do not need to poll status actively.
- Callback contains processing result metadata, but always download the file via the download endpoint.