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

Animal Compatibility

POST
/chinese/zodiac/compatibility

Pair compatibility score (0-100) using San He trine + Liu Chong conflict-pair canon.

curl -X POST https://api.astroway.info/v1/chinese/zodiac/compatibility \
-H "X-Api-Key: aw_live_..." \
-H "Content-Type: application/json" \
-d '{ "person1": { "date": "1990-06-15" }, "person2": { "date": "1985-03-22" } }'
object
Example
{
"person1": {
"date": "1990-06-15"
},
"person2": {
"date": "1985-03-22"
}
}

Successful calculation

object
ok
boolean
Example
true
data
object
person1
object
solarYear
number
animal
string
person2
object
compatibility
object
score
number
category
string
notes
Array<string>

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