Create export

Starts an export of selected documents' line items and returns the export to poll. `document_ids` is required: one to one thousand ids of documents on the loan. Poll until `status` is `succeeded`, at which point the export carries a fresh `download_url` on every read. Send an `Idempotency-Key` so a retry returns the same export instead of a second one.

Authentication

AuthorizationBearer
Bearer token. Use `ss_live_…` for live data or `ss_test_…` for the sandbox (test mode). See [Authentication](https://docs.spreadspace.app/api/authentication).

Headers

Idempotency-KeystringOptional<=255 characters
Idempotency token. Retries that reuse the key within 24h replay the original response. Up to 255 characters; a UUID is typical. See [Idempotency](https://docs.spreadspace.app/api/idempotency).
SpreadSpace-VersionstringOptionalformat: "^\d{4}-\d{2}-\d{2}$"
Pin the API version, e.g. `2026-07-19`. Omit to get the latest. See [Versioning](https://docs.spreadspace.app/api/versioning).

Request

This endpoint expects an object.
borrower_idstring or nullOptional
The borrower whose documents are being exported.
loan_idstring or nullOptional
The loan the documents sit on.
document_idslist of strings or nullOptional

The documents to include. Required: name between 1 and 1000 of them.

formatstring or nullOptional

xlsx (bank statements only) | csv | json. Defaults to xlsx; a request that names any non-bank-statement document with xlsx is rejected with 400.

Response headers

X-Request-IDstringOptional
Correlation ID for this request. Quote it in support tickets.
Idempotency-Replayboolean

Set to true when the response is replayed from the idempotency cache for a request that re-presented an Idempotency-Key it had already used. Absent on the original (winner) response. Replays are byte-for-byte identical to the original response body.

SpreadSpace-VersionstringOptional

The API surface version the server resolved for this request. Always present, regardless of whether the client supplied the request-side SpreadSpace-Version header. Default: 2026-07-19.

RateLimit-Limitinteger
Request budget of the endpoint's rate-limit policy per 60-second sliding window. See [Rate limits](https://docs.spreadspace.app/api/rate-limits).
RateLimit-Remaininginteger

Requests left in the current window. Suppressed on 429 responses produced outside the rate limiter (for example a usage throttle), where a remaining budget would be misleading.

RateLimit-Resetinteger

Seconds until a guaranteed-fresh window.

RateLimit-PolicystringOptional

The active policy in limit;w=window-seconds form.

Response

OK
export_idstring
statusstring
progressobject

How much of the work is finished: completed out of total. Both are zero until the totals are known.

document_countsobject

How the selection turned out: requested is what the caller named, exported is what landed in the bundle, and skipped counts the ids that did not resolve inside the borrower and loan.

skipped_document_idslist of strings
bundleobject or null

The finished file: its name, its size in bytes, and how many line items it carries.

created_atdatetime
expires_atdatetime
borrower_idstring or nullOptional
loan_idstring or nullOptional
formatstring or nullOptional
download_urlstring or nullOptional
download_expires_atdatetime or nullOptional
error_codestring or nullOptional
error_messagestring or nullOptional
started_atdatetime or nullOptional
completed_atdatetime or nullOptional

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
429
Too Many Requests Error
500
Internal Server Error