Exports
Exports
Export documents (invoices, estimates, credit notes) to Excel or CSV format.
Supports date range filtering and query filters.
The Export object
Attributes
Export job ID
{
"id": "expjob_clx1234567890",
"status": "processing",
"progress": 50,
"total_docs": 25,
"file_url": null,
"file_name": "acme_documents_2024-06-01_2024-06-30.zip",
"error": null
}Start bulk PDF export
/documents/export/pdfStart a background job to export documents as a ZIP archive of PDFs.
Supports date range filtering (maximum 1 year) or specific document IDs.
When using a user access token, you will receive an email with a download link when the export is ready.
When using an API key, poll the job status endpoint for progress.
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Body parameters
Specific document IDs to export. Types are inferred from ID prefixes.
curl -X POST "https://eu.spaceinvoices.com/documents/export/pdf" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "x-entity-id: YOUR_ENTITY_ID" \
-H "Content-Type: application/json" \
-d '{
"types": [
"invoice"
],
"date_from": "2024-01-01",
"date_to": "2024-12-31"
}'Start bulk e-SLOG export
/documents/export/eslogStart a background job to export valid e-SLOG XML documents as a ZIP archive.
Supports date range filtering (maximum 1 year) or specific document IDs.
Only available for Slovenian entities with e-SLOG support.
Documents without valid e-SLOG validation are skipped.
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Body parameters
Specific document IDs to export as e-SLOG XML. Types are inferred from ID prefixes.
curl -X POST "https://eu.spaceinvoices.com/documents/export/eslog" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "x-entity-id: YOUR_ENTITY_ID" \
-H "Content-Type: application/json" \
-d '{
"types": [
"invoice"
],
"date_from": "2024-01-01",
"date_to": "2024-12-31"
}'Export documents to Excel or CSV
/documents/exportExport filtered documents to Excel (XLSX) or CSV format.
Supports date range filtering (maximum 1 year) and the same query filters as list endpoints.
Returns a downloadable file with all base document fields including flattened customer/issuer data and tax breakdowns.
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Query parameters
Document type to export
Possible values: "invoice", "estimate", "credit_note", "advance_invoice", "delivery_note"
Export format
Possible values: "xlsx", "csv"
Start date filter (ISO 8601 date). Date range cannot exceed 1 year.
End date filter (ISO 8601 date). Date range cannot exceed 1 year.
Language for column headers. Defaults to the entity locale when omitted.
Possible values: "en", "de", "sl", "it", "fr", "es", "pt", "nl", "pl", "hr", "sv", "fi", "et", "bg", "cs", "sk", "nb", "is"
JSON query filter (same as list endpoints)
Full-text search
curl "https://eu.spaceinvoices.com/documents/export" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "x-entity-id: YOUR_ENTITY_ID"Export sales per item for a period
/documents/export/sales-per-itemExport aggregated sales data per item (product/service) for a given date range.
Includes quantities sold/returned, average price, and totals.
Aggregates across invoices, credit notes, and advance invoices.
Items are grouped by catalog item ID when available, or by exact name match.
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Query parameters
Export format
Possible values: "xlsx", "csv"
Start date filter (ISO 8601 date). Required. Date range cannot exceed 1 year.
End date filter (ISO 8601 date). Required. Date range cannot exceed 1 year.
Language for column headers. Defaults to the entity locale when omitted.
Possible values: "en", "de", "sl", "it", "fr", "es", "pt", "nl", "pl", "hr", "sv", "fi", "et", "bg", "cs", "sk", "nb", "is"
curl "https://eu.spaceinvoices.com/documents/export/sales-per-item" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "x-entity-id: YOUR_ENTITY_ID"Get PDF export job status
/documents/export/pdf/{jobId}Check the status and progress of a bulk PDF export job.
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
Export job ID
curl "https://eu.spaceinvoices.com/documents/export/pdf/{jobId}" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "x-entity-id: YOUR_ENTITY_ID"Returns
Export job ID
{
"id": "expjob_clx1234567890",
"status": "processing",
"progress": 50,
"total_docs": 25,
"file_url": null,
"file_name": "acme_documents_2024-06-01_2024-06-30.zip",
"error": null
}Get e-SLOG export job status
/documents/export/eslog/{jobId}Check the status and progress of a bulk e-SLOG export job.
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
Export job ID
curl "https://eu.spaceinvoices.com/documents/export/eslog/{jobId}" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "x-entity-id: YOUR_ENTITY_ID"Returns
Export job ID
{
"id": "expjob_clx1234567890",
"status": "processing",
"progress": 50,
"total_docs": 25,
"file_url": null,
"file_name": "acme_documents_2024-06-01_2024-06-30.zip",
"error": null
}Download completed PDF export archive
/documents/export/pdf/{jobId}/downloadDownload a completed PDF export ZIP archive through the authenticated API.
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
Export job ID
curl "https://eu.spaceinvoices.com/documents/export/pdf/{jobId}/download" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "x-entity-id: YOUR_ENTITY_ID"Download completed e-SLOG export archive
/documents/export/eslog/{jobId}/downloadDownload a completed e-SLOG export ZIP archive through the authenticated API.
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
Export job ID
curl "https://eu.spaceinvoices.com/documents/export/eslog/{jobId}/download" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "x-entity-id: YOUR_ENTITY_ID"