Exports Donations Create
Metodo HTTP: POST
Exports Donations Create
Requests an export of the donations 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 DONATION_EXPORT permission.
Request Body required
- format object
An enumeration.
- fields string[] required
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
fieldsendpoint of the same kind. - filters object
Filters selecting the records, with the same keys as the
filtersof the GraphQLdomaininput of the same kind (SupporterFilters,DonationFilters,PaymentFilters), in camelCase or snake_case. Omitted or empty, the export covers every record. Ignored whenidsorsegment_idis given. - ids integer[]
Explicit selection of records to export, by id. Takes precedence over
filters. - segment_id Segment Id
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. - script Script
Python script run over the finished file before it is published: it reads
/work/input.csvand 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 inerror_message.
200
OK
application/json403
SchemaExample (from schema)422
Schema
- id Id required
Unique identifier of the export.
- kind object
An enumeration.
- format object
An enumeration.
- state object
An enumeration.
- label Label required
Human-readable name of the export, built from its kind and the moment it ran.
- filename Filename
Name of the generated file. Null until it is ready.
- rows_total Rows Total required
Records written to the file.
- file_size File Size required
Size of the file in bytes.
- expires_date date-time
When the file is deleted. The export itself is kept as history.
- download_count Download Count required
How many times the file has been downloaded.
- last_download_date date-time
When the file was last downloaded.
- attempts Attempts required
How many times the generation was attempted, retries included.
- task_id Task Id
Identifier of the background task generating the file.
- filters object required
The filters the export ran with, copied when it was requested. Empty when it ran over everything.
- from_selection From Selection required
Whether the export ran over an explicit selection of records rather than filters.
- staff_name Staff Name
Name of the staff member who requested the export. Null when it was not started by a person.
- segment_name Segment Name
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.
- Array [
- key Key required
Identifier of the column, as written in the file header.
- label Label required
Human-readable name of the column. Falls back to the key when the column no longer exists.
- ]
An enumeration.
error_message Error MessageDetails of the failure. Null when it did not fail.
script ScriptPost-processing script the export ran with. Null when it had none.
download_url Download UrlAddress 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.
update_date date-time requiredWhen 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-19T14:04:06.705Z",
"download_count": 0,
"last_download_date": "2026-11-19T14:04:06.705Z",
"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-19T14:04:06.705Z",
"update_date": "2026-11-19T14:04:06.705Z"
}Forbidden
application/jsonSchemaExample (from schema)Schema
- detail Detail required
Why the request was refused.
{
"detail": "string"
}Unprocessable Entity
application/jsonSchemaExample (from schema)Schema
detail object[] required
The validation errors that prevented the request, the same the GraphQL
userErrorscarry.- Array [
- code Code required
Kind of error:
BAD_INPUT,NOT_FOUND,NOT_UNIQUEorPROTECTED. - field Field
Input field the error is about. Null when it is about the request.
- message Message
Human-readable explanation, in the language of the caller.
- ]
{
"detail": [
{
"code": "string",
"field": "string",
"message": "string"
}
]
}Loading...Fonte: https://dev.riseact.org/docs/rest-references/riseact-app-exports-rest-api-exports-donations-create. Copia automatica da dev.riseact.org: non modificare qui, le modifiche vanno fatte sulla documentazione Docusaurus.