Extends OpenSPP API V2 with REST endpoints for program cycles. Exposes cycle data including state, period, beneficiary statistics, and navigation between cycles. Uses cycle name as the external identifier and requires OAuth 2.0 authentication with resource-based scopes.
- Read Cycle: Retrieve cycle details by name via
GET /Cycle/{identifier} - Search Cycles: Filter cycles by program, state, start/end dates, or last updated timestamp
- Pagination: Support for offset-based pagination with configurable page size (max 100)
- Statistics: Expose beneficiary count, entitlement count, payment count, and total amounts
- Cycle Navigation: Reference to previous and next cycles in sequence
- OAuth Scopes: Extend API client scopes with
cycleresource type for read operations
| Model | Description |
|---|---|
spp.api.client.scope |
Extended to support cycle resource type |
fastapi.endpoint |
Extended to register Cycle router in API V2 app |
This module automatically extends the API V2 endpoint when installed. To grant access to cycles:
- Navigate to Settings > API Clients (provided by
spp_api_v2) - Create or edit an API client
- Grant
cycleread scope to clients that need cycle access
No additional menu items are added by this module.
No standalone menu. API endpoints are available at:
/api/v2/spp/Cycle- Search cycles/api/v2/spp/Cycle/{identifier}- Read cycle by name
Access controlled via OAuth 2.0 client credentials flow. Clients must
have cycle read scope granted. All cycle operations use sudo()
internally, so access control is enforced at the API client scope level,
not Odoo user groups.
The module does not define Odoo model access rules as it only extends existing models.
- Override
CycleService.to_api_schema()to add custom fields to the API response - Inherit
Cycleschema to add domain-specific attributes in theextensionfield - Add search filters by extending
CycleService.search()to support additional query parameters
spp_api_v2, spp_programs
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.





