Перейти до вмісту
AstroWay/api v2.73.0 · docs
усі системи в нормі

Generate Report — Unified Dispatcher (V2)

POST
/reports/generate
request.sh
curl -X POST https://api.astroway.info/v1/reports/generate \
-H "X-Api-Key: aw_live_..." \
-H "Content-Type: application/json" \
-d '{ "report_type": "natal", "chart": { "date": "1990-05-15", "time": "14:30:00", "timezoneOffset": 3, "latitude": 50.45, "longitude": 30.52 }, "language": "uk", "whitelabel": { "companyName": "Acme", "themeColor": "#ff5500", "reportName": "My Cosmic Map" } }'

Single endpoint over the 12 type-specific renderers — pass report_type (“natal” | “transit-yearly” | “synastry” | “business” | “career” | “love” | “money” | “child” | “lal-kitab” | “human-design” | “tarot” | “vedic-kundli”) plus the renderer-specific inputs. SDK ergonomics: one method instead of 12. Required fields vary by type — chart for most, chart1+chart2 for synastry, seed for tarot (chart optional).

Media type application/json
object
report_type required
string
Allowed values: natal transit-yearly synastry business career love money child lal-kitab human-design tarot vedic-kundli
chart

Birth data for a single natal chart. Required: date (YYYY-MM-DD), time (HH:mm:ss). Defaults to lat/lon/tz=0 if omitted; pass real values for accurate computation.

object
date required
string
/^\d{4}-\d{2}-\d{2}$/
time required
string
/^\d{2}:\d{2}:\d{2}$/
timezoneOffset
number
0 nullable
latitude
number
0 nullable
longitude
number
0 nullable
houseSystem
string
default: P
name
string
""
city
string
""
zodiacType
string
Allowed values: tropical sidereal
ayanamsaId
number
nullable
cosmogram
boolean
key additional
nullable
chart1

Birth data for a single natal chart. Required: date (YYYY-MM-DD), time (HH:mm:ss). Defaults to lat/lon/tz=0 if omitted; pass real values for accurate computation.

object
date required
string
/^\d{4}-\d{2}-\d{2}$/
time required
string
/^\d{2}:\d{2}:\d{2}$/
timezoneOffset
number
0 nullable
latitude
number
0 nullable
longitude
number
0 nullable
houseSystem
string
default: P
name
string
""
city
string
""
zodiacType
string
Allowed values: tropical sidereal
ayanamsaId
number
nullable
cosmogram
boolean
key additional
nullable
chart2

Birth data for a single natal chart. Required: date (YYYY-MM-DD), time (HH:mm:ss). Defaults to lat/lon/tz=0 if omitted; pass real values for accurate computation.

object
date required
string
/^\d{4}-\d{2}-\d{2}$/
time required
string
/^\d{2}:\d{2}:\d{2}$/
timezoneOffset
number
0 nullable
latitude
number
0 nullable
longitude
number
0 nullable
houseSystem
string
default: P
name
string
""
city
string
""
zodiacType
string
Allowed values: tropical sidereal
ayanamsaId
number
nullable
cosmogram
boolean
key additional
nullable
year
integer
>= 1900 <= 2100
spread
string
<= 64 characters
seed
integer
nullable
name
string
<= 100 characters
allowReversed
boolean
language
string
Allowed values: uk en de ru pl es pt hi fr ko it ja id tr nl ro cs vi ar el hu
whitelabel
Any of:
boolean
Example
{
"report_type": "natal",
"chart": {
"date": "1990-05-15",
"time": "14:30:00",
"timezoneOffset": 3,
"latitude": 50.45,
"longitude": 30.52
},
"language": "uk",
"whitelabel": {
"companyName": "Acme",
"themeColor": "#ff5500",
"reportName": "My Cosmic Map"
}
}

Successful calculation

Media type application/json
object
ok
boolean
data
object
url
string
storage_key
string
byte_length
number
page_count
number
duration_ms
number
expires_at
string
Example
{
"ok": true,
"data": {
"url": "https://api.astroway.info/reports/abc.pdf",
"storage_key": "reports/abc.pdf",
"byte_length": 145000,
"page_count": 1,
"duration_ms": 4100,
"expires_at": "2026-05-16T07:00:00Z"
}
}

Validation error

Media type application/json
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

Media type application/json
Example
{
"ok": false,
"error": {
"code": "INVALID_API_KEY",
"message": "Invalid API key"
}
}
Корисно?