Gemstone (ratna) recommendation
curl -X POST https://api.astroway.info/v1/vedic/gemstones \ -H "X-Api-Key: aw_live_..." \ -H "Content-Type: application/json" \ -d '{ "date": "1990-05-15", "time": "14:30:00", "timezoneOffset": 3, "latitude": 50.45, "longitude": 30.52, "school": "lagna-lord" }'const res = await fetch('https://api.astroway.info/v1/vedic/gemstones', { method: 'POST', headers: { 'X-Api-Key': process.env.ASTROWAY_API_KEY, 'Content-Type': 'application/json', }, body: JSON.stringify({ "date": "1990-05-15", "time": "14:30:00", "timezoneOffset": 3, "latitude": 50.45, "longitude": 30.52, "school": "lagna-lord" }),});const { ok, data, error } = await res.json();if (!ok) throw new Error(error.message);console.log(data);import os, requests
r = requests.post( 'https://api.astroway.info/v1/vedic/gemstones', headers={'X-Api-Key': os.environ['ASTROWAY_API_KEY'], 'Content-Type': 'application/json'}, json={ 'date': "1990-05-15", 'time': "14:30:00", 'timezoneOffset': 3, 'latitude': 50.45, 'longitude': 30.52, 'school': "lagna-lord" },)result = r.json()if not result['ok']: raise RuntimeError(result['error']['message'])print(result['data'])<?phpuse GuzzleHttp\Client;
$client = new Client(['base_uri' => 'https://api.astroway.info/v1/']);$r = $client->post('vedic/gemstones', [ 'headers' => ['X-Api-Key' => getenv('ASTROWAY_API_KEY')], 'json' => [ 'date' => '1990-05-15', 'time' => '14:30:00', 'timezoneOffset' => 3, 'latitude' => 50.45, 'longitude' => 30.52, 'school' => 'lagna-lord', ],]);$result = json_decode($r->getBody(), true);if (!$result['ok']) throw new \RuntimeException($result['error']['message']);print_r($result['data']);Which of the nine gems to wear, from the sidereal lagna. Two schools are implemented: lagna-lord (default) prescribes the gems of the 1st, 9th and 5th lords as the life, lucky and benefic stones; functional-benefic classifies every graha by the houses it owns from the lagna, prescribes only for functional benefics led by the yogakaraka, and names the functional malefics as gems to avoid. Both reach the same three gems, because a functional benefic is a graha owning a trikona and the trikona lords are the 1st, 5th and 9th: the school changes the ordering, the role each gem carries, and the avoid list. The response always reports which one produced it. Coordinates are required, since the whole answer is derived from the lagna. Each gem carries its substitutes, day, finger, metal, weight range in ratti/grams/carats, and beeja mantra. Planet dignity is returned as context and does not change the list.
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ”Birth data for a gemstone recommendation. Required: date (YYYY-MM-DD), time (HH:mm:ss), latitude and longitude. Coordinates do NOT default to 0 here as they do on other chart endpoints: the whole answer is derived from the lagna, so an omitted pair is a 400 rather than a confident set of gems for 0N 0E.
object
Birth latitude. Required: the lagna is what both schools prescribe from.
Birth longitude. Required: the lagna is what both schools prescribe from.
Prescription school. Both reach the same three gems (the trikona lords), and differ on what they withhold and on the ordering. The response always names the one used. Default: lagna-lord.
Example
{ "date": "1990-05-15", "time": "14:30:00", "timezoneOffset": 3, "latitude": 50.45, "longitude": 30.52, "school": "lagna-lord"}Responses
Section titled “ Responses ”Successful calculation
object
object
object
object
object
object
object
object
Example
{ "ok": true}Validation error
Example
{ "ok": false, "error": { "code": "INVALID_INPUT", "message": "Validation failed: date: Date must be YYYY-MM-DD", "details": [ { "path": "date", "message": "Date must be YYYY-MM-DD" } ] }}Missing or invalid API key
Example
{ "ok": false, "error": { "code": "INVALID_API_KEY", "message": "Invalid API key" }}