Vastu PDF Report API
A client-ready Vastu report as a PDF: mandala, plot, door and rooms
POST/v1/reports/vastu.pdf
10 credits · Secret key (test or live) · getVastuReport
The plot and mandala always; the ground, door and rooms when you send them. English or Hindi throughout. Nothing is stored.
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.
brandobject requirednamestring requiredPrinted at the top of every page.
at least 1 characters · at most 80 characters
taglinestringat most 120 characters
contactstringPrinted at the foot of every page.
at most 120 characters
colorstringAccent colour, as #rrggbb.
pattern
^#[0-9a-fA-F]{6}$logo_base64stringA PNG or JPEG in base64, up to about 150 KB.
at most 200000 characters
No other fields are accepted.
client_namestringat least 1 characters · at most 80 characters
langstringone of
en,hi· default"en"gridintegerThe mandala: 81 squares (verse 42) or 64 (verse 55).
one of
81,64· default81groundobjectirregular_shapebooleanhigher_sidestringWhich part of the ground stands higher; none when it is level.
one of
none,north,northeast,east,southeast,south,southwest,west,northwestwaterarray of stringWhere water lies.
no repeats
cutsarray of stringCorners cut away.
no repeats
extensionsarray of stringCorners that extend out.
no repeats
road_sidesarray of stringSides with a road.
no repeats
crossroadsbooleanFour roads meet close by.
No other fields are accepted.
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.
roomsarray of objectat least 1 item · at most 60 items
typestring requiredone of
puja,kitchen,utensil_store,treasury,granary,master_bedroom,bedroom,living,dining,study,toilet,staircase,garage,overhead_tank,septic_tankzonestringone of
north,northeast,east,southeast,south,southwest,west,northwest,centerfrom_left_mnumberWith from_front_m and plot, in place of zone.
≥ 0
from_front_mnumber≥ 0
No other fields are accepted.
No other fields are accepted.
Response
application/pdf
Errors: 400, 401, 403, 404, 422, 429, 500. See error codes.
Example request
curl -X POST 'https://api.astrologics.in/v1/reports/vastu.pdf' \
-H 'Authorization: Bearer al_test_YOUR_KEY' \
-H 'Content-Type: application/json' \
-d '{"plot":{"width_m":20,"depth_m":25,"facing_deg":90},"brand":{"name":"Sample Vastu Studio"},"door":{"wall":"front","from_left_m":10,"width_m":1.2},"rooms":[{"type":"kitchen","zone":"southeast"},{"type":"puja","zone":"northeast"}],"lang":"hi"}'
Node.js
const res = await fetch("https://api.astrologics.in/v1/reports/vastu.pdf", {
method: "POST",
headers: { Authorization: "Bearer al_test_YOUR_KEY", "Content-Type": "application/json" },
body: JSON.stringify({
"plot": {
"width_m": 20,
"depth_m": 25,
"facing_deg": 90
},
"brand": {
"name": "Sample Vastu Studio"
},
"door": {
"wall": "front",
"from_left_m": 10,
"width_m": 1.2
},
"rooms": [
{
"type": "kitchen",
"zone": "southeast"
},
{
"type": "puja",
"zone": "northeast"
}
],
"lang": "hi"
}),
});
console.log(await res.text());Python
import json
import urllib.error
import urllib.request
body = {
"plot": {
"width_m": 20,
"depth_m": 25,
"facing_deg": 90,
},
"brand": {
"name": "Sample Vastu Studio",
},
"door": {
"wall": "front",
"from_left_m": 10,
"width_m": 1.2,
},
"rooms": [
{
"type": "kitchen",
"zone": "southeast",
},
{
"type": "puja",
"zone": "northeast",
},
],
"lang": "hi",
}
req = urllib.request.Request(
"https://api.astrologics.in/v1/reports/vastu.pdf",
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/reports/vastu.pdf');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => ['Authorization: Bearer al_test_YOUR_KEY', 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => '{"plot":{"width_m":20,"depth_m":25,"facing_deg":90},"brand":{"name":"Sample Vastu Studio"},"door":{"wall":"front","from_left_m":10,"width_m":1.2},"rooms":[{"type":"kitchen","zone":"southeast"},{"type":"puja","zone":"northeast"}],"lang":"hi"}',
CURLOPT_RETURNTRANSFER => true,
]);
echo curl_exec($ch), PHP_EOL;Example response
Returns a PDF document. Save the response body as a file.
Try it
More in Reports
- Kundli PDF Report API: A client-ready kundli as a PDF, under your name, logo and colour
- Kundli Matching PDF Report API: A client-ready matching report as a PDF: Ashtakoot, Dashakoot and Manglik