API Reference & Data Models
Overview
Once all the prerequisites are in place, the next step is to initiate a request (birth/death/update) by calling the create packet API of MOSIP's packet manager module, followed by the trigger API to process the packet.
Packet processing
The packet processing workflow consists of three key components that work together to process registration requests:
Application ID (AID) Structure: Each registration request requires a unique Application ID to track and identify the packet throughout its lifecycle.
Create Packet API (Packet Manager Module): This API endpoint initiates the packet creation process by accepting registration data and storing it in the system.
Trigger API (Registration Processor Module): After packet creation, this API activates the processing workflow to validate and verify the registration information.
Create Packet API (Packet Manager Module)
Create Packet Endpoint: {domain}/commons/v1/packetmanager/createPacket
Method: PUT
API Request Structure:
{
"id": "string",
"version": "string",
"requesttime": "2025-02-25T11:14:17.667Z",
"request": {
"source": "CRVS",
"process": "CRVS_NEW",
"id": "10001100771006920220128223618",
"ref_id": "10001_10077",
"schema_version": "0.1",
"fields": {
"fullName": "John Doe",
"dateOfBirth": "2025-01-01",
"gender": "Male",
"addressLine1": "123 Main Street",
"addressLine2": "Apt 4B",
"city": "Capital City",
"state": "State Name",
"postalCode": "12345",
"email": "john.doe@example.com",
"phone": "+1234567890",
"zone": "Zone1",
"region": "Region1",
"province": "Province1"
},
"metaInfo": {
"centerId": "10001",
"machineId": "10077",
"operationsData": {
"officerId": "officer123",
"officerPassword": "password",
"supervisorId": "supervisor456"
},
"registration_type": "CRVS_NEW"
},
"audit": {
"uuid": "unique-uuid-1234",
"createdBy": "CRVS_OPERATOR",
"createdDateTime": "2025-02-25T11:14:17.667Z",
"updatedBy": "CRVS_OPERATOR",
"updatedDateTime": "2025-02-25T11:14:17.667Z"
},
"schemaJson": "{\"$schema\":\"http://json-schema.org/draft-07/schema#\"}"
}
}Field Descriptions
Request Object:
source: Specifies the source of the registration request. This will be the same for any request that comes to MOSIP from CRVS.process: Identifies the registration process being initiated. This value determines which CRVS–MOSIP integration workflow the packet will follow during processing. Refer to the table below for the valid process values to be used for each supported workflow.
CRVS_NEW
Used when submitting a new birth registration request for an infant to create a MOSIP ID.
CRVS_DEATH
Used when submitting a death registration request to mark a MOSIP ID as deceased.
CRVS_UPDATE
Used when submitting a demographic update request for an infant’s MOSIP ID (e.g., name, date of birth, gender).
CRVS_DEACTIVATE_ID
Used when submitting a request to deactivate an infant’s MOSIP ID due to an incorrect or invalid birth registration.
CRVS_DECEASED_STATUS_REVERSAL
Used when submitting a request to reverse the deceased status of a MOSIP ID if CRVS determines the individual was incorrectly marked as deceased.
id: The unique identifier for the registration request (AID).
ref_id: Combination of centre ID and machine ID.Ex - "centerid_machineid"
schema_version: The version of the ID schema that the country is using in production.
Field Object:
fullName: The full name of the individual.dateOfBirth: The date of birth of the individual.gender: Gender of the individual.addressLine1: First line of the address.addressLine2: Second line of the address.city: City of residence.state: State of residence.postalCode: Postal code of the address.email: Email address.phone: Contact phone number.zone: Geographic zone.region: Region of the address.province: Province of residence.
MetaInfo Object (Center and Operator Information):
centerId: Unique identifier for the centre where the registration is processed.machineId: Unique identifier for the machine used for registration.operationsData: Contains fields such as officer ID, officer password, supervisor ID, etc.registration_type: This is the value same as the process field for birth (CRVS_NEW) or death (CRVS_DEATH).
centerId, machineId, officerId must be provided along with any additional relevant operational information for the request to be processed.
Audit Object:
uuid: Unique uuid to be sent with any request coming from CRVS.Please add the values for the other fields in the audit object as per the details of the machine and the person who is registering the request from the CRVS.
It is required that at least one attribute in the audit object is populated with valid data before making the request.
schemaJson: JSON schema (in stringified format) used by the country
Sample Response:
Trigger API (Registration Processor Module)
In MOSIP, after a packet is created, it is processed for validations and verification of the information in the Registration Processor. Inside the Registration Processor, each packet follows a specific workflow defined by the Camel route.
For the integration with CRVS, the newly created packet is uploaded to the Object Store. To pick up this new packet and trigger the processing, we have developed a new API. This API ensures to trigger the appropriate workflow is triggered for further processing of the registration packet. For this integration, the camel route workflow to be executed is determined by the values provided for the source and process.
API Documentation: Create workflow instance for packet processing | Registration processor
Trigger Endpoint: {domain}/registrationprocessor/v1/registration-processor/workflow/trigger
Method: POST
API Request Structure:
Sample Response:
Learn More
Operational Considerations - Prerequisites, system setup, and configuration steps for CRVS integration
Registration Processor Overview - Detailed information about packet processing workflows and camel routes
Packet Manager - Comprehensive guide to packet creation, structure, and management
ID Schema - Understanding and customizing the identity schema for your deployment
Policy Configuration & Customization - Configurable policies and workflow customization options
Last updated
Was this helpful?