# Get Ward

> Get the list of wards in a district.

> **NOTE**
> **Legacy address model.** This endpoint uses GHN's district-based address model (before Vietnam's 01/07/2025 administrative merger). For new integrations, prefer name-based addressing in [Create Order](https://developer.ghn.vn/en/docs/order/create.md) and ask GHN about the newer v3 address APIs.

## Endpoint

| Environment | URL |
| --- | --- |
| Production | `https://online-gateway.ghn.vn/shiip/public-api/master-data/ward` |
| Staging | `https://dev-online-gateway.ghn.vn/shiip/public-api/master-data/ward` |

**Method**: `GET`

## Headers

| Header | Required | Description |
| --- | --- | --- |
| `Token` | Yes | Shop token (issued by GHN) — [get a token](https://developer.ghn.vn/en/docs/token/get-token.md) |
| `ShopId` | Yes | Shop ID (int) |

## Parameters

- **district_id** (Int): District ID (from [Get District](https://developer.ghn.vn/en/docs/master-data/get-district.md)). `0` or missing is rejected

## Request Example

```bash
curl -X GET "https://dev-online-gateway.ghn.vn/shiip/public-api/master-data/ward?district_id=1444" \
  -H "Token: 5c1d8a9e-2f4b-11ed-..." \
  -H "ShopId: 92837"
```

## Response

### Success (HTTP 200)

_Captured from a real Staging-environment call (abridged to one ward, common fields)._

```json
{
  "code": 200,
  "message": "Success",
  "data": [
    {
      "WardCode": "90795",
      "WardName": "Phường Võ Thị Sáu",
      "SupportType": 3,
      "CanUpdateCOD": true
    }
  ]
}
```

### Response Fields

`data` is an array of ward objects.

| Field | Type | Description |
| --- | --- | --- |
| `WardCode` | String | Ward code — **a string, not a number** (may have leading zeros). Use it when creating orders |
| `WardName` | String | Ward name |
| `SupportType` | Int | Service support:<br>`0`: locked (no service)<br>`1`: pickup only<br>`2`: delivery only<br>`3`: pickup + delivery |
| `CanUpdateCOD` | Bool | Whether COD can be updated for orders in this ward |

## Error Codes

| code_message | HTTP | When |
| --- | --- | --- |
| `USER_ERR_COMMON` | 400 | Missing or `0` `district_id`, or invalid input |
| `SERVER_ERROR_COMMON` | 500 | Internal error |
