Donors API
Generated from the Celerp 2.10.0 OpenAPI schema, .
GET /donors
List every donor with gifts in a period, largest total first.
Every donor with gifts in the period (all time without one), largest total first.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
from | query | -- | string, optional | First day of the period, as YYYY-MM-DD. |
to | query | -- | string, optional | Last day of the period, as YYYY-MM-DD. |
Responses
| Status | Description | Body |
|---|---|---|
200 | Successful Response | object |
422 | Validation Error | HTTPValidationError |
Example
curl -X GET http://localhost:8000/donors \
-H "Authorization: Bearer $TOKEN"GET /donors/statements/preview
Show who a donor statement send for a period would reach, with each donor's total.
Who a send for the period reaches, each with their total and gifts and the number the next Send again of their statement under the current wording names (0 while it was never sent) and how the email of its last send reads now (``state``: sending, sent, failed or unconfirmed); a donor with no email address is marked and would be skipped. An open end runs from the first entry or to today, and ``period`` names the dates the send and each statement then cover.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
from | query | -- | string, optional | First day of the period, as YYYY-MM-DD. |
to | query | -- | string, optional | Last day of the period, as YYYY-MM-DD. |
Responses
| Status | Description | Body |
|---|---|---|
200 | Successful Response | object |
422 | Validation Error | HTTPValidationError |
Example
curl -X GET http://localhost:8000/donors/statements/preview \
-H "Authorization: Bearer $TOKEN"POST /donors/statements/send
Email donor statements for a period to every donor with gifts in it.
Email the period's statements; refused without explicit confirmation. A sent email cannot be recalled from the donor's mailbox, so the send is recorded and a corrected statement goes out under new wording or by an explicit resend.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
from | string | yes | From |
to | string | yes | To |
confirm | boolean | yes | Confirm |
resend | object | -- | Resend |
Responses
| Status | Description | Body |
|---|---|---|
200 | Successful Response | object |
422 | Validation Error | HTTPValidationError |
Example
curl -X POST http://localhost:8000/donors/statements/send \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{ ... }'GET /donors/statements/wording
Read the wording printed on donor statements.
Responses
| Status | Description | Body |
|---|---|---|
200 | Successful Response | object |
Example
curl -X GET http://localhost:8000/donors/statements/wording \
-H "Authorization: Bearer $TOKEN"PUT /donors/statements/wording
Change the wording printed on donor statements.
Set the statement wording ("{name}" is the donor's name); each change is a new version, so statements already sent under the old wording can be sent again corrected.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
text | string | yes | Text |
Responses
| Status | Description | Body |
|---|---|---|
200 | Successful Response | object |
422 | Validation Error | HTTPValidationError |
Example
curl -X PUT http://localhost:8000/donors/statements/wording \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{ ... }'GET /donors/{contact_id}/history
Show one donor's gifts in a period and their total.
One donor's gifts in the period and their total.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
contact_id | path | yes | string | Identifier of the customer, supplier, or other CRM contact. |
from | query | -- | string, optional | First day of the period, as YYYY-MM-DD. |
to | query | -- | string, optional | Last day of the period, as YYYY-MM-DD. |
Responses
| Status | Description | Body |
|---|---|---|
200 | Successful Response | object |
422 | Validation Error | HTTPValidationError |
Example
curl -X GET http://localhost:8000/donors/:contact_id/history \
-H "Authorization: Bearer $TOKEN"GET /donors/{contact_id}/statement.pdf
Download one donor's statement for a period as a PDF file.
One donor's statement for the period as a PDF, through the document PDF renderer; an open end runs from the first entry or to today, as on the preview.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
contact_id | path | yes | string | Identifier of the customer, supplier, or other CRM contact. |
from | query | -- | string, optional | First day of the period, as YYYY-MM-DD. |
to | query | -- | string, optional | Last day of the period, as YYYY-MM-DD. |
Responses
| Status | Description | Body |
|---|---|---|
200 | Successful Response | -- |
422 | Validation Error | HTTPValidationError |
Example
curl -X GET http://localhost:8000/donors/:contact_id/statement.pdf \
-H "Authorization: Bearer $TOKEN"