LogoLogo
1.1
1.1
  • ๐Ÿ Overview
  • ๐ŸขArchitecture
  • ๐Ÿ“‹Registration
    • Registration Interfaces
      • ODK Collect App
      • Self Service Portal
      • API Interface
      • Manual Entry
      • Bulk Export From CSV
    • ID Verification
    • Registry
  • ๐Ÿ…ฟ๏ธProgram Management
    • Eligibility Assessment
    • Proxy Means Test
    • Enrolment
    • Deduplication
    • Program Cycles
    • Entitlement
    • Notifications
  • ๐Ÿ’ตPayments
    • Payment Modes
    • Payment Manager
    • Payment Batches
    • ID Account Mapper
    • Payment Rails
    • Reimbursements
      • Service Provider Portal
  • ๐Ÿ”Privacy & Security
  • ๐Ÿ“ŠMonitoring and Reporting
  • ๐Ÿ”งSystem Administration
    • Developer Mode
    • Role-Based Access Control
    • Internationalization (i18n)
    • Document Store
    • Apps
  • โ›“๏ธWorkflows
    • Cash grant scenario
    • Immediate Individual Assistance On-Demand
    • Service Provider Reimbursement
  • ๐Ÿ”—Integrations
    • M-PESA Integration
    • Mojaloop Integration
    • MOSIP Integration
      • ODK MTS Connector
      • Registry MTS Connector
      • Integration with e-Signet
  • ๐Ÿ“ฆReleases
    • 1.1.0
      • Release Notes
  • โ†”๏ธREST API
  • โš’๏ธTesting
  • ๐Ÿ‘ฅCommunity
    • Contributing
    • Code of Conduct
  • ๐Ÿ“—License
  • Guides
    • ๐Ÿ“”How-To Guides
      • Install WireGuard Client on Desktop/Laptop
      • Install WireGuard Client on Android Device
      • Create User and Assign Role
      • Create a Custom Group
      • Create Program
      • Create Self-Service Portal Form
      • Map Self-Service Portal Form
      • Self Register Online
      • Integrate with MOSIP e-Signet
      • Create ODK Form
      • Provide Form Access to Field Agent
      • Download Form on ODK Collect
      • Register Offline
      • Create MTS Connector
        • Create ODK MTS Connector
        • Create OpenG2P Registry MTS Connector
      • Create Eligibility Manager Types
        • Create Default Eligibility Manager
        • Create ID Document Eligibility Manager
        • Create Phone Number Eligibility Manager
      • Create Eligibility Manager under Program
      • Configure Proxy Means Test
      • Enrol Registrants into Program
      • Configure ID Types
      • Create Deduplication Manager under Program
      • Create Deduplication Manager Types
        • Create ID Deduplication Manager
        • Create Phone Number Deduplication
      • Deduplicate Registrants
      • Create Notification Manager Types
        • Create SMS Notification Manager
        • Create Email Notification Manager
        • Create Fast2SMS Notification Manager
      • Create Notification Manager under Program
      • Send Notifications to Individual Registrants
      • Configure Program Manager under Program
      • Create and Approve Program Cycle
      • Multi-Stage Approval
      • Create Entitlement Voucher Template
      • Create Entitlement Manager Type
        • Create Default Entitlement Manager
        • Create Voucher Entitlement Manager
      • Configure Entitlement Manager under Program
      • Create Payment Manager Types
        • Create Payment Hub EE Payment Manager
        • Create Payment Interoperability Layer Payment Manager
        • Create Default Payment Manager
        • Create Cash Payment Manager
        • Create File Payment Manager
      • Configure Payment Manager in Program
      • Prepare and Send Payment
      • Install SmartScanner App
      • Submit Reimbursement Using the Service Provider Portal
      • Reimburse the service provider
    • ๐Ÿ“™Documentation Guides
      • Creating Diagrams
      • OpenG2P Module Doc Template
      • Writing Guidelines For How-To Guides
    • ๐Ÿ‘ฉโ€๐Ÿ’ปDeveloper Zone
      • Getting Started
      • Installing OpenG2P On Linux
      • Technology Stack
      • Modules
        • G2P Entitlement In-kind
        • G2P SelfServicePortal
        • OpenG2P Program Payment: G2P Connect Payment Manager
        • G2P Notifications: Wiserv SMS Service Provider
        • G2P Registry: Rest API
        • G2P Formio
        • G2P Registry: Base
        • G2P Registry: Individual
        • G2P: Proxy Means Test
    • ๐Ÿ“˜Deployment Guide
      • Deployment on Kubernetes
        • K8s Cluster Requirements
        • K8s Cluster Setup
        • Rancher Server Setup
        • NFS Server Setup
        • SSL Certificates using Letsencrypt
      • Post Install Configuration
      • Access to Deployed Setup
      • Packaging OpenG2P Docker
Powered by GitBook
LogoLogo

Copyright ยฉ OpenG2P. This work is licensed under Creative Common Attribution (CC-BY-4.0) International license unless otherwise noted.

On this page

REST API

PreviousRelease NotesNextTesting

Last updated 1 year ago

User authentication

Individual Registration

Group Registration

โ†”๏ธ
post
Responses
400
One of the given parameter is not valid
401
The user is not authorized. Authentication is required
403
You don't have the permission to access the requested resource.
404
Requested resource not found
post
POST /session/auth/login HTTP/1.1
Host: mec.openg2p.net
Accept: */*

No content

post
Authorizations
Responses
400
One of the given parameter is not valid
401
The user is not authorized. Authentication is required
403
You don't have the permission to access the requested resource.
404
Requested resource not found
post
POST /session/auth/logout HTTP/1.1
Host: mec.openg2p.net
Accept: */*

No content

Search for partners :param partner_search_param: An instance of partner.search.param :return: List of partner.info

get
Authorizations
Query parameters
idintegerOptional
namestringOptional
Responses
200Success
application/json
400
One of the given parameter is not valid
401
The user is not authorized. Authentication is required
403
You don't have the permission to access the requested resource.
404
Requested resource not found
get
GET /api/v1/registry/individual/ HTTP/1.1
Host: mec.openg2p.net
Accept: */*
[
  {
    "id": 1,
    "name": "text",
    "reg_ids": [
      {
        "id": 1,
        "id_type_as_str": "text",
        "value": "text",
        "expiry_date": "2025-05-24"
      }
    ],
    "is_group": false,
    "registration_date": "2025-05-24",
    "phone_number_ids": [
      {
        "id": 1,
        "phone_no": "text",
        "phone_sanitized": "text",
        "date_collected": "2025-05-24",
        "disabled": "2025-05-24"
      }
    ],
    "email": "text",
    "address": "text",
    "additional_g2p_info": "",
    "program_membership_ids": [
      {
        "program_id": 1,
        "state": "text",
        "enrollment_date": "2025-05-24",
        "exit_date": "2025-05-24"
      }
    ],
    "notification_preference": "none",
    "given_name": "text",
    "addl_name": "text",
    "family_name": "text",
    "gender": "text",
    "birthdate": "2025-05-24",
    "age": "text",
    "birth_place": "text"
  }
]

Get partner's information

get
Authorizations
Path parameters
idinteger ยท int32Required
Responses
200Success
application/json
400
One of the given parameter is not valid
401
The user is not authorized. Authentication is required
403
You don't have the permission to access the requested resource.
404
Requested resource not found
get
GET /api/v1/registry/individual/{id} HTTP/1.1
Host: mec.openg2p.net
Accept: */*
{
  "id": 1,
  "name": "text",
  "reg_ids": [
    {
      "id": 1,
      "id_type_as_str": "text",
      "value": "text",
      "expiry_date": "2025-05-24"
    }
  ],
  "is_group": false,
  "registration_date": "2025-05-24",
  "phone_number_ids": [
    {
      "id": 1,
      "phone_no": "text",
      "phone_sanitized": "text",
      "date_collected": "2025-05-24",
      "disabled": "2025-05-24"
    }
  ],
  "email": "text",
  "address": "text",
  "additional_g2p_info": "",
  "program_membership_ids": [
    {
      "program_id": 1,
      "state": "text",
      "enrollment_date": "2025-05-24",
      "exit_date": "2025-05-24"
    }
  ],
  "notification_preference": "none",
  "given_name": "text",
  "addl_name": "text",
  "family_name": "text",
  "gender": "text",
  "birthdate": "2025-05-24",
  "age": "text",
  "birth_place": "text"
}

Search for partners :param partner_search_param: An instance of partner.search.param :return: List of partner.info

get
Authorizations
Query parameters
idintegerOptional
namestringOptional
Responses
200Success
application/json
400
One of the given parameter is not valid
401
The user is not authorized. Authentication is required
403
You don't have the permission to access the requested resource.
404
Requested resource not found
get
GET /api/v1/registry/individual/search HTTP/1.1
Host: mec.openg2p.net
Accept: */*
[
  {
    "id": 1,
    "name": "text",
    "reg_ids": [
      {
        "id": 1,
        "id_type_as_str": "text",
        "value": "text",
        "expiry_date": "2025-05-24"
      }
    ],
    "is_group": false,
    "registration_date": "2025-05-24",
    "phone_number_ids": [
      {
        "id": 1,
        "phone_no": "text",
        "phone_sanitized": "text",
        "date_collected": "2025-05-24",
        "disabled": "2025-05-24"
      }
    ],
    "email": "text",
    "address": "text",
    "additional_g2p_info": "",
    "program_membership_ids": [
      {
        "program_id": 1,
        "state": "text",
        "enrollment_date": "2025-05-24",
        "exit_date": "2025-05-24"
      }
    ],
    "notification_preference": "none",
    "given_name": "text",
    "addl_name": "text",
    "family_name": "text",
    "gender": "text",
    "birthdate": "2025-05-24",
    "age": "text",
    "birth_place": "text"
  }
]

Create a new Individual :param individual_info: An instance of the individual info :return: An instance of partner info

post
Authorizations
Body
namestringRequired
registration_datestring ยท dateOptional
is_groupbooleanOptionalDefault: false
emailstringOptional
addressstringOptional
additional_g2p_infoany ofOptional
object[]Optional
or
objectOptional
notification_preferencestringOptionalDefault: none
given_namestringOptional
addl_namestringOptional
family_namestringOptional
genderstringOptional
birthdatestring ยท dateOptional
birth_placestringOptional
Responses
200Success
application/json
400
One of the given parameter is not valid
401
The user is not authorized. Authentication is required
403
You don't have the permission to access the requested resource.
404
Requested resource not found
post
POST /api/v1/registry/individual/ HTTP/1.1
Host: mec.openg2p.net
Content-Type: application/json
Accept: */*
Content-Length: 487

{
  "name": "text",
  "ids": [
    {
      "id_type": "text",
      "value": "text",
      "expiry_date": "2025-05-24"
    }
  ],
  "registration_date": "2025-05-24",
  "is_group": false,
  "phone_numbers": [
    {
      "phone_no": "text",
      "date_collected": "2025-05-24"
    }
  ],
  "email": "text",
  "address": "text",
  "additional_g2p_info": [
    {}
  ],
  "program_memberships": [
    {
      "name": "text",
      "enrollment_date": "2025-05-24"
    }
  ],
  "notification_preference": "none",
  "given_name": "text",
  "addl_name": "text",
  "family_name": "text",
  "gender": "text",
  "birthdate": "2025-05-24",
  "birth_place": "text"
}
{
  "id": 1,
  "name": "text",
  "reg_ids": [
    {
      "id": 1,
      "id_type_as_str": "text",
      "value": "text",
      "expiry_date": "2025-05-24"
    }
  ],
  "is_group": false,
  "registration_date": "2025-05-24",
  "phone_number_ids": [
    {
      "id": 1,
      "phone_no": "text",
      "phone_sanitized": "text",
      "date_collected": "2025-05-24",
      "disabled": "2025-05-24"
    }
  ],
  "email": "text",
  "address": "text",
  "additional_g2p_info": "",
  "program_membership_ids": [
    {
      "program_id": 1,
      "state": "text",
      "enrollment_date": "2025-05-24",
      "exit_date": "2025-05-24"
    }
  ],
  "notification_preference": "none",
  "given_name": "text",
  "addl_name": "text",
  "family_name": "text",
  "gender": "text",
  "birthdate": "2025-05-24",
  "age": "text",
  "birth_place": "text"
}

Update Individual Identification :param reg_id: An instance of the partner.reg_id :return: An instance of partner.reg_id

patch
Authorizations
Body
id_typestringOptional
valuestringOptional
expiry_datestring ยท dateOptional
partner_idintegerRequired
Responses
200Success
application/json
400
One of the given parameter is not valid
401
The user is not authorized. Authentication is required
403
You don't have the permission to access the requested resource.
404
Requested resource not found
patch
PATCH /api/v1/registry/individual/updateIdentification HTTP/1.1
Host: mec.openg2p.net
Content-Type: application/json
Accept: */*
Content-Length: 75

{
  "id_type": "text",
  "value": "text",
  "expiry_date": "2025-05-24",
  "partner_id": 1
}
{
  "id": 1,
  "id_type_as_str": "text",
  "value": "text",
  "expiry_date": "2025-05-24",
  "partner_id": 1
}

Search for partners :param partner_search_param: An instance of partner.search.param :return: List of partner.short.info

get
Authorizations
Query parameters
idintegerOptional
include_members_fullbooleanOptional
namestringOptional
Responses
200Success
application/json
400
One of the given parameter is not valid
401
The user is not authorized. Authentication is required
403
You don't have the permission to access the requested resource.
404
Requested resource not found
get
GET /api/v1/registry/group/ HTTP/1.1
Host: mec.openg2p.net
Accept: */*
[
  {
    "id": 1,
    "name": "text",
    "reg_ids": [
      {
        "id": 1,
        "id_type_as_str": "text",
        "value": "text",
        "expiry_date": "2025-05-24"
      }
    ],
    "is_group": true,
    "registration_date": "2025-05-24",
    "phone_number_ids": [
      {
        "id": 1,
        "phone_no": "text",
        "phone_sanitized": "text",
        "date_collected": "2025-05-24",
        "disabled": "2025-05-24"
      }
    ],
    "email": "text",
    "address": "text",
    "additional_g2p_info": "",
    "program_membership_ids": [
      {
        "program_id": 1,
        "state": "text",
        "enrollment_date": "2025-05-24",
        "exit_date": "2025-05-24"
      }
    ],
    "notification_preference": "none"
  }
]

Get partner's information

get
Authorizations
Path parameters
idinteger ยท int32Required
Responses
200Success
application/json
400
One of the given parameter is not valid
401
The user is not authorized. Authentication is required
403
You don't have the permission to access the requested resource.
404
Requested resource not found
get
GET /api/v1/registry/group/{id} HTTP/1.1
Host: mec.openg2p.net
Accept: */*
{
  "id": 1,
  "name": "text",
  "reg_ids": [
    {
      "id": 1,
      "id_type_as_str": "text",
      "value": "text",
      "expiry_date": "2025-05-24"
    }
  ],
  "is_group": true,
  "registration_date": "2025-05-24",
  "phone_number_ids": [
    {
      "id": 1,
      "phone_no": "text",
      "phone_sanitized": "text",
      "date_collected": "2025-05-24",
      "disabled": "2025-05-24"
    }
  ],
  "email": "text",
  "address": "text",
  "additional_g2p_info": "",
  "program_membership_ids": [
    {
      "program_id": 1,
      "state": "text",
      "enrollment_date": "2025-05-24",
      "exit_date": "2025-05-24"
    }
  ],
  "notification_preference": "none",
  "group_membership_ids": [
    {
      "id": 1,
      "individual": {
        "id": 1,
        "name": "text",
        "reg_ids": [
          {
            "id": 1,
            "id_type_as_str": "text",
            "value": "text",
            "expiry_date": "2025-05-24"
          }
        ],
        "is_group": false,
        "registration_date": "2025-05-24",
        "phone_number_ids": [
          {
            "id": 1,
            "phone_no": "text",
            "phone_sanitized": "text",
            "date_collected": "2025-05-24",
            "disabled": "2025-05-24"
          }
        ],
        "email": "text",
        "address": "text",
        "additional_g2p_info": "",
        "program_membership_ids": [
          {
            "program_id": 1,
            "state": "text",
            "enrollment_date": "2025-05-24",
            "exit_date": "2025-05-24"
          }
        ],
        "notification_preference": "none",
        "given_name": "text",
        "addl_name": "text",
        "family_name": "text",
        "gender": "text",
        "birthdate": "2025-05-24",
        "age": "text",
        "birth_place": "text"
      },
      "kind": [
        {
          "name": "text"
        }
      ]
    }
  ],
  "kind_as_str": "text",
  "is_partial_group": true
}

Search for partners :param partner_search_param: An instance of partner.search.param :return: List of partner.short.info

get
Authorizations
Query parameters
idintegerOptional
include_members_fullbooleanOptional
namestringOptional
Responses
200Success
application/json
400
One of the given parameter is not valid
401
The user is not authorized. Authentication is required
403
You don't have the permission to access the requested resource.
404
Requested resource not found
get
GET /api/v1/registry/group/search HTTP/1.1
Host: mec.openg2p.net
Accept: */*
[
  {
    "id": 1,
    "name": "text",
    "reg_ids": [
      {
        "id": 1,
        "id_type_as_str": "text",
        "value": "text",
        "expiry_date": "2025-05-24"
      }
    ],
    "is_group": true,
    "registration_date": "2025-05-24",
    "phone_number_ids": [
      {
        "id": 1,
        "phone_no": "text",
        "phone_sanitized": "text",
        "date_collected": "2025-05-24",
        "disabled": "2025-05-24"
      }
    ],
    "email": "text",
    "address": "text",
    "additional_g2p_info": "",
    "program_membership_ids": [
      {
        "program_id": 1,
        "state": "text",
        "enrollment_date": "2025-05-24",
        "exit_date": "2025-05-24"
      }
    ],
    "notification_preference": "none"
  }
]
  • User authentication
  • POST/login
  • POST/logout
  • Individual Registration
  • GET Search for partners :param partner_search_param: An instance of partner.search.param :return: List of partner.info
  • POST Create a new Individual :param individual_info: An instance of the individual info :return: An instance of partner info
  • GET Get partner's information
  • GET Search for partners :param partner_search_param: An instance of partner.search.param :return: List of partner.info
  • PATCH Update Individual Identification :param reg_id: An instance of the partner.reg_id :return: An instance of partner.reg_id
  • Group Registration
  • GET Search for partners :param partner_search_param: An instance of partner.search.param :return: List of partner.short.info
  • POST Create a new Group :param group_info: An instance of the group info :return: An instance of partner.info
  • GET Get partner's information
  • GET Search for partners :param partner_search_param: An instance of partner.search.param :return: List of partner.short.info

Create a new Group :param group_info: An instance of the group info :return: An instance of partner.info

post
Authorizations
Body
namestringRequired
registration_datestring ยท dateOptional
is_groupbooleanOptionalDefault: true
emailstringOptional
addressstringOptional
additional_g2p_infoany ofOptional
object[]Optional
or
objectOptional
notification_preferencestringOptionalDefault: none
kindstringOptional
is_partial_groupbooleanOptional
Responses
200Success
application/json
400
One of the given parameter is not valid
401
The user is not authorized. Authentication is required
403
You don't have the permission to access the requested resource.
404
Requested resource not found
post
POST /api/v1/registry/group/ HTTP/1.1
Host: mec.openg2p.net
Content-Type: application/json
Accept: */*
Content-Length: 927

{
  "name": "text",
  "ids": [
    {
      "id_type": "text",
      "value": "text",
      "expiry_date": "2025-05-24"
    }
  ],
  "registration_date": "2025-05-24",
  "is_group": true,
  "phone_numbers": [
    {
      "phone_no": "text",
      "date_collected": "2025-05-24"
    }
  ],
  "email": "text",
  "address": "text",
  "additional_g2p_info": [
    {}
  ],
  "program_memberships": [
    {
      "name": "text",
      "enrollment_date": "2025-05-24"
    }
  ],
  "notification_preference": "none",
  "members": [
    {
      "name": "text",
      "given_name": "text",
      "addl_name": "text",
      "family_name": "text",
      "ids": [
        {
          "id_type": "text",
          "value": "text",
          "expiry_date": "2025-05-24"
        }
      ],
      "registration_date": "2025-05-24",
      "phone_numbers": [
        {
          "phone_no": "text",
          "date_collected": "2025-05-24"
        }
      ],
      "email": "text",
      "address": "text",
      "gender": "text",
      "birthdate": "2025-05-24",
      "birth_place": "text",
      "kind": [
        {
          "name": "text"
        }
      ],
      "is_group": false,
      "additional_g2p_info": [
        {}
      ],
      "program_memberships": [
        {
          "name": "text",
          "enrollment_date": "2025-05-24"
        }
      ],
      "notification_preference": "none"
    }
  ],
  "kind": "text",
  "is_partial_group": true
}
{
  "id": 1,
  "name": "text",
  "reg_ids": [
    {
      "id": 1,
      "id_type_as_str": "text",
      "value": "text",
      "expiry_date": "2025-05-24"
    }
  ],
  "is_group": true,
  "registration_date": "2025-05-24",
  "phone_number_ids": [
    {
      "id": 1,
      "phone_no": "text",
      "phone_sanitized": "text",
      "date_collected": "2025-05-24",
      "disabled": "2025-05-24"
    }
  ],
  "email": "text",
  "address": "text",
  "additional_g2p_info": "",
  "program_membership_ids": [
    {
      "program_id": 1,
      "state": "text",
      "enrollment_date": "2025-05-24",
      "exit_date": "2025-05-24"
    }
  ],
  "notification_preference": "none",
  "group_membership_ids": [
    {
      "id": 1,
      "individual": {
        "id": 1,
        "name": "text",
        "reg_ids": [
          {
            "id": 1,
            "id_type_as_str": "text",
            "value": "text",
            "expiry_date": "2025-05-24"
          }
        ],
        "is_group": false,
        "registration_date": "2025-05-24",
        "phone_number_ids": [
          {
            "id": 1,
            "phone_no": "text",
            "phone_sanitized": "text",
            "date_collected": "2025-05-24",
            "disabled": "2025-05-24"
          }
        ],
        "email": "text",
        "address": "text",
        "additional_g2p_info": "",
        "program_membership_ids": [
          {
            "program_id": 1,
            "state": "text",
            "enrollment_date": "2025-05-24",
            "exit_date": "2025-05-24"
          }
        ],
        "notification_preference": "none",
        "given_name": "text",
        "addl_name": "text",
        "family_name": "text",
        "gender": "text",
        "birthdate": "2025-05-24",
        "age": "text",
        "birth_place": "text"
      },
      "kind": [
        {
          "name": "text"
        }
      ]
    }
  ],
  "kind_as_str": "text",
  "is_partial_group": true
}