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

Biorhythm (SVG)

POST
/render/biorhythm

Three-curve sine plot of physical (23d), emotional (28d), and intellectual (33d) cycles since birth.

curl -X POST https://api.astroway.info/v1/render/biorhythm \
-H "X-Api-Key: aw_live_..." \
-H "Content-Type: application/json" \
-d '{ "birthDate": "1990-05-15", "rangeStart": "2026-01-01", "rangeEnd": "2026-12-31", "options": { "width": 1000, "height": 400 } }'
object
birthDate
required
string
/^\d{4}-\d{2}-\d{2}$/
rangeStart
required
string
/^\d{4}-\d{2}-\d{2}$/
rangeEnd
required
string
/^\d{4}-\d{2}-\d{2}$/
options
object
size
integer
>= 200 <= 2000
theme
string
Allowed values: light dark console
showAspects
boolean
showRetrograde
boolean
title
string
<= 120 characters
format
string
default: json
Allowed values: svg json
width
integer
>= 400 <= 3000
height
integer
>= 200 <= 1200
Example
{
"birthDate": "1990-05-15",
"rangeStart": "2026-01-01",
"rangeEnd": "2026-12-31",
"options": {
"width": 1000,
"height": 400
}
}

Successful calculation

object
ok
boolean
Example
true
data
object
svg
string
format
string
byteLength
number
Example
{
"ok": true,
"data": {
"svg": "<svg ...>",
"format": "svg",
"byteLength": 60000
}
}

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"
}
}
Корисно?