Exports Payments Create
Requests an export of the payments matching the given filters, selection or segment, with the chosen
columns, and returns it straight away in PENDING state. The file is generated in background: poll the export
until it is COMPLETED, then download it. Requires the PAYMENT_EXPORT permission.
Request Body required
An enumeration.
Keys of the columns to export, in the order they should appear. The record identifier is always added, whether or not it is listed. Read the available keys from the fields endpoint of the same kind.
Filters selecting the records, with the same keys as the filters of the GraphQL domain input of the same kind (SupporterFilters, DonationFilters, PaymentFilters), in camelCase or snake_case. Omitted or empty, the export covers every record. Ignored when ids or segment_id is given.
Explicit selection of records to export, by id. Takes precedence over filters.
Saved segment to export. Its filters are copied into the export when it is requested, so editing the segment later does not change what this export means. Takes precedence over filters.
Python script run over the finished file before it is published: it reads /work/input.csv and writes /work/output.csv, with the standard library only, no network, 128 MB of memory and 20 minutes at most. CSV exports only. When it fails the export fails, with its error in error_message.
- 200
- 403
- 422
OK
Schema
- Array [
- ]
Unique identifier of the export.
An enumeration.
An enumeration.
An enumeration.
Human-readable name of the export, built from its kind and the moment it ran.
Name of the generated file. Null until it is ready.
Records written to the file.
Size of the file in bytes.
When the file is deleted. The export itself is kept as history.
How many times the file has been downloaded.
When the file was last downloaded.
How many times the generation was attempted, retries included.
Identifier of the background task generating the file.
The filters the export ran with, copied when it was requested. Empty when it ran over everything.
Whether the export ran over an explicit selection of records rather than filters.
Name of the staff member who requested the export. Null when it was not started by a person.
Name of the saved segment the export ran over. Null when it ran over ad-hoc filters.
fields object[] required
The columns the export was asked to produce, in the order they appear in the file.
Identifier of the column, as written in the file header.
Human-readable name of the column. Falls back to the key when the column no longer exists.
An enumeration.
Details of the failure. Null when it did not fail.
Post-processing script the export ran with. Null when it had none.
Address the file is served from with an Authorization: Bearer header. Null when the file is not ready or no longer available. Only administrators of the organization can download it.
When the export was requested.
When the export was last modified.
{
"id": 0,
"kind": "SUPPORTERS",
"format": "XLSX",
"state": "PENDING",
"label": "string",
"filename": "string",
"rows_total": 0,
"file_size": 0,
"expires_date": "2026-11-20T20:19:36.578Z",
"download_count": 0,
"last_download_date": "2026-11-20T20:19:36.578Z",
"attempts": 0,
"task_id": "string",
"filters": {},
"from_selection": true,
"staff_name": "string",
"segment_name": "string",
"fields": [
{
"key": "string",
"label": "string"
}
],
"error_code": "FIELDS_INVALID",
"error_message": "string",
"script": "string",
"download_url": "string",
"create_date": "2026-11-20T20:19:36.579Z",
"update_date": "2026-11-20T20:19:36.579Z"
}
Forbidden
Schema
Why the request was refused.
{
"detail": "string"
}
Unprocessable Entity
Schema
- Array [
- ]
detail object[] required
The validation errors that prevented the request, the same the GraphQL userErrors carry.
Kind of error: BAD_INPUT, NOT_FOUND, NOT_UNIQUE or PROTECTED.
Input field the error is about. Null when it is about the request.
Human-readable explanation, in the language of the caller.
{
"detail": [
{
"code": "string",
"field": "string",
"message": "string"
}
]
}