Background
OpenG2P is an open-source DPG for social protection. It's used by governments to register people, run benefit programmes and make payments. OpenFn has no OpenG2P adaptor today. The closest is openspp, since OpenSPP started as an OpenG2P fork. Its 4.0.0 rebuild (#1792) has moved to OpenSPP2's REST API, so it's a useful template but not a substitute.
OpenG2P is made of separately deployed modules:
- Registry (Gen 2): a FastAPI service with a Partner API. Writes go through an approval workflow.
- Social Registry (1.3): the older, Odoo-based registry.
- PBMS: programmes, enrolment, cycles and entitlements (Odoo).
- G2P Bridge: disbursements.
- SPAR: maps an ID to a bank or wallet account.
It also implements the G2P Connect standard for registry, disbursement and mapper APIs.
Typical use cases
- Push registrations from ODK, KoBo or CommCare into the Registry.
- Enrol eligible registrants into a PBMS programme.
- Sync payment status back to an M&E or case management system.
- Share registry data with other government systems via G2P Connect.
Requirements
- NOTE; from Claude, authored by Jack. They seem right to me but open to flexibility for v1 if any of these seem too much
- Auth: OAuth2 client credentials via Keycloak, with automatic token refresh.
- A separate base URL in the configuration for each module (Registry, PBMS, Bridge, SPAR).
- A generic
request(method, path, body, options) for any unwrapped endpoint.
- Registry: search, get, create and update registrants. Return the change-request ID on writes.
- Registry: add and remove group (household) members.
- PBMS: list and get programmes, and enrol or unenrol registrants.
- PBMS: read cycles and entitlements.
- G2P Bridge: create a disbursement envelope and batch, and get disbursement status.
- SPAR: resolve an ID to a financial address.
- G2P Connect: registry search and subscribe.
- Consistent paging, with results in
state.data.
- Error messages that pass through OpenG2P's validation errors, without logging credentials or PII.
- Reuse OpenSPP operation names where they fit.
- Unit tests with mocks for every operation, plus JSDoc examples.
API docs
Test environment
OpenG2P has no public sandbox. The options are:
- OpenG2P In a Box, a single-VM dev install (16 vCPU, 64 GB RAM).
- The example bank simulator for disbursement testing.
- Asking the OpenG2P team for a hosted dev namespace - reach to Jack if that is necessary!
Background
OpenG2P is an open-source DPG for social protection. It's used by governments to register people, run benefit programmes and make payments. OpenFn has no OpenG2P adaptor today. The closest is
openspp, since OpenSPP started as an OpenG2P fork. Its 4.0.0 rebuild (#1792) has moved to OpenSPP2's REST API, so it's a useful template but not a substitute.OpenG2P is made of separately deployed modules:
It also implements the G2P Connect standard for registry, disbursement and mapper APIs.
Typical use cases
Requirements
request(method, path, body, options)for any unwrapped endpoint.state.data.API docs
/docs.Test environment
OpenG2P has no public sandbox. The options are: