Skip to content

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)
                              │
                              ▼
                          CANCELLED

Step 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:

ParameterTypeRequiredDescription
formatstringnoOutput format: JSON, CSV (default: JSON)
passwordstringnoPassword for encrypting the output ZIP file
emailstringnoEmail for notification when the export completes
callbackstringnoWebhook URL – the API will send a POST request with export data (not the result) to this URL when processing is complete

Output formats ​

FormatDescription
JSONResult as a JSON file
CSVResult 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:

http
GET /api/v1/ExportResult/Status/3fa85f64-5717-4562-b3fc-2c963f66afa6
X-Api-Key: YOUR_API_KEY

Status descriptions ​

StatusDescription
QUEUEDExport is waiting in the queue, processing has not yet started
PROCESSINGExport is actively being processed, the file is being generated
COMPLETEDProcessing complete, file is ready for download
FAILEDProcessing failed, the system will automatically retry
CANCELLEDExport 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:

http
GET /api/v1/ExportResult/Queued
X-Api-Key: YOUR_API_KEY

Step 3 – Processing result ​

After transitioning to COMPLETED or FAILED/CANCELLED, the response also contains the Result field:

FieldTypeDescription
ResultExportResultProcessing result details

ExportResult ​

FieldTypeDescription
SuccessbooleanWhether processing completed successfully
ErrorsExportError[]List of error messages (if processing failed)
DurationMsintProcessing time in milliseconds
FileSizeBytesintOutput file size in bytes
CallbackSentbooleanWhether the callback was successfully sent
NotifyEmailSentbooleanWhether the notification email was successfully sent

ExportError ​

FieldTypeDescription
ErrorMessagestringError message text

Step 4 – Download the result ​

Once the status is COMPLETED, download the result file:

http
GET /api/v1/ExportResult/Download/3fa85f64-5717-4562-b3fc-2c963f66afa6
X-Api-Key: YOUR_API_KEY

The 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:

http
DELETE /api/v1/ExportRequest/Cancel/3fa85f64-5717-4562-b3fc-2c963f66afa6
X-Api-Key: YOUR_API_KEY

If 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.

http
POST /api/v1/ExportRequest/Invoices?format=JSON&email=integration@company.com

Webhook 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:

FieldTypeDescription
IdExportJobuuidExport identifier
ExportTypestringExport type code
SuccessbooleanWhether processing completed successfully
StatusstringFinal status (COMPLETED, FAILED, CANCELLED)
ErrorMessagesExportError[]List of errors (if processing failed)
DurationMsintProcessing time in milliseconds
FileNamestringOutput file name
FileSizeBytesintFile size in bytes

ExportError ​

FieldTypeDescription
ErrorMessagestringError 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.