FSSAI Verification API
This document outlines the details of the FSSAI Verification API.
API Description
Objective
The FSSAI Verification API retrieves details about a food business, including the validity of its FSSAI license, the registered name, address, and other related information.
| Input | Output |
|---|---|
| The 14-digit FSSAI license number | The details of the food business associated with the license. The complete list of output fields is available in the Success Response Details section. |
API URL
https://ind.thomas.hyperverge.co/v1/verifyFSSAILicense
API Endpoint
verifyFSSAILicense
Overview
The FSSAI Verification API is RESTful and uses standard HTTP verbs and status codes. The responses are in JSON format, and you should upload all images and files as form-data through a POST request.
Authentication
You need a unique pair of application ID (appId) and application key (appKey) from HyperVerge to verify your identity for accessing the FSSAI Verification API.
API Request Details
Method - POST
Headers
| Header | Mandatory / Optional | Description | Input Format |
|---|---|---|---|
content-type | Mandatory | This parameter defines the media type for the request payload | application/json |
appId | Mandatory | The application identifier shared by HyperVerge. You can find the details in the dashboard's credentials tab. | Not Applicable - this is a unique value |
appKey | Mandatory | The application key shared by HyperVerge. You can find the details in the dashboard's credentials tab. | Not Applicable - this is a unique value |
transactionId | Mandatory | A unique identifier for tracking a user journey | Not Applicable - this should be both unique and easily associated with the user's journey in your application(s) |
Input
The following table provides the details of the parameters required for the FSSAI Verification API's request body:
| Parameter | Mandatory / Optional | Type | Description | Input Format | Default Value |
|---|---|---|---|---|---|
licenseNumber | Mandatory | string | The license number of the food business | A 14-digit numeric value entered as a string | Not Applicable |
consent | Mandatory | string | The consent flag indicating the permission to perform verification | Y or N | Not Applicable |
includeProducts | Mandatory | boolean | The flag to include the list of products associated with the license in the response | true or false | Not Applicable |
Request
The following code snippet demonstrates a standard curl request for the FSSAI Verification API:
curl --location --request POST 'https://ind-engine.thomas.hyperverge.co/v1/verifyFSSAILicense' \
--header 'Content-Type: application/json' \
--header 'appId: <Enter_the_HyperVerge_appId>' \
--header 'appKey: <Enter_the_HyperVerge_appKey>' \
--header 'transactionId: <Enter_the_HyperVerge_transactionID>' \
--data '{
"licenseNumber": "<Enter_the_14_digit_license_number>",
"consent": "<Enter_Y_or_N>",
"includeProducts": "<true_or_false>"
}'
Success Response
The following code snippet demonstrates a success response from the FSSAI Verification API:
{
"status": "success",
"statusCode": 200,
"result": {
"name": "<License_Holder_Name>",
"address": "<Address>",
"taluk": "<Taluk>",
"district": "<District>",
"state": "<State>",
"pincode": "<Pincode>",
"type": "<License_Type>",
"active": true,
"products": [
{
"kind_of_business_id": "<Kind_Of_Business_ID>",
"kind_of_business_name": "<Kind_Of_Business_Name>",
"product_name": "<Product_Name>"
},
{
"kind_of_business_id": "<Kind_Of_Business_ID>",
"kind_of_business_name": "<Kind_Of_Business_Name>",
"product_name": "<Product_Name>"
}
]
},
"metaData": {
"requestId": "<Request_ID>",
"transactionId": "<Transaction_ID>"
}
}
Success Response Details
The following table outlines the details of the success response from the FSSAI Verification API:
| Parameter | Type | Description |
|---|---|---|
| status | string | The status of the FSSAI Verification API response |
| statusCode | integer | The HTTP status code returned by the FSSAI Verification API |
| result | object | The object containing the details of the food business |
| name | string | The name of the FSSAI license holder |
| address | string | The address of the FSSAI license holder |
| taluk | string | The taluk associated with the license holder |
| district | string | The district associated with the license holder |
| state | string | The state in which the license is issued |
| pincode | string | The postal code of the license holder's address |
| type | string | The type of FSSAI license issued |
| active | boolean | Indicates whether the FSSAI license is currently active |
| products | array | A list of products registered under the FSSAI license |
| kind_of_business_id | string | The ID representing the kind of business |
| kind_of_business_name | string | The name describing the kind of business |
| product_name | string | The name of the product registered under the license |
| requestId | string | The unique identifier associated with the API request |
| transactionId | string | The transaction identifier sent in the request |
Failure Response
The following code snippet displays a failure response from the FSSAI Verification API:
{
"status": "failure",
"statusCode": 404,
"error": "FSSAI license number does not exist.",
"metaData": {
"requestId": "<Request_ID>",
"transactionId": "<Transaction_ID>"
}
}
Error Responses
The following are some error responses from the FSSAI Verification API:
- Invalid License Number
- Missing/Invalid Credentials
- Internal Server Error
{
"status": "failure",
"statusCode": 400,
"error": "FSSAI license number invalid.",
"metaData": {
"requestId": "<Request_ID>",
"transactionId": "<Transaction_ID>"
}
}
{
"message": "Missing/Invalid credentials",
"statusCode": 401,
"status": "failure"
}
{
"message": "Internal Server Error",
"statusCode": 500,
"status": "failure"
}
Error Response Details
A failure or error response from the FSSAI Verification API contains a failure status with a relevant status code and error message. The following table lists all error responses:
| Status Code | Error Message | Error Description | Error Resolution |
|---|---|---|---|
| 400 | FSSAI license number invalid. | The provided FSSAI license number is invalid, possibly because it contains special characters or is not 14 digits | Provide a valid 14-digit numeric FSSAI license number in the request |
| 401 | Missing/Invalid credentials | The request is either missing the mandatory appId and appKey combination or has invalid values | Provide valid appId and appKey in the request headers. Check the dashboard's credentials tab |
| 403 | Access Denied | The provided credentials do not have access to this API | Contact the HyperVerge team for resolution |
| 404 | FSSAI license number does not exist | The provided FSSAI license number does not exist in the data source | Verify that the license number is correct and corresponds to a registered food business |
| 500 | Internal Server Error | There is an issue with the service. Kindly contact the HyperVerge Team for support. | Contact the HyperVerge team for investigation and resolution |