# Get Province

> Get the list of provinces/cities.

> **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) (`to_province_name` + `is_new_to_address`) and ask GHN about the newer v3 address APIs.

## Endpoint

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

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

This endpoint takes **no parameters** — it always returns the full province list.

## Request Example

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

## Response

### Success (HTTP 200)

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

```json
{
  "code": 200,
  "message": "Success",
  "data": [
    {
      "ProvinceID": 202,
      "ProvinceName": "Hồ Chí Minh",
      "CanUpdateCOD": false
    }
  ]
}
```

### Response Fields

`data` is an array of province objects.

| Field | Type | Description |
| --- | --- | --- |
| `ProvinceID` | Int | Province ID — pass it to [Get District](https://developer.ghn.vn/en/docs/master-data/get-district.md) |
| `ProvinceName` | String | Province / city name |
| `CanUpdateCOD` | Bool | Whether COD can be updated for orders in this province |

## Error Codes

| Condition | HTTP | Meaning |
| --- | --- | --- |
| `Authorization header is required!` | 401 | Missing `Token` |
| IP not allowed | 401 | Your account has an IP whitelist and the request came from another IP |
| `SERVER_ERROR_COMMON` | 500 | Internal error |
