Export draw packages
Accepts up to 1,000 draw ids and generates each draw's package as a PDF in the background. Poll GET /exports/draw-packages/{exportId} until it is completed, then download each file from its row via GET /exports/draw-packages/{exportId}/rows.
A typical nightly pull:
- GET /draws?state=funded&state_changed_since={checkpoint}
- POST /exports/draw-packages with those draws' ids
- Poll the export until completed
- Page through its rows, downloading each file.url
Each package is the one Rabbet would generate for the draw right now: its saved package configuration, or the default one when none is saved.
A package is rendered when the export runs, not retrieved from a stored copy. Its pages reflect the draw, its documents and its project as they stand then, so exporting the same draw again later produces a new file that can differ. Pull each draw once, soon after it is funded, for the package as it stood at funding.
The body is validated whole before anything is stored: a malformed id, a draw named more than once, or more ids than the cap is a 422 and no export is created. Whether each draw exists and is accessible is decided per row, later, and reported on the row rather than here — the export itself always completes.
Packages are generated at a pace Rabbet sets, apart from the packages people generate in the app. Exports run roughly in submission order; a large one takes longer, not more of anyone's capacity.
Idempotency
Send an Idempotency-Key. A retried submission with the same key replays the original 202, export id included, instead of generating every package a second time. Key semantics are those of POST /projects.
Retention
Exports and their rows are kept for 7 days, then deleted.
Request
- Base URL: https://api.rabbet.com/v1
- URL: https://api.rabbet.com/v1/exports/draw-packages
- Auth: OAuth 2 (client credentials, token URL https://api.rabbet.com/oauth/token, scopes: write)
Headers
Client-supplied key making this request idempotent. Reuse the same value (for the same body) to safely retry without creating a second export.
Request body
Example request
{
"draw_ids": [
"b308e77f-6d1d-47c4-bd1f-0069cc548315",
"16fd2706-8baf-433b-82eb-8c7fada847da"
]
}Response
Export accepted and queued (or original response replayed for a reused Idempotency-Key).
Example response
{
"data": {
"id": "01a0f92f-ccaf-7373-b90f-999207ef9c23",
"row_count": 12
}
}Changes
No recorded changes to this operation across all 1 revision of this API.