GET /api/Donor/list. It’s a read endpoint with paginated results — a representative case that exercises authentication, pagination, and the standard response envelope.
Anatomy of a request
A successful Raise API request has four pieces:| Piece | Example |
|---|---|
| Method and URL | GET https://prod-api.raisedonors.com/api/Donor/list |
| Authentication header | Authorization: Bearer eyJhbGciOi... |
| Query parameters (for read endpoints) | ?Skip=0&Take=25&SortBy=createdDateTime&Descending=true |
| Body and content type (for write endpoints) | Content-Type: application/json + JSON body |
GET, the body and content type are omitted. For a POST, PUT, or DELETE with a body, all four pieces apply.
A complete request
cURL
URLSearchParams (the safest way to build a query string):
JavaScript
- Query parameters use the casing the API expects. Raise’s list endpoints use PascalCase parameter names (
Skip,Take,SortBy,Descending) — sendingskiportakelowercase will not be recognized. - Boolean parameters are strings on the wire. Query string values are always strings —
Descending=trueis the literal string"true", not a JSON boolean. The API parses it back to a boolean server-side. - The token is in the header, not a query parameter. Never put a Bearer token in a URL — it ends up in server logs, browser histories, and proxy caches. The
Authorizationheader is the only correct place.
Anatomy of a response
A successful response has three parts:| Part | Example |
|---|---|
| Status code | 200 OK |
| Headers | Content-Type: application/json, plus standard HTTP headers |
| Body | The JSON payload |
items/total envelope:
itemsis the array of records for the current page. Its length is at mostTake(or the server’s enforced maximum, whichever is smaller).totalis the count of records that match the query across all pages — not just the current page. Use it to determine when you’ve reached the end of the result set during pagination.
Inspecting the response in code
JavaScript
response.ok is true for any 2xx status. For non-2xx, parse the body as the ProblemDetails error envelope to extract diagnostic information.
Iterating through all results
A single request returns at mostTake records. To process every record matching a query, paginate by advancing Skip until you’ve consumed the full result set:
JavaScript
- The loop condition is
skip < total, notpage.items.length === take. The last page typically returns fewer items thanTake— the boundary check needs to know the full total. totalis captured from the first response. It can shift between pages if records are inserted concurrently; capturing it once gives stable bounds for the loop.- Sort by
idfor stable iteration. Default sort orders may produce inconsistent results if records change during pagination. See Pagination and Filtering for the full discussion.
A POST example: submitting a donation
The walkthrough so far has usedGET. Writes follow the same auth-and-parsing pattern with the addition of a request body and Content-Type header. The most distinctive Raise write is POST /api/Raise/give:
POST /api/Raise/give — including the payment method structure, designation breakdown, and required fields — is in Process a Donation. Do not run this against production data without reading that page first.
Recognizing common failures
Four failure modes are far more common than any others. Recognizing them quickly saves time:| Status | Symptom | Most likely cause |
|---|---|---|
401 Unauthorized | Request rejected immediately, no resource-specific error | The Authorization header is missing, malformed, or the token is invalid/expired/revoked. See Authentication: errors. |
400 Bad Request | Request reached the endpoint but was rejected | Invalid parameter value, malformed JSON body, or schema validation failure. The ProblemDetails response body identifies the specific issue. |
404 Not Found | The endpoint or resource doesn’t exist | Typo in the path (e.g., /api/Donors/list instead of /api/Donor/list), or the specific record ID was deleted or never existed. |
| Network error / TLS error | No HTTP response at all | Wrong hostname, missing TLS support, or firewall blocking outbound traffic to prod-api.raisedonors.com. |
401, don’t retry blindly. The same request will fail the same way until the credential is corrected. See Error Recovery Patterns for the full classification.
What to do next
You now have a working request, a parsed response, and a pagination loop. From here, the docs branch by what you want to build:Error Handling
The full ProblemDetails envelope and status code remediation guide.
Pagination and Filtering
Filter syntax, sort fields, and the iteration patterns for large result sets.
The Raise Data Model
A deeper look at how Donors, Gifts, Forms, and Campaigns relate.
Process a Donation
The end-to-end
POST /api/Raise/give workflow with the full request shape.