| Attribute | Description |
|---|---|
account_id int | Unique identifier for the account to which the export belongs to. |
created_at timestamp | Time at which the export is created. |
failed_reason string | Reason of why the export processing failed, when relevant. |
finished_at timestamp | Time at which the export is ready to download. |
started_at timestamp | Time at which the export processing request started. |
object string | Type of the object being exported (subscriptions, customers, accounting, etc.) |
updated_at timestamp | Time at which the export was last updated. |
| user_id | Unique identifier for the collaborator who requested the export. |
| uuid | Unique identifier for the export file which is created. |
Export Flow
When generating data exports (e.g., payments, invoices, subscriptions) through the Pelcro API, the process follows an asynchronous flow involving three main steps.
1. Request an Export
Use the Request Export API to initiate the export process.
This creates an export job and returns an export_id.
Docs: Request Export
2. Wait for the Webhook Event
After the export job is completed, Pelcro will trigger the event.export.completed webhook.
Check for this event to confirm that the export file is ready for download.
Docs: Event: export.completed
3. Download the Export
Once the webhook is received, use the Download Export API to retrieve the generated file using the export ID.
Docs: Download Export
Summary Flow
| Step | Action | API / Event |
|---|---|---|
| 1 | Initiate export job | POST /core/request-export |
| 2 | Wait for webhook | event.export.completed |
| 3 | Download export file | GET /core/download-export/{id} |
| 4 | (Optional) Inspect available fields | GET /core/export-attributes |
