Navaratna reference table
curl -X GET https://api.astroway.info/v1/vedic/gemstones/navaratna \ -H "X-Api-Key: aw_live_..." \ -H "Content-Type: application/json"const res = await fetch('https://api.astroway.info/v1/vedic/gemstones/navaratna', { method: 'GET', headers: { 'X-Api-Key': process.env.ASTROWAY_API_KEY, 'Content-Type': 'application/json', },});const { ok, data, error } = await res.json();if (!ok) throw new Error(error.message);console.log(data);import os, requests
r = requests.get( 'https://api.astroway.info/v1/vedic/gemstones/navaratna', headers={'X-Api-Key': os.environ['ASTROWAY_API_KEY'], 'Content-Type': 'application/json'},)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->get('vedic/gemstones/navaratna', [ 'headers' => ['X-Api-Key' => getenv('ASTROWAY_API_KEY')],]);$result = json_decode($r->getBody(), true);if (!$result['ok']) throw new \RuntimeException($result['error']['message']);print_r($result['data']);The nine gems and their graha, with substitutes (upa-ratna), weekday, finger and its variants, metals, minimum weight range in ratti with gram and carat conversions, beeja mantra and japa count. Static lookup, no chart needed.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters ”Comma-separated dotted paths, relative to data, to keep in the response. A path is applied to every element of an array, so planets.name means the name of each planet. Paths that match nothing come back in _fields_unmatched; a list where nothing matches at all is a 400, because an empty object would be a confident wrong answer.
Example
planets.name,planets.longitudeRound every non-integer number in the response to this many decimal places. Integers are left alone, because an id is not a measurement. Ecliptic longitudes ship with fourteen decimals by default; 2 is about a tenth of an arcminute.
Example
4Responses
Section titled “ Responses ”Successful calculation
object
object
object
object
object
object
Example
{ "ok": true, "data": { "count": 9, "conversions": { "rattiGrams": 0.1215, "rattiCarats": 0.6075 }, "gems": [ { "graha": 0, "grahaName": "Sun", "grahaSanskrit": "Surya", "gem": "Ruby", "gemSanskrit": "Manikya", "mineral": "Corundum (red)", "substitutes": [ "Red spinel" ], "wearing": { "day": "Sunday", "finger": "Ring finger", "fingerVariants": [ "Ring finger" ], "metals": [ "Gold" ], "minWeight": { "ratti": [ 3 ], "grams": [ 0.364 ], "carats": [ 1.82 ] }, "mantra": "Om Hraam Hreem Hraum Sah Suryaya Namah", "japaCount": 6000 } } ], "sources": "Gem-to-graha mapping: Garuda Purana (ratna-pariksha) and Brihat Samhita ch. 80. Day, finger, metal, weight and mantra are modern practice, not scripture, and manuals disagree: variants and a range are returned rather than one number presented as canon.", "disclaimer": "Traditional Jyotish remedy, informational only. Gem identity, treatment and weight must be confirmed by a qualified gemmologist or jeweller before purchase, and no gemstone is a substitute for medical care: consult a licensed physician for any health concern." }}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" }}