> ## Documentation Index
> Fetch the complete documentation index at: https://docs.velafi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 获取国家列表

> 获取 VelaFi 支持的完整国家列表。可按有效状态筛选，仅返回有效国家或包含所有记录。

使用 **GET** `/v2/base/countrys` 接口获取 VelaFi 在入金、出金和全球支付服务中支持的所有国家。默认情况下，响应仅包含有效（启用）的国家；传入 `hasFindAll=true` 可获取包括未启用国家在内的完整列表。在构造需要 `country` 参数的后续请求时，请使用返回的 ISO 3166-1 代码。

## 请求

```text theme={null}
GET /v2/base/countrys
```

### 请求头

| 请求头 | 值 | 必填 |
| - | - | - |
| `X-BH-TOKEN` | 通过 `GET /v2/token/generate` 获取的 token | ✓ |

### 查询参数

**hasFindAll** `boolean`

为 `true` 时，返回包括未启用国家在内的所有国家。默认为 `false`，仅返回有效（启用）的国家。

## 响应字段

**code** `number`

HTTP 风格的状态码。`200` 表示成功。

**msg** `string`

可读的状态信息，例如 `"SUCCESS"`。

**data** `array`

国家对象数组。

**data\[]**

**country** `string`

国家全称（例如 `"Mexico"`）。

**abbr** `string`

ISO 3166-1 alpha-2 国家代码（例如 `"MX"`）。

## 示例

```bash cURL — valid countries only theme={null}
curl --request GET \
  --url 'https://api.velafi.com/v2/base/countrys' \
  --header 'X-BH-TOKEN: YOUR_TOKEN'
```

```bash cURL — all countries theme={null}
curl --request GET \
  --url 'https://api.velafi.com/v2/base/countrys?hasFindAll=true' \
  --header 'X-BH-TOKEN: YOUR_TOKEN'
```

### 响应

```json theme={null}
{
  "code": 200,
  "msg": "SUCCESS",
  "data": [
    {
      "country": "Mexico",
      "abbr": "MX"
    },
    {
      "country": "Argentina",
      "abbr": "AR"
    },
    {
      "country": "Brazil",
      "abbr": "BR"
    }
  ]
}
```

> [!NOTE]
>
> `abbr` 字段返回每个国家的 ISO 3166-1 alpha-2 代码。在任何需要 `country` 缩写的 API 请求中使用该值。


## Related topics

- [基础 URL](https://docs.velafi.com/cn/api-reference/basic-configuration/api-endpoint.md)
- [获取法币列表](https://docs.velafi.com/cn/api-reference/basic-configuration/get-list-of-fiat-currencies.md)
- [获取收款人列表](https://docs.velafi.com/cn/api-reference/beneficiary/get-beneficiary.md)
- [获取法币→法币交易对](https://docs.velafi.com/cn/api-reference/basic-configuration/get-fiat-fiat-pairs.md)
- [获取 Webhook 列表](https://docs.velafi.com/cn/api-reference/webhooks/get-webhook-endpoints.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.