# Thiết kế con người

AstroWay API có **12 endpoint Human Design** — mức độ phủ sóng HD sâu nhất trong số các API thương mại. Điểm cuối chính `POST /v1/human-design` trả về bản đồ đầy đủ. Chi phí: **50 tín dụng** (Tier 3).

## 12 endpoint HD

| Endpoint | Tín dụng | Trả về |
|---|---|---|
| `/v1/human-design` | 50 | Bản đồ HD đầy đủ: type, strategy, authority, channels, centers, profile |
| `/v1/human-design/transits` | 50 | Transit HD vào ngày nhất định |
| `/v1/human-design/compatibility` | 100 | Tương thích giữa hai bản đồ HD |
| `/v1/hd/incarnation-cross` | 50 | Thập tự hóa sinh |
| `/v1/hd/dream-rave` | 50 | Bản đồ Dream Rave |
| `/v1/hd/hologenetic` | 50 | Hologenetic Profile |
| `/v1/hd/sensitivity` | 50 | Độ nhạy thời gian (mức độ ảnh hưởng của thay đổi thời gian sinh đến bản đồ) |
| `/v1/hd/circuitry` | 20 | Phân tích mạch lưới |
| `/v1/hd/penta` | 100 | Penta (động lực nhóm 3–5 người) |
| `/v1/hd/group-overlay` | 100 | Lớp phủ nhóm |
| `/v1/hd/design-date` | 10 | Ngày Design (88° Mặt Trời vào lúc sinh) |
| `/v1/hd/rave-new-years` | 10 | Ngày Rave New Year |

## Ví dụ request

Tham số giống hệt `/v1/chart`:

<Tabs syncKey="lang">
  <TabItem label="cURL">
    ```bash frame="terminal"
    curl -X POST https://api.astroway.info/v1/human-design \
      -H "X-Api-Key: aw_live_your_key_here" \
      -H "Content-Type: application/json" \
      -d '{
        "date": "1990-07-14",
        "time": "14:30:00",
        "timezoneOffset": 3,
        "latitude": 50.4501,
        "longitude": 30.5234
      }'
    ```
  </TabItem>
  <TabItem label="Node.js">
    ```ts
    const res = await fetch('https://api.astroway.info/v1/human-design', {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
        'X-Api-Key': process.env.ASTROWAY_API_KEY!,
      },
      body: JSON.stringify({
        date: '1990-07-14',
        time: '14:30:00',
        timezoneOffset: 3,
        latitude: 50.4501,
        longitude: 30.5234,
      }),
    });
    const hd = await res.json();
    console.log(hd.type);       // e.g. "Generator"
    console.log(hd.strategy);   // e.g. "To Respond"
    console.log(hd.authority);  // e.g. "Sacral"
    console.log(hd.profile);    // e.g. "1/3"
    ```
  </TabItem>
  <TabItem label="Python">
    ```python

    r = requests.post(
        'https://api.astroway.info/v1/human-design',
        headers={'X-Api-Key': os.environ['ASTROWAY_API_KEY'], 'Content-Type': 'application/json'},
        json={
            'date': '1990-07-14',
            'time': '14:30:00',
            'timezoneOffset': 3,
            "latitude": 50.4501,
            "longitude": 30.5234,
        },
    )
    hd = r.json()
    print(hd['type'])       # e.g. "Generator"
    print(hd['strategy'])   # e.g. "To Respond"
    print(hd['authority'])  # e.g. "Sacral"
    print(hd['channels'])   # List of defined channels
    ```
  </TabItem>
  <TabItem label="PHP">
    ```php
    <?php
    use GuzzleHttp\Client;

    $client = new Client(['base_uri' => 'https://api.astroway.info/v1/']);
    $r = $client->post('human-design', [
        'headers' => ['X-Api-Key' => getenv('ASTROWAY_API_KEY')],
        'json' => [
            'date' => '1990-07-14',
            'time' => '14:30:00',
            'timezoneOffset' => 3,
            'latitude' => 50.4501,
            'longitude' => 30.5234,
        ],
    ]);

    $hd = json_decode($r->getBody(), true);
    echo $hd['type'];       // e.g. "Generator"
    echo $hd['strategy'];   // e.g. "To Respond"
    echo $hd['authority'];  // e.g. "Sacral"
    echo $hd['profile'];    // e.g. "1/3"
    ```
  </TabItem>
</Tabs>

## Ví dụ response

```json
{
  "input": {
    "date": "1990-07-14",
    "time": "14:30:00",
    "timezoneOffset": 3,
    "latitude": 50.4501,
    "longitude": 30.5234
  },
  "type": "Generator",
  "strategy": "To Respond",
  "notSelfTheme": "Frustration",
  "authority": "Sacral",
  "profile": "1/3",
  "definition": "single",
  "cross": {
    "name": "Right Angle Cross of the Sphinx",
    "quarter": "Civilization",
    "gates": [1, 2, 7, 13]
  },
  "centers": [
    { "name": "Sacral", "defined": true },
    { "name": "Root", "defined": true },
    { "name": "SolarPlexus", "defined": false },
    { "name": "Heart", "defined": false },
    { "name": "Throat", "defined": true },
    { "name": "Ajna", "defined": false },
    { "name": "Head", "defined": false },
    { "name": "Spleen", "defined": true },
    { "name": "G", "defined": true }
  ],
  "channels": [
    { "gate1": 34, "gate2": 20, "name": "Channel of Charisma", "type": "Generated" }
  ],
  "personalityActivations": [
    { "gate": 1, "line": 3, "planet": "Sun", "side": "personality" }
  ],
  "designActivations": [
    { "gate": 2, "line": 5, "planet": "Sun", "side": "design" }
  ],
  "designJd": 2448000.123,
  "personalityJd": 2448087.979
}
```

<Aside type="note">
Response bao gồm tất cả 26 lần kích hoạt (13 Personality + 13 Design), tất cả 9 trung tâm và tất cả các kênh được xác định. Đã rút ngắn để minh họa.
</Aside>

## Các trường quan trọng trong response

| Trường | Kiểu | Mô tả |
|---|---|---|
| `type` | string | Manifestor, Generator, Generator Xing (MG), Projector, Reflector |
| `strategy` | string | Chiến lược đưa ra quyết định |
| `authority` | string | Nội tại quyền lực |
| `profile` | string | Profile (ví dụ: `"1/3"`, `"4/6"`) |
| `definition` | string | single, split, triple-split, quadruple-split |
| `cross` | object | Thập tự hóa sinh (tên, quý, 4 cổng) |
| `centers` | array | 9 trung tâm với cờ defined/open |
| `channels` | array | Các kênh được xác định |
| `personalityActivations` | array | 13 lần kích hoạt Personality (ý thức) |
| `designActivations` | array | 13 lần kích hoạt Design (vô thức) |

## Tiếp theo

- [Bản đồ natal](/examples/natal/) — request cơ bản
- [Synastry](/examples/synastry/) — tương thích giữa hai bản đồ
- [Transit](/examples/transits/) — overlay transit
- [API reference](/docs/api/) — tất cả {siteMeta.endpoints} endpoint
