Lookup.Api
is a Node library which provides the RESTApi wrapper over Lookup.Services.
To setup and run Lookup.Api
in your local machine, follow 3 simple steps:
git clone https://github.com/ValEXE-Technologies/Lookup.Api.git
npm i
npm run start
This should start nodemon
secure server on Port# 5001
and you should see message on console
Lookup RESTApi listening at https://localhost:5001
The status API to check whether application is up and running and is in healthy state to serve the requests.
/api/status
curl https://localhost:5001/api/status
{
"status": "Successful",
"message": "Lookup RESTApi is up and running",
"data": null
}
/api/referenceData/currencies
curl https://localhost:5001/api/referenceData/currencies
Returns JSON object with value of data
property as collection of supported currencies.
{
"status": "Successful",
"message": null,
"data": [
{
"code": "INR",
"symbol": "₹",
"name": "Indian Rupee"
},
{
"code": "USD",
"symbol": "$",
"name": "United States of America"
}
]
}
:currency
must be value of currencycode
from Supported Currencies; likeINR
,USD
, etc.
/api/domain/:currency/registrars
curl https://localhost:5001/api/domain/INR/registrars
Returns JSON object with value of data
property as collection of registrars.
{
"status": "Successful",
"message": null,
"data": [
{
"name": "GoDaddy",
"baseUrl": "https://in.godaddy.com",
"currencyCodes": [ "INR", "USD" ],
"features": [ "Basic DNS" ]
},
{
"name": "BigRock",
"baseUrl": "https://www.bigrock.in",
"currencyCodes": [ "INR", "USD" ],
"features": [
"Basic DNS",
"2 Email Accounts",
"Domain Forwarding",
"URL Masking",
"DNS Management",
"Domain Theft Protection"
]
}
]
}
:domainNameWithTLD
must be complete domain name including TLD; like.com
,.co.in
, etc.
/api/domain/isAvailable/:domainNameWithTLD
curl https://localhost:5001/api/domain/isAvailable/whatblarandomdomainxyz.com
Returns JSON object with value of data
property as true
if domain is available and false
if domain is not available.
{
"status": "Successful",
"message": null,
"data": true or false
}
:currency
must be value of currencycode
from Supported Currencies; likeINR
,USD
, etc.
:registrar
must be value of registrarname
from Registrars; likeGoDaddy
,BigRock
, etc.
:domainNameWithTLD
must be complete domain name including TLD; like.com
,.co.in
, etc.
/api/domain/:currency/:registrar/:domainNameWithTLD/price
curl https://localhost:5001/api/domain/INR/BigRock/whatblarandomdomainxyz.com/price
Returns JSON object with value of data
property with domain price and registrar url.
{
"status": "Successful",
"message": null,
"data": {
"url": "https://www.bigrock.in",
"price": 799
}
}