List Donation Sessions
GET/v1/donation-sessions
List Donation Sessions
Request​
Query Parameters
Possible values: [ASC
, DESC
]
Which way to sort by the given 'sort' field. Default DESC
A cursor that points to where to start the page
How many items per page, for pagination.
25
Responses​
- 200
- 400
- 401
- 403
Successfully lists Donation Sessions
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
data
object[]
donationsession_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
organisation_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Optional URL the donor will be directed to after making a donation.
https://example.com/donation-completed
Id of the User who this donation belongs to, if one exists.
user_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Id of the Account who this donation belongs to, if one exists.
account_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
https://donate.poweredbypercent.com/donation-session
Possible values: [open
, completed
, expired
]
2021-10-13T17:46:54.000Z
2021-10-13T17:46:54.000Z
en-GB
en-GB
Key-value data that you can attach to an object. When a Donation is created from a DonationSession, the DonationSession copies its metadata to the Donation.
{"key1":"value1","key2":"value2"}
GBP
donation_session
33
25
_links
object
https://.../v1/...?cursor=eyJ2Ijox...N3AifQ%3D%3D
https://.../v1/...?cursor=eyJ2Ijox...N3AifQ%3D%3D
https://.../v1/...?cursor=eyJ2Ijox...N3AifQ%3D%3D
{
"data": [
{
"id": "donationsession_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"organisationId": "organisation_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"successUrl": "https://example.com/donation-completed",
"userId": "user_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"accountId": "account_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"url": "https://donate.poweredbypercent.com/donation-session",
"status": "open",
"createdAt": "2021-10-13T17:46:54.000Z",
"expiresAt": "2021-10-13T17:46:54.000Z",
"language": "en-GB",
"metadata": {
"key1": "value1",
"key2": "value2"
},
"currency": "GBP"
}
],
"object": "donation_session",
"totalResults": 33,
"pageSize": 25,
"_links": {
"current": "https://.../v1/...?cursor=eyJ2Ijox...N3AifQ%3D%3D",
"next": "https://.../v1/...?cursor=eyJ2Ijox...N3AifQ%3D%3D",
"prev": "https://.../v1/...?cursor=eyJ2Ijox...N3AifQ%3D%3D"
}
}
Bad request
- application/json
- Schema
- Example (from schema)
- IncorrectParams
- CursorError
- OriginalCallInProgress
- SameKeyDifferentData
- KeyInUse
Schema
error
object
{
"error": {
"code": "string",
"title": "string",
"message": "string",
"reasons": [
"string"
]
}
}
400 Incorrect Parameters
{
"error": {
"code": "bad_request",
"title": "Bad request",
"message": "One or more of the inputs were invalid",
"reasons": [
"pageSize must be greater than or equal to 0"
]
}
}
Error in cursor parameter
{
"error": {
"code": "pagination/cursor_error",
"title": "Bad request",
"message": "Unable to find the next page"
}
}
Idempotency - Original call in progress
{
"error": {
"code": "idempotency/original_call_in_progress",
"title": "Bad request",
"message": "Original call with this idempotency key is still in progress"
}
}
Idempotency - Data has changed from previous request
{
"error": {
"code": "idempotency/same_key_different_data",
"title": "Bad request",
"message": "Data has changed from previous request"
}
}
Idempotency - Key in use
{
"error": {
"code": "idempotency/key_already_in_use",
"title": "Bad request",
"message": "Idempotency Key is already in use"
}
}
Unauthorized
Forbidden (scope)
- application/json
- Schema
- Example (from schema)
Schema
error
object
forbidden
Forbidden
Access is denied due to missing scope permissions
{
"error": {
"code": "forbidden",
"title": "Forbidden",
"message": "Access is denied due to missing scope permissions"
}
}