# Get District

> Get the list of districts in a province.

> **NOTE**
> **Legacy address model.** This endpoint uses GHN's district-based address model (before Vietnam's 01/07/2025 administrative merger, which removed the district tier). 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/district` |
| Staging | `https://dev-online-gateway.ghn.vn/shiip/public-api/master-data/district` |

**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

- **province_id** (Int): Province ID (from [Get Province](https://developer.ghn.vn/en/docs/master-data/get-province.md)).

## Request Example

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

## Response

### Success (HTTP 200)

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

```json
{
  "code": 200,
  "message": "Success",
  "data": [
    {
      "DistrictID": 3695,
      "DistrictName": "Thành Phố Thủ Đức",
      "SupportType": 3,
      "CanUpdateCOD": false
    }
  ]
}
```

### Response Fields

`data` is an array of district objects.

| Field | Type | Description |
| --- | --- | --- |
| `DistrictID` | Int | District ID — pass it to [Get Ward](https://developer.ghn.vn/en/docs/master-data/get-ward.md) and order creation |
| `DistrictName` | String | District 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 district |

## Error Codes

| code_message | HTTP | When |
| --- | --- | --- |
| `USER_ERR_COMMON` | 400 | Invalid input |
| `SERVER_ERROR_COMMON` | 500 | Internal error |
