Skip to content

Exports

The Export object

object

Attributes

idstring

Export job ID

Other attributes
statusstring
progressnumber
total_docsnumber
file_urlstring
file_namestring
errorstring
resultobject
Examplejson
{
  "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

POST/documents/export/pdf

Start 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_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Body parameters

document_idsarray of stringsrequired

Specific document IDs to export. Types are inferred from ID prefixes.

Other parameters
localestringoptional
languagestringoptional
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"
  }'
Example:

Start bulk e-SLOG export

POST/documents/export/eslog

Start 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_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Body parameters

document_idsarray of stringsrequired

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"
  }'
Example:

Export documents to Excel or CSV

GET/documents/export

Export 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_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Query parameters

typestringrequired

Document type to export

Possible values: "invoice", "estimate", "credit_note", "advance_invoice", "delivery_note"

formatstringrequired

Export format

Possible values: "xlsx", "csv"

date_fromstringoptional

Start date filter (ISO 8601 date). Date range cannot exceed 1 year.

date_tostringoptional

End date filter (ISO 8601 date). Date range cannot exceed 1 year.

languagestringoptional

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"

querystringoptional

JSON query filter (same as list endpoints)

searchstringoptional

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

GET/documents/export/sales-per-item

Export 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_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Query parameters

formatstringrequired

Export format

Possible values: "xlsx", "csv"

date_fromstringrequired

Start date filter (ISO 8601 date). Required. Date range cannot exceed 1 year.

date_tostringrequired

End date filter (ISO 8601 date). Required. Date range cannot exceed 1 year.

languagestringoptional

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

GET/documents/export/pdf/{jobId}

Check the status and progress of a bulk PDF export job.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

jobIdstringrequired

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

idstring

Export job ID

Other parameters
statusstring
progressnumber
total_docsnumber
file_urlstring
file_namestring
errorstring
resultobject
json
{
  "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

GET/documents/export/eslog/{jobId}

Check the status and progress of a bulk e-SLOG export job.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

jobIdstringrequired

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

idstring

Export job ID

Other parameters
statusstring
progressnumber
total_docsnumber
file_urlstring
file_namestring
errorstring
resultobject
json
{
  "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

GET/documents/export/pdf/{jobId}/download

Download a completed PDF export ZIP archive through the authenticated API.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

jobIdstringrequired

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

GET/documents/export/eslog/{jobId}/download

Download a completed e-SLOG export ZIP archive through the authenticated API.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

jobIdstringrequired

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"