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

Long Count

POST
/mayan/long-count

Five-place positional notation: baktun.katun.tun.uinal.kin. Days since 4 Ahau 8 Cumku (3114 BC).

curl -X POST https://api.astroway.info/v1/mayan/long-count \
-H "X-Api-Key: aw_live_..." \
-H "Content-Type: application/json" \
-d '{ "date": "1990-06-15" }'
object
Example
{
"date": "1990-06-15"
}

Successful calculation

object
ok
boolean
Example
true
data
object
longCount
object
baktun
number
katun
number
tun
number
uinal
number
kin
number
notation
string
daysSinceCreation
number
Example
{
"ok": true,
"data": {
"longCount": {
"baktun": 12,
"katun": 18,
"tun": 17,
"uinal": 2,
"kin": 15,
"notation": "12.18.17.2.15",
"daysSinceCreation": 1853895
}
}
}

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