This API provides gemstone suggestions based on different aspects of a person's life. The response includes the name of the gemstone, semi-gemstone, the finger to wear it on, weight in carats, metal to wear it with, day to wear it, and the deity associated with the gemstone.
Params | Data type | Descriptions |
day required month required year required hour required min required lat required lon required tzone required | int int int int int float float float | date of birth, eg: 10 month of birth, eg: 5 year of birth, eg: 1990 hour, eg: 19 minute, eg: 55 latitude, eg: 19.2056 longitude, eg: 25.2056 timezone, eg: 5.5 |
{
"LIFE": {
"name": "Ruby",
"gem_key": "ruby",
"semi_gem": "Red Garnet",
"wear_finger": "Ring",
"weight_caret": "3 - 4.25",
"wear_metal": "Gold",
"wear_day": "Sunday",
"gem_deity": "Sun"
},
"BENEFIC": {
"name": "Yellow Sapphire",
"gem_key": "yellow_sapphire",
"semi_gem": "Topaz",
"wear_finger": "Index",
"weight_caret": "4 - 5.25",
"wear_metal": "Gold",
"wear_day": "Thursday",
"gem_deity": "Jupiter"
},
"LUCKY": {
"name": "Red Coral",
"gem_key": "red_coral",
"semi_gem": "Red Agate",
"wear_finger": "Index",
"weight_caret": "6 - 10.25",
"wear_metal": "Gold",
"wear_day": "Tuesday",
"gem_deity": "Mars"
}
}
var api = 'basic_gem_suggestion';
var userId = '<Your User Id>';
var apiKey = '<Your Api Key>';
var language = '<Your Language>' // By default it is set to en
var data = {
day: 6,
month: 1,
year: 2000,
hour: 7,
min: 45,
lat: 19.132,
lon: 72.342,
tzone: 5.5,
};
var auth = "Basic " + new Buffer(userId + ":" + apiKey).toString("base64");
var request = $.ajax({
url: "https://json.astrologyapi.com/v1/"+api,
method: "POST",
dataType:'json',
headers: {
"authorization": auth,
"Content-Type":'application/json',
"Accept-Language": language
},
data:JSON.stringify(data)
});
request.then( function(resp){
console.log(resp);
}, function(err){
console.log(err);
});