# Plum Blossom (Mei Hua) Cast

`POST https://api.astroway.info/v1/iching/plum-blossom`

Casts a hexagram from the moment of the question by the Mei Hua Yi Shu method: Chinese lunar year branch, lunar month and day (from the ephemeris, Beijing days) and the hour branch give the upper trigram, the lower trigram and one moving line; the response shows every term and sum, the Legge reading, and ti and yong (the asker and the matter) with their five-phase verdict.

Group: I Ching (Standalone). Auth: `X-Api-Key` header. Operation ID: `iching_plum-blossom`.

## Parameters

| Name | In | Required | Type | Description |
|---|---|---|---|---|
| `fields` | query | no | string | Comma-separated dotted paths, relative to `data`, to keep in the response. A path is applied to every element of an array, so `planets.name` means the name of each planet. Paths that match nothing come back in `_fields_unmatched`; a list where nothing matches at all is a 400, because an empty object would be a confident wrong answer. |
| `precision` | query | no | integer | Round every non-integer number in the response to this many decimal places. Integers are left alone, because an id is not a measurement. Ecliptic longitudes ship with fourteen decimals by default; 2 is about a tenth of an arcminute. |
| `Idempotency-Key` | header | no | string | Unique per logical operation, kept across retries. For 24 hours from the first request, a repeat with the same key, method, path, body and query string returns the stored response with `Idempotent-Replayed: true` and costs 0 credits. The same key with a different body or query string is a 409 `IDEMPOTENCY_KEY_REUSED`; a repeat while the first is still running is a 409 `IDEMPOTENCY_IN_PROGRESS`. Only 2xx responses are kept. See /idempotency/. |

## Request body

| Field | Type | Required | Description |
|---|---|---|---|
| `date` | string | yes | Date of the question, YYYY-MM-DD. |
| `time` | string | yes | Clock time of the question, HH:mm or HH:mm:ss; gives the hour branch. |
| `timezoneOffset` | number | no | Hours from UTC at the place of the question; places the lunar day. Defaults to 8, China Standard Time. Ignored when timezone is sent. |
| `timezone` | string | no | IANA zone name such as Europe/Kyiv, or auto to look the zone up from latitude and longitude. The server takes the offset that zone kept at this local date and time, summer time included, and uses it in place of timezoneOffset. A clock time that happened twice takes the first occurrence; one skipped when clocks went forward takes the offset from before the change. Abbreviations such as EST are refused. Before 1970 the tz database is not reliable for every place, so send timezoneOffset when the local clock is known. |

```json
{
  "date": "2026-11-07",
  "time": "10:30",
  "timezoneOffset": 2
}
```

## Responses

| Status | Meaning |
|---|---|
| 200 | Successful calculation |
| 400 | Validation error |
| 401 | Missing or invalid API key |

### Success fields, under `data`

| Field | Type | Required | Description |
|---|---|---|---|
| `date` | string | no |  |
| `time` | string | no |  |
| `lunarDate` | object | no |  |
| `lunarDate.year` | number | no |  |
| `lunarDate.yearBranch` | string | no |  |
| `lunarDate.month` | number | no |  |
| `lunarDate.isLeapMonth` | boolean | no |  |
| `lunarDate.day` | number | no |  |
| `lunarDate.hourBranch` | string | no |  |
| `terms` | object | no |  |
| `terms.year` | number | no |  |
| `terms.month` | number | no |  |
| `terms.day` | number | no |  |
| `terms.hour` | number | no |  |
| `terms.upperSum` | number | no |  |
| `terms.lowerSum` | number | no |  |
| `terms.upperTrigramNumber` | number | no |  |
| `terms.lowerTrigramNumber` | number | no |  |
| `terms.movingLine` | number | no |  |
| `terms.rule` | string | no |  |
| `lines` | object[] | no |  |
| `primary` | object | no |  |
| `primary.number` | number | no |  |
| `primary.name` | string | no |  |
| `primary.pinyin` | string | no |  |
| `primary.legge` | string | no |  |
| `primary.chinese` | string | no |  |
| `primary.lines` | number[] | no |  |
| `primary.lowerTrigram` | number | no |  |
| `primary.upperTrigram` | number | no |  |
| `primary.judgment` | string | no |  |
| `changingLines` | object[] | no |  |
| `resulting` | object | no |  |
| `resulting.number` | number | no |  |
| `resulting.name` | string | no |  |
| `resulting.pinyin` | string | no |  |
| `resulting.legge` | string | no |  |
| `resulting.chinese` | string | no |  |
| `resulting.lines` | number[] | no |  |
| `resulting.lowerTrigram` | number | no |  |
| `resulting.upperTrigram` | number | no |  |
| `resulting.judgment` | string | no |  |
| `focus` | object | no |  |
| `focus.rule` | string | no |  |
| `focus.texts` | object[] | no |  |
| `source` | string | no |  |
| `readingRuleSource` | string | no |  |
| `tiYong` | object | no |  |
| `tiYong.ti` | object | no |  |
| `tiYong.yong` | object | no |  |
| `tiYong.relation` | string | no |  |
| `tiYong.verdict` | string | no |  |
| `meiHuaSource` | string | no |  |

## Example

```bash
curl -X POST https://api.astroway.info/v1/iching/plum-blossom \
  -H "X-Api-Key: aw_live_..." \
  -H "Content-Type: application/json" \
  -d '{ "date": "2026-11-07", "time": "10:30", "timezoneOffset": 2 }'
```

---

Rendered from https://api.astroway.info/v1/openapi.json. HTML page: https://api.astroway.info/docs/api/operations/iching_plum-blossom/
