API Reference & Data Models
API Endpoints & Request Structure
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.
Application ID (AID) Structure
The Application ID (AID) refers to the unique identifier assigned to track the packet that is being processed for events such as birth or death registration. It can be used by MOSIP or CRVS to track the progress and status of the specific event.
AID Structure (Recommended):
Centre ID (First 5 digits): The first 5 digits of the AID represent the Centre ID.
Machine ID (Next 5 digits): The next 5 digits of the AID represent the Machine ID.
Random Sequence (next N digits): The next N digits can be a randomly generated sequence based on the length that the country wants to use for the AID.
Example of AID:
For the AID 10001100771006920220128223618
The breakdown is as follows:
Centre ID:
10001(First 5 digits)Machine ID:
10077(Next 5 digits)Random Sequence:
1006920220128223618(Remaining 16 digits)
The AID format mentioned above is the recommendation to be followed, but not mandatory. CRVS can generate the AID in any specified format as per their requirement and include it in the Create Packet API Request to ensure proper packet identification and mapping.
Create Packet API (Packet Manager Module)
Create Packet Endpoint: {domain}/commons/v1/packetmanager/createPacket
Method: PUT
API Request Structure:
Note: The API request shared above is only a sample and is not to be used for any implementation. Customize based on country-specific ID schema and requirements.
Field Descriptions
Request Object:
source: Specifies the source of the registration request. This will be the same for any request that comes to MOSIP for birth or death.process: Identifies the specific process for the registration.CRVS_NEW- When initiating an infant birth requestCRVS_DEATH- When initiating a death registration requestCRVS_UPDATE- When initiating a demographic update requestCRVS_fraud_birthorCRVS_deactivate_ID- When submitting a fraud detection/deactivation request (Section 4.6.1 and 4.6.2)CRVS_Fraud_Death- When submitting a death flag reversal request (Section 4.6.3)
id: The unique identifier for the registration request (AID).
Note: As per the current implementation, if the same AID is used twice, the record will be updated with the latest request data.
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.Additional fields can be added based on country requirements and ID schema.
Additional Fields for Rare Scenarios:
These fields must be added to the ID schema to support fraud detection, reactivation, and death reversal workflows:
For Fraud Birth / Deactivation Requests:
fraud_birthorFraud_Birth: Boolean field (Truefor deactivation,Falsefor reactivation)fraud_birth_reasonorDeactivation_reason: String describing the reason for deactivation/reactivationdate_of_initial_registration: Date of the original birth registrationNational_ID: UIN of the individual
For Death Reversal Requests :
Declared_as_Deceased: String field (Y= deceased,N= reversal)Deceased_Declaration_Date: Original date of death declarationReversal_Reason: Description of why reversal is requestedUINorVID: National ID of the individual
Note: Field names may vary based on country-specific ID schema design. Consult Section 4.6 for detailed workflow requirements.
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:
Request/Response Schemas
Data Exchange Format
Field Mapping (CRVS ↔ MOSIP)
Mandatory vs Optional Fields
Data Validation Rules
Learn More
Last updated
Was this helpful?