LPG Verification API
API Description
Objective
The LPG Verification API determines whether a mobile number is linked to the Liquefied Petroleum Gas (LPG) service. If the mobile number is registered, the API returns the corresponding user details; otherwise, it returns a response stating that the number is not associated with any LPG registration.
| Input | Output |
|---|---|
| Mobile number of the user |
|
API URL
https://ind-engine.thomas.hyperverge.co/v1/mobileToLPG
API Endpoint
mobileToLPG
Overview
The 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 API.
| Parameter | Mandatory or Optional | Description | Allowed Values |
|---|---|---|---|
| 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. | This should be a unique value. |
| appKey | Mandatory | The application key shared by HyperVerge. You can find the details in the dashboard's credentials tab. | This should be a unique value. |
| transactionId | Mandatory | A unique identifier for tracking a user journey | 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 parameter required for the API's request body.
| Parameter | Mandatory or Optional | Description | Allowed Values | Default Value |
|---|---|---|---|---|
mobile | Mandatory | The LPG consumer's mobile number | Not Applicable | Not Applicable |
Request
The following code shows a standard curl request for the API.
curl --location --request POST 'https://ind-engine.thomas.hyperverge.co/v1/mobileToLPG' \
--header 'Content-Type: application/json' \
--header 'appId: <Enter_the_HyperVerge_appId>' \
--header 'appKey: <Enter_the_HyperVerge_appKey>' \
--header 'transactionId: <Enter_the_HyperVerge_transactionID>' \
--data '{
"mobile": "<Enter_the_valid_Mobile_Number>"
}'
Success Response
The following code is a success response from the API.
{
"status": "success",
"statusCode": "200",
"result": [
{
"gas_provider": "<Gas_Provider_Name>",
"name": "<Name_of_the_User>",
"consumer_details": {
"consumer_mobile": "<Mobile_Number>",
"consumer_id": "<Consumer_ID>",
"consumer_status": "<Consumer_Status>",
"consumer_type": "<Consumer_Type>"
},
"address": "<Address_Of_The_User>",
"distributor_details": {
"distributor_code": "<Distributor_Code>",
"distributor_name": "<Distributor_Name>",
"distributor_contact": "<Distributor_Contact_Number>",
"distributor_address": "<Distributor_Address>"
}
}
],
"metaData": {
"requestId": "<Request_ID>",
"transactionId": "<Transaction_ID>"
}
}
Success Response Details
| Parameter | Type | Description |
|---|---|---|
| status | string | The status of the request |
| statusCode | integer | The HTTP status code of the request |
| gas_provider | string | The name of the gas provider |
| name | string | The name of the LPG consumer |
| consumer_details | object | The details of the specific consumer |
| consumer_mobile | string | The mobile number of the consumer |
| consumer_id | string | The consumer's unique identifier |
| consumer_status | string | The current status of the consumer (e.g., ACTIVE) |
| consumer_type | string | The type of gas connection (e.g., Single Bottle Connection) |
| address | string | The full address of the consumer |
| distributor_details | object | The details of the gas distributor |
| distributor_code | string | The unique code of the gas distributor |
| distributor_name | string | The name of the gas distributor |
| distributor_contact | string | The contact number of the gas distributor |
| distributor_address | string | The full address of the gas distributor |
| metaData | object | Metadata related to the request, including request and transaction IDs |
| requestId | string | A unique identifier for the request |
| transactionId | string | A unique identifier for the transaction, if available |
Error Responses
The following are the error responses from the API:
- Invalid Mobile Number
- Missing/Invalid Credentials
- Unregistered Mobile Number
- External Source Downtime
{
"status": "failure",
"statusCode": 400,
"message": "Provide a valid 10 digit mobile number",
"metaData": {
"requestId": "<Request_ID>",
"transactionId": "<Transaction_ID>"
}
}
{
"message": "Missing/Invalid credentials",
"statusCode": 401,
"status": "failure"
}
{
"status": "failure",
"statusCode": 404,
"message": "Mobile number is not registered",
"metaData": {
"requestId": "<Request_ID>",
"transactionId": "<Transaction_ID>"
}
}
{
"statusCode": 503,
"status": "failure",
"message":"External source downtime",
"error":"EXTERNAL_DOWNTIME",
"metaData": {
"requestId": "<Request_ID>",
"transactionId": "<Transaction_ID>"
}
}
Error Response Details
An error response from the 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 |
|---|---|---|
| 400 | Provide a valid 10 digit mobile number | This error occurs when an invalid mobile number is provided, or if the mobile number is less than 10 digits or more than 10 digits in length |
| 401 | Missing/Invalid credentials | The request is either missing the mandatory appId and appKey combination or has invalid values |
| 404 | Mobile number is not registered | This error occurs when the mobile number was not registered to LPG |
| 500 | Internal Server Error | Please check the request headers or contact the HyperVerge team for resolution |
| 503 | Server Busy | Please contact the HyperVerge team for resolution |