curl --request POST \
--url https://fleet-api.flatpeak.com/exports \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "SETTLEMENT_EVIDENCE",
"program_id": "vpr_5c8d1f2a7b3e4d6c9a0f1b2c",
"start_time": "2026-08-01T00:00:00Z",
"end_time": "2026-09-01T00:00:00Z",
"format": "JSON"
}
'
{
"id": "exp_4d8e2f6a0b1c3d5e7f9a1b3c",
"object": "export",
"live_mode": true,
"type": "SETTLEMENT_EVIDENCE",
"program_id": "vpr_5c8d1f2a7b3e4d6c9a0f1b2c",
"group_id": null,
"start_time": "2026-08-01T00:00:00Z",
"end_time": "2026-09-01T00:00:00Z",
"format": "JSON",
"status": "PROCESSING",
"failure_reason": null,
"download_url": null,
"time_expiry": null,
"time_created": "2026-09-02T09:30:00Z",
"account_id": "acc_6a5e504c3b98d0d6739b5f72"
}{
"object": "error",
"type": "invalid_request",
"code": "access_denied",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}{
"object": "error",
"type": "invalid_request",
"code": "access_denied",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}{
"object": "error",
"type": "invalid_request",
"code": "access_denied",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}{
"object": "error",
"type": "invalid_request",
"code": "access_denied",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}{
"object": "error",
"type": "invalid_request",
"code": "access_denied",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}{
"object": "error",
"type": "invalid_request",
"code": "access_denied",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}{
"object": "error",
"type": "invalid_request",
"code": "access_denied",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}{
"object": "error",
"type": "invalid_request",
"code": "access_denied",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}Exports
Create an export
Creates an asynchronous export for a program or group: SETTLEMENT_EVIDENCE or CONSENT_RECORDS, over a window of up to 90 days. export.complete fires when the file is ready, and it can be downloaded for 24 hours. A request with both program_id and group_id, or with neither, returns 422 export_scope_invalid.
POST
/
exports
curl --request POST \
--url https://fleet-api.flatpeak.com/exports \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "SETTLEMENT_EVIDENCE",
"program_id": "vpr_5c8d1f2a7b3e4d6c9a0f1b2c",
"start_time": "2026-08-01T00:00:00Z",
"end_time": "2026-09-01T00:00:00Z",
"format": "JSON"
}
'
{
"id": "exp_4d8e2f6a0b1c3d5e7f9a1b3c",
"object": "export",
"live_mode": true,
"type": "SETTLEMENT_EVIDENCE",
"program_id": "vpr_5c8d1f2a7b3e4d6c9a0f1b2c",
"group_id": null,
"start_time": "2026-08-01T00:00:00Z",
"end_time": "2026-09-01T00:00:00Z",
"format": "JSON",
"status": "PROCESSING",
"failure_reason": null,
"download_url": null,
"time_expiry": null,
"time_created": "2026-09-02T09:30:00Z",
"account_id": "acc_6a5e504c3b98d0d6739b5f72"
}{
"object": "error",
"type": "invalid_request",
"code": "access_denied",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}{
"object": "error",
"type": "invalid_request",
"code": "access_denied",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}{
"object": "error",
"type": "invalid_request",
"code": "access_denied",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}{
"object": "error",
"type": "invalid_request",
"code": "access_denied",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}{
"object": "error",
"type": "invalid_request",
"code": "access_denied",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}{
"object": "error",
"type": "invalid_request",
"code": "access_denied",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}{
"object": "error",
"type": "invalid_request",
"code": "access_denied",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}{
"object": "error",
"type": "invalid_request",
"code": "access_denied",
"message": "The requested resource could not be found.",
"context": "api.price_get",
"live_mode": true,
"time_created": "2026-01-01T00:00:00Z"
}Authorizations
Authenticate with the bearer_token obtained from the authentication endpoint.
Body
application/json
Export create payload. Provide exactly one of program_id or group_id as scope, and a window of up to 90 days.
Response
Export response. A new export is PROCESSING.
An asynchronous export. See type for what each packages. The file can be downloaded for 24 hours after the export completes.
| Value | Meaning |
|---|---|
PROCESSING | The file is being built. export.complete fires when it is ready |
COMPLETE | The file is ready at download_url |
EXPIRED | The file was deleted, 24 hours after the export completed. Create the export again |
FAILED | The file could not be built. See failure_reason |
Available options:
PROCESSING, COMPLETE, EXPIRED, FAILED Example:
"COMPLETE"
Was this page helpful?

