API Response Explanation
The API provides a structured response, dynamically including only the data related to the cases you have initiated. If a case is not raised for a particular check, that section will not appear in the response. Below are the key details:1. Dynamic Data Inclusion
- The API response is tailored based on the checks initiated.
- For example, if you have initiated a case for Aadhaar verification, you will receive the Aadhaar section in the response.
- If no case is initiated for Criminal Check, the response will exclude the Criminal Check section.
2. Structure of the Response
The API response consists of the following top-level fields:status: Indicates the overall success or failure of the API request.code: The HTTP status code for the request.message: A descriptive message about the request.data: Contains the details for all initiated checks.
3. Example API Response
Here’s an example of a successful response with mixed statuses across different checks:4. Best Practices for Using the API
-
Initiate Required Cases:
- Ensure you raise a case for the checks you need, as only those will be included in the response.
-
Handle Missing Sections:
- Design your application to handle scenarios where a section might be absent if no case was raised for that check.
-
Monitor Pending Cases:
- Track checks with the status
In Progressand take necessary follow-up actions as needed.
- Track checks with the status
Error Handling in the API Response
The API is designed to report errors in a structured and intuitive way. If any error occurs during the processing of a specific check, the error details will be encapsulated within that particular section. This ensures clarity and prevents errors from affecting unrelated sections of the response.1. Error Format
- Fields:
error: A descriptive message about the issue.status_code: The HTTP status code representing the type of error.
- Errors are included only in the section where they occur, leaving other sections unaffected.
2. Example of an Error in a Section
If an error occurs during Aadhaar verification, the response will include an error block as shown:For more Error Codes, Click
here
3. Mixed Response Example
Here’s how a complete API response might look when an error is present in one section, while others are successful or in progress:4. Key Points About Error Handling
-
Section-Specific Errors:
- Errors are confined to the relevant section. For example, an Aadhaar error will not impact other sections such as PAN or Criminal Check.
-
Consistent Response Structure:
- Sections without errors continue to show valid data or processing statuses.
-
Ease of Debugging:
- Developers can easily identify issues by checking the
errorfield in each section. - The
status_codeprovides additional context for categorizing and resolving errors.
- Developers can easily identify issues by checking the
5. Best Practices for Handling Errors
-
Programmatic Checks:
- Always check for the
errorfield in each section before processing its data. - Use the
status_codeto determine the nature of the error (e.g.,404for missing data,500for server-side errors).
- Always check for the
-
Graceful Degradation:
- Implement logic to handle missing or failed sections gracefully without impacting the overall process.
-
Logging and Notification:
- Log errors for troubleshooting and debugging.
- Notify users or administrators in case of critical issues, such as missing data for mandatory checks.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Unique Id of the BGV Case

