Skip to main content

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.

InputOutput
Mobile number of the user
  • If registered with LPG: Consumer details such as name, LPG consumer number, distributor information, and address details
  • If not registered with LPG: A response stating that the mobile number is not associated with any LPG registration

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.

ParameterMandatory or OptionalDescriptionAllowed Values
content-type MandatoryThis parameter defines the media type for the request payloadapplication/json
appId MandatoryThe application identifier shared by HyperVerge. You can find the details in the dashboard's credentials tab.This should be a unique value.
appKey MandatoryThe application key shared by HyperVerge. You can find the details in the dashboard's credentials tab.This should be a unique value.
transactionIdMandatoryA unique identifier for tracking a user journeyThis 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.

ParameterMandatory or OptionalDescriptionAllowed ValuesDefault Value
mobileMandatoryThe LPG consumer's mobile numberNot ApplicableNot 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

ParameterTypeDescription
statusstringThe status of the request
statusCodeintegerThe HTTP status code of the request
gas_providerstringThe name of the gas provider
namestringThe name of the LPG consumer
consumer_detailsobjectThe details of the specific consumer
consumer_mobilestringThe mobile number of the consumer
consumer_idstringThe consumer's unique identifier
consumer_statusstringThe current status of the consumer (e.g., ACTIVE)
consumer_typestringThe type of gas connection (e.g., Single Bottle Connection)
addressstringThe full address of the consumer
distributor_detailsobjectThe details of the gas distributor
distributor_codestringThe unique code of the gas distributor
distributor_namestringThe name of the gas distributor
distributor_contactstringThe contact number of the gas distributor
distributor_addressstringThe full address of the gas distributor
metaDataobjectMetadata related to the request, including request and transaction IDs
requestIdstringA unique identifier for the request
transactionIdstringA unique identifier for the transaction, if available

Error Responses

The following are the error responses from the API:

{
"status": "failure",
"statusCode": 400,
"message": "Provide a valid 10 digit mobile number",
"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 CodeError MessageError Description
400Provide a valid 10 digit mobile numberThis 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
401Missing/Invalid credentialsThe request is either missing the mandatory appId and appKey combination or has invalid values
404Mobile number is not registeredThis error occurs when the mobile number was not registered to LPG
500Internal Server ErrorPlease check the request headers or contact the HyperVerge team for resolution
503Server BusyPlease contact the HyperVerge team for resolution
Was this helpful?
Ask AIBeta
Hi! How can I help?
Ask me anything about HyperVerge products, APIs, and SDKs.
Try asking: