DaffodilAPI

Conventions

The rules every Platform API route follows, so you can write your client once.

The API is REST over HTTPS. Request and response bodies are JSON, field names are snake_case, and every path starts with the version, /v1.

Amounts

Every amount is an integer number of cents, next to an explicit uppercase ISO 4217 currency. The API never sends or accepts decimal amounts.

{ "amount": 2500, "currency": "USD" }

That is $25.00. Fund balances (balance, available_balance) and webhook payloads follow the same rule. Today every amount is in USD.

IDs

Every object has a prefixed ID, so you can tell a Fund from a Grant in a log line. The prefix never changes once published. Treat the rest of the ID as an opaque, case-sensitive string.

PrefixObject
donor_Donor
fund_Fund
contrib_Contribution
grant_Grant
le_Ledger entry
camp_Campaign
cs_Checkout Session
evt_Event
np_Nonprofit
key_API key
req_Request ID

Your own IDs

Donors and Funds accept an external_id: your own ID for the record, unique within your Account. Use it to look records up by your IDs and to avoid creating the same Donor twice.

Timestamps

Timestamps are ISO 8601 strings in UTC, such as 2026-11-11T21:49:00Z. Their field names end in _at, such as posted_at.

Pagination

Every list returns the same envelope:

{
  "data": [{ "id": "np_1Q6xV4Jd0d2b8vW3kq1t9Z" }],
  "has_more": true,
  "next_cursor": "eyJxIjoiZm9vZCBiYW5rIiwib2Zmc2V0IjoyMH0"
}
  • Lists are newest first, except Ledger entries, which are oldest first by posted_at, and nonprofit search, which is best match first.
  • limit sets the page size, from 1 to 100. The default is 20.
  • When has_more is true, pass next_cursor as the cursor parameter, with the same filters, to get the next page. On the last page next_cursor is null.
  • Cursors are opaque. Do not build or edit them. A cursor used with different filters, or one the API did not issue, gets a 400 with code invalid_cursor.

Cursor pagination is stable: walking every page returns each row once, even while new rows are added, so a nightly reconciliation never skips or repeats one.

Idempotency

Every write (POST and PATCH) requires an Idempotency-Key header. Use a unique value per operation, such as a UUID or your own record's ID plus the action.

Idempotency-Key: 3f1c9a0e-2b7d-4c55-9a8e-6d0b1f2c7e41
  • A retry with the same key and the same body returns the original response, status and body included, without doing the work again. A network timeout never double-pays a nonprofit or double-opens a Fund.
  • The same key with a different body returns 422 with code idempotency_key_reused. That usually means a bug in how you derive keys, so it fails loudly.
  • A write without the header returns 400 with code invalid_request and param set to idempotency-key.
  • Keys are kept for 24 hours, separately for each Account and environment.

Rate limits

Each API key has its own limits, counted per second:

PolicyApplies todfl_live_ keydfl_test_ key
defaultEvery request2510
searchSearch nonprofits, in addition to default105

Responses report where you stand in the IETF RateLimit headers. RateLimit-Policy lists each policy that applies, with its quota q and window w in seconds. RateLimit gives what remains, r, and the seconds until the window resets, t:

RateLimit-Policy: "default";q=10;w=1, "search";q=5;w=1
RateLimit: "default";r=9;t=1, "search";r=4;t=1

Over a limit, the API returns 429 with code rate_limited and a Retry-After header that says how many seconds to wait. A refused request still counts against your limits. Requests rejected with 401 are not counted and carry no RateLimit headers. Treat RateLimit as optional: in rare cases a response carries only RateLimit-Policy.

Request IDs

Every response carries a Request-Id header, such as req_8fZ3kQ1xV4Jd0d2b8vW3kq, and every error body repeats it as request_id. Log it, and quote it when you contact Daffodil about a request.

Errors

Errors are RFC 9457 problem details with content type application/problem+json, extended with a stable code and, when one request parameter is at fault, a param. Branch on code, never on the message. See Errors for the format and every code.

Versioning

The version is in the path: /v1. Within /v1, Daffodil adds to the API without breaking it:

  • We add routes, optional request parameters, response fields, and Event types.
  • The only change we make to an existing field is a new enum value. Write your client to ignore fields it does not know and to handle enum values it has not seen.
  • We never rename or remove a field, an error code, or an ID prefix within /v1.

At the first breaking change, we will introduce a dated Daffodil-Version header, pinned per API key, so existing integrations keep the behavior they were built on. Every change is listed in the changelog.