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

Tong Shu date selection

POST
/chinese/tong-shu/select
request.sh
curl -X POST https://api.astroway.info/v1/chinese/tong-shu/select \
-H "X-Api-Key: aw_live_..." \
-H "Content-Type: application/json" \
-d '{ "from": "2026-09-01", "to": "2026-12-31", "activity": "marriage", "avoidClashWith": "Rat" }'

Walk a date range and return the days the almanac endorses for one activity, each with the officer that decided it. Optionally drop the days that clash a person’s animal. Range capped at 366 days and a longer one is refused, not truncated.

Media type application/json
object
from required
string
/^\d{4}-\d{2}-\d{2}$/
to required
string
/^\d{4}-\d{2}-\d{2}$/
activity required
string
Allowed values: marriage opening moving travel contract construction demolition medical funeral education
avoidClashWith
string
>= 2 characters <= 12 characters
includeNeutral
boolean
Example
{
"from": "2026-09-01",
"to": "2026-12-31",
"activity": "marriage",
"avoidClashWith": "Rat"
}

Successful calculation

Media type application/json
object
ok
boolean
data
object
activity
string
nullable
scanned
number
nullable
matched
number
nullable
dropped
object
byRegister
number
nullable
byClash
number
nullable
days
Array<object>
nullable
object
date
string
nullable
verdict
string
nullable
dayPillar
string
nullable
officer
object
chinese
string
nullable
name
string
nullable
mansion
object
chinese
string
nullable
name
string
nullable
clashesWith
string
nullable
Example
{
"ok": true,
"data": {
"activity": "marriage",
"scanned": 122,
"matched": 24,
"dropped": {
"byRegister": 88,
"byClash": 10
},
"days": [
{
"date": "2026-09-12",
"verdict": "suitable",
"dayPillar": "Ren-Wu",
"officer": {
"chinese": "",
"name": "Success"
},
"mansion": {
"chinese": "",
"name": "Well"
},
"clashesWith": "Rat"
}
]
}
}

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