Property Palace (Tianzhai)
POST
/ziwei/palace-property
curl -X POST https://api.astroway.info/v1/ziwei/palace-property \ -H "X-Api-Key: aw_live_..." \ -H "Content-Type: application/json" \ -d '{ "date": "1990-06-15" }'const res = await fetch('https://api.astroway.info/v1/ziwei/palace-property', { method: 'POST', headers: { 'X-Api-Key': process.env.ASTROWAY_API_KEY, 'Content-Type': 'application/json', }, body: JSON.stringify({ "date": "1990-06-15" }),});const { ok, data, error } = await res.json();if (!ok) throw new Error(error.message);console.log(data);import os, requests
r = requests.post( 'https://api.astroway.info/v1/ziwei/palace-property', headers={'X-Api-Key': os.environ['ASTROWAY_API_KEY'], 'Content-Type': 'application/json'}, json={ 'date': "1990-06-15" },)result = r.json()if not result['ok']: raise RuntimeError(result['error']['message'])print(result['data'])<?phpuse GuzzleHttp\Client;
$client = new Client(['base_uri' => 'https://api.astroway.info/v1/']);$r = $client->post('ziwei/palace-property', [ 'headers' => ['X-Api-Key' => getenv('ASTROWAY_API_KEY')], 'json' => [ 'date' => '1990-06-15', ],]);$result = json_decode($r->getBody(), true);if (!$result['ok']) throw new \RuntimeException($result['error']['message']);print_r($result['data']);Real estate, family home, ancestry.
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ” Media type application/json
object
date required
string
time
string
timezoneOffset
number
Example
{ "date": "1990-06-15"}Responses
Section titled “ Responses ”Successful calculation
Media type application/json
object
ok
boolean
data
object
solarYear
number
animal
string
palace
object
key
string
english
string
pinyin
string
chinese
string
theme
string
rules
Array<string>
disclaimer
string
Example
{ "ok": true, "data": { "solarYear": 1990, "animal": "Horse", "palace": { "key": "property", "english": "Property / Home", "pinyin": "Tianzhai", "chinese": "田宅宫", "theme": "Real estate, family home, ancestry", "rules": [ "Property luck" ] }, "disclaimer": "Zi Wei Dou Shu reference tables. Palace meanings and the 14 main stars here are static and do not vary with the birth date; only solarYear and animal derive from it. Star placement lives on POST /v1/ziwei/chart, which computes the soul and body palaces, the five-element class and every star from the lunar date and the birth hour. Where schools disagree we follow 中州派 (Zhongzhou, the Wang Tingzhi corpus); this is stated up front so results are comparable against the calculators built on the same tables." }}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" }} Корисно?
Дякуємо за фідбек.