Vastu Mandala SVG API
The mandala drawn as SVG, north up, in English or Hindi, with the door marked
POST/v1/vastu/mandala.svg
2 credits · Secret key (test or live) · getVastuMandalaSvg
Request body
plotobject requiredwidth_mnumber requiredAlong the front, in metres.
> 0 · ≤ 100000
depth_mnumber requiredFrom the front to the back, in metres.
> 0 · ≤ 100000
facing_degnumber requiredThe compass bearing a person looks along when facing out through the front: 0 north, 90 east.
≥ 0 · ≤ 360
No other fields are accepted.
gridintegerThe mandala: 81 squares (verse 42) or 64 (verse 55).
one of
81,64· default81langstringone of
en,hi· default"en"themestringone of
light,dark· default"light"doorobjectwallstring requiredLeft and right as seen from outside, looking at the front.
one of
front,left,back,rightfrom_left_mnumber requiredThe door's centre, from the left end of that wall as seen from outside it.
≥ 0
width_mnumber> 0 · ≤ 100
No other fields are accepted.
No other fields are accepted.
Response
image/svg+xml
Errors: 400, 401, 403, 404, 422, 429, 500. See error codes.
Example request
curl -X POST 'https://api.astrologics.in/v1/vastu/mandala.svg' \
-H 'Authorization: Bearer al_test_YOUR_KEY' \
-H 'Content-Type: application/json' \
-d '{"plot":{"width_m":18,"depth_m":27,"facing_deg":90},"door":{"wall":"front","from_left_m":10}}'
Node.js
const res = await fetch("https://api.astrologics.in/v1/vastu/mandala.svg", {
method: "POST",
headers: { Authorization: "Bearer al_test_YOUR_KEY", "Content-Type": "application/json" },
body: JSON.stringify({
"plot": {
"width_m": 18,
"depth_m": 27,
"facing_deg": 90
},
"door": {
"wall": "front",
"from_left_m": 10
}
}),
});
console.log(await res.text());Python
import json
import urllib.error
import urllib.request
body = {
"plot": {
"width_m": 18,
"depth_m": 27,
"facing_deg": 90,
},
"door": {
"wall": "front",
"from_left_m": 10,
},
}
req = urllib.request.Request(
"https://api.astrologics.in/v1/vastu/mandala.svg",
method="POST",
headers={"Authorization": "Bearer al_test_YOUR_KEY", "Content-Type": "application/json"},
data=json.dumps(body).encode(),
)
try:
with urllib.request.urlopen(req) as res:
print(res.read().decode())
except urllib.error.HTTPError as err:
print(err.code, err.read().decode())PHP
<?php
$ch = curl_init('https://api.astrologics.in/v1/vastu/mandala.svg');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => ['Authorization: Bearer al_test_YOUR_KEY', 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => '{"plot":{"width_m":18,"depth_m":27,"facing_deg":90},"door":{"wall":"front","from_left_m":10}}',
CURLOPT_RETURNTRANSFER => true,
]);
echo curl_exec($ch), PHP_EOL;Example response
Try it
More in Vastu
- Vastu Pada and Devata Reference API: The 32 padas with their door effects and verses, the 45 devatas, the room rules and the score's weights
- Vastu Purusha Mandala API: The Vastu Purusha Mandala over a real plot: every square in metres, the brahmasthan, the vamsa lines and the atimarma points
- Vastu Entrance (Door Pada) API: Which of the 32 padas a door falls on, the text's effect and verse, and the better stretches of wall
- Vastu Ayadi Calculation API: The Ayadi formulas on a building's measures: every working shown, the yoni judged, and nearby measures that pass
- Vastu Plot Analysis API: Findings on a plot: proportion, shape, slope, water, cut corners, extensions and roads, each classical or convention
- Vastu Room Analysis API: A verdict for each room by zone, what to prefer, and a score with published weights