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

Planetary Hours

POST
/planetary-hours
request.sh
curl -X POST https://api.astroway.info/v1/planetary-hours \
-H "X-Api-Key: aw_live_..." \
-H "Content-Type: application/json" \
-d '{ "date": "2024-06-21", "latitude": 50.45, "longitude": 30.52, "timezoneOffset": 3 }'

Calculate Chaldean planetary hours for a given date and location, starting from sunrise.

Media type application/json
object
date required
string
/^\d{4}-\d{2}-\d{2}$/
latitude required
number
nullable
longitude required
number
nullable
timezoneOffset
number
0 nullable
Example
{
"date": "2024-06-21",
"latitude": 50.45,
"longitude": 30.52,
"timezoneOffset": 3
}

Successful calculation

Media type application/json
object
ok
boolean
data
object
sunrise
string
sunset
string
dayHours
Array<object>
object
hour
number
ruler
string
start
string
end
string
nightHours
Array
Example
{
"ok": true
}

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