REST API endpoints for querying cash and in-kind entitlements via OAuth 2.0 authenticated clients. Exposes entitlement data by external identifiers (codes) without revealing database IDs. Supports filtering by beneficiary, program, cycle, state, and validity dates.
- Read Entitlement: Retrieve entitlement by code (UUID-based
identifier) via
GET /Entitlement/{identifier} - Search Entitlements: Query with filters (beneficiary, program,
cycle, state, type, dates) via
GET /Entitlement - Cash and In-Kind: Supports both
spp.entitlement(cash) andspp.entitlement.inkindmodels - Pagination: Returns paginated bundles with next/previous links (max 100 per page)
- Scope-Based Access: Requires
entitlement:readOAuth scope for all operations
| Model | Description |
|---|---|
spp.api.client.scope |
Extended to add entitlement as
resource type |
fastapi.endpoint |
Extended to register entitlement router
for api_v2 app |
After installing:
- Navigate to Settings > Technical > FastAPI Endpoints
- Ensure the
api_v2endpoint is configured - Create API clients via Settings > Technical > API Clients
- Grant
entitlement:readscope to clients needing entitlement access
No UI components. This is a backend API module accessed via HTTP:
- Read:
GET /api/v2/spp/Entitlement/{code} - Search:
GET /api/v2/spp/Entitlement?beneficiary={system|value}&program={name}...
No model access rules defined in this module. Security is enforced via OAuth 2.0 client scopes:
- API clients must have
entitlement:readscope (viaspp.api.client.scoperecords) - Authorization is validated at the router level via
api_client.has_scope("entitlement", "read") - Underlying entitlement model access is governed by
spp_programsmodule security
- Inherit
EntitlementServiceand overrideto_api_schema()to add custom fields to the API response - Extend
EntitlementPydantic schema to expose additional entitlement attributes - Override
_search_cash()or_search_inkind()to customize search domain logic
spp_api_v2, spp_programs
Auto-installs when both spp_api_v2 and spp_programs are present.
Table of contents
- Initial migration to OpenSPP2
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed feedback.
Do not contact contributors directly about support or help with technical issues.
- OpenSPP.org
Current maintainers:
This module is part of the OpenSPP/OpenSPP2 project on GitHub.
You are welcome to contribute.





