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

Animal Compatibility

POST
/chinese/zodiac/compatibility
request.sh
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" } }'

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

Media type application/json
object
Example
{
"person1": {
"date": "1990-06-15"
},
"person2": {
"date": "1985-03-22"
}
}

Successful calculation

Media type application/json
object
ok
boolean
data
object
person1
object
solarYear
number
animal
string
person2
object
compatibility
object
score
number
category
string
notes
Array<string>
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"
}
}
Корисно?