Using the APIs
Riseact exposes GraphQL and REST APIs, with the same token.
GraphQL
Endpoint: POST https://core.riseact.org/admin/graphql/
curl -X POST https://core.riseact.org/admin/graphql/ \
-H "Authorization: Bearer IL_TUO_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"query": "query { supporters(pagination: { first: 10 }) { edges { node { id firstName lastName email } } pageInfo { hasNextPage endCursor total } } }"
}'
See also GraphQL pagination and GraphQL errors.
REST
Base endpoint: https://core.riseact.org/api/v1/
# List supporters
curl https://core.riseact.org/api/v1/supporters/?limit=20&offset=0 \
-H "Authorization: Bearer IL_TUO_TOKEN"
# Single supporter
curl https://core.riseact.org/api/v1/supporters/123/ \
-H "Authorization: Bearer IL_TUO_TOKEN"
# Create a supporter
curl -X POST https://core.riseact.org/api/v1/supporters/ \
-H "Authorization: Bearer IL_TUO_TOKEN" \
-H "Content-Type: application/json" \
-d '{"first_name": "Mario", "last_name": "Rossi", "email": "mario@example.com"}'
See also REST pagination.
Available REST endpoints
| Endpoint | GET (list) | GET (single) | POST | PUT | DELETE |
|---|---|---|---|---|---|
/api/v1/supporters/ | yes | yes | yes | yes | yes |
/api/v1/donations/ | yes | yes | - | - | - |
/api/v1/payments/ | yes | yes | - | - | - |
/api/v1/campaigns/ | yes | yes | - | - | - |
/api/v1/checkouts/ | yes | yes | yes | - | - |
/api/v1/webhooks/ | yes | yes | yes | yes | yes |