Table of Contents

Get Countries API Documentation

Overview

This API returns a all of countries/nations. It supports pagination to allow for efficient retrieval of country data.


API Endpoint

  • URL: {{host}}/hub/b2c/countries
  • Method: GET

Request Body

No request body required for GET method


Sample Request

curl --location '{{host}}/hub/b2c/countries' \


Sample Response

[
  {
    "countryCode": "VN",
    "name": "Viet Nam",
    "nameVN": "Việt Nam",
    "continentCode": "AS"
  },
  {
    "countryCode": "VI",
    "name": "Virgin Islands, U.S.",
    "nameVN": "Quần đảo Virgin thuộc Mỹ",
    "continentCode": "NA"
  },
  {
    "countryCode": "VG",
    "name": "Virgin Islands, British",
    "nameVN": "Quần đảo Virgin thuộc Anh",
    "continentCode": "NA"
  }
]

Response Field Description

Field Type Example Description
countryCode string "VN" The ISO 3166-1 alpha-2 code for the country.
name string "Viet Nam" The common name of the country in English.
nameVN string "Việt Nam" The common name of the country in Vietnamese.
continentCode string "AS" The code representing the continent of the country (e.g., "AS" for Asia, "NA" for North America).

Continent Code Reference

Code Name
AF Africa
AN Antarctica
AS Asia
EU Europe
NA North America
OC Oceania
SA South America
... ...

Notes

  • This API provides a list of all countries.