Skip to main content

Fetch UAN API

Objective

The Fetch UAN API retrieves the Universal Account Number (UAN) associated with a user's mobile number, allotted by the Employee Provident Fund Organisation (EPFO).

InputOutput
The user's mobile number and consentThe UAN associated with the user's mobile number

API URL

https://ind.thomas.hyperverge.co/v1/fetchUAN

API Endpoint

fetchUAN

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.

API Request Details

Method - POST

Headers

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)

Inputs

The following table provides the details of the fields required for the API's request body:

ParameterDescriptionMandatory or OptionalAllowed ValuesDefault Value
mobileNumber The 10 digit phone number associated with the EPFO accountMandatoryA valid 10 digit mobile numberNot Applicable
consentThe user's consentMandatory"Y" for yes or "N" for noNot Applicable

Sample Request

The following code shows a standard curl request for the API.

curl --location --request POST 'https://ind.thomas.hyperverge.co/v1/fetchUAN' \
--header 'Content-Type: application/json' \
--header 'appId: <Enter_the_HyperVerge_appId>' \
--header 'appKey: <Enter_the_HyperVerge_appKey>' \
--header 'transactionId: <Enter_the_HyperVerge_transactionID>' \
--data '{
"mobileNumber": "<Mobile_Number>",
"consent": "<Consent>"
}'

Success Response Sample

The following is a sample of a success response from the API.

{
"status": "success",
"statusCode": 200,
"result": {
"message": "UAN fetched from mobile.",
"uanList": [
"<UAN_Number>"
]
},
"metaData": {
"requestId": "<Request_ID>"
}
}

Success Response Details

ParameterTypeDescription
uanListstringThe UAN retrieved against the user's mobile number

Failure Response Sample

The API returns the following response when it fails to find a matching employment record associated with the user's mobile number:


{
"status": "success",
"statusCode": 200,
"result": {
"message": "Provided mobile number doesn't have any UAN."
},
"metaData": {
"requestId": "<Request_ID>"
}
}

Error Response Samples

The following are some sample error responses from the API:

The following is a sample response for an invalid mobile number.

{
"message": "Provide a valid mobile number",
"statusCode": 400,
"status": "failure",
"metaData": {
"requestId": "<Request_ID>"
}
}

Failure and Error Response Details

A failure or error response from the module contains a failure status, with a relavant status code and error message. The following table lists all error responses.

Status CodeError MessageError Description
400Missing required request parametersSome mandatory request parameters are missing in the API request made. Check if "mobileNumber" and "consent" are given in request body
401Missing/Invalid credentialsThe appId/ appKey is missing or incorrect in the request headers
403Access DeniedPlease contact the HyperVerge team
500Internal Server ErrorPlease check the request headers or 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: