Bỏ qua để đến nội dung

Get Countries List

API cho đối tácAdd-on
GET
/reference/countries

Retrieve the list of all countries available for address forms. Used to populate the country dropdown when creating or updating guest/booking records.

Scope Required: properties:read

Query Parameters:

  • lang (optional): Language code for country names. Supported: vi (default), en

Use Cases:

  • Populate country select dropdown in guest registration forms
  • Validate country values before submitting booking data
  • Display localized country names in the UI

Important Notes:

  • Results are sorted alphabetically by name
  • For Vietnamese guests, use code VN — this triggers city/ward select dropdowns
  • For non-Vietnamese guests (code ≠ VN), city and ward fields should be free-text
  • DB stores the city/ward name (not the code)
  • Results are cached permanently (static data)
lang
string
default: vi
object
success
required
boolean
data
required
Array<object>
object
code
required
string
name
required
string
Bài này có giúp được bạn không?