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

Owner-Pet Compatibility

POST
/pet/owner-pet-compatibility

Compatibility score (0-100) based on element + sign distance.

curl -X POST https://api.astroway.info/v1/pet/owner-pet-compatibility \
-H "X-Api-Key: aw_live_..." \
-H "Content-Type: application/json" \
-d '{ "owner": { "date": "1990-05-15", "time": "14:30:00", "timezoneOffset": 3, "latitude": 50.45, "longitude": 30.52 }, "pet": { "date": "2020-06-15", "time": "12:00:00", "timezoneOffset": 0, "latitude": 40, "longitude": -74 } }'
object
Example
{
"owner": {
"date": "1990-05-15",
"time": "14:30:00",
"timezoneOffset": 3,
"latitude": 50.45,
"longitude": 30.52
},
"pet": {
"date": "2020-06-15",
"time": "12:00:00",
"timezoneOffset": 0,
"latitude": 40,
"longitude": -74
}
}

Successful calculation

object
ok
boolean
Example
true
data
object
compatibility
object
score
number
category
string
Example
{
"ok": true,
"data": {
"compatibility": {
"score": 85,
"category": "aligned"
}
}
}

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