On this page
article
2.2.3 Get the Full List of Countries
GetCountries
-
API: getCountries
-
Purpose and Use Cases: First, please retrieve the complete list of countries we support.
-
Request:
| Attribute Name | Data Type | Required | Details |
|---|---|---|---|
| pageNumber | Int | No | The number of the page |
| pageSize | Int | No | The size of the page |
QUERY
query GetCountries($pageNumber: Int, $pageSize: Int) {
getCountries(pageNumber: $pageNumber, pageSize: $pageSize) {
pageInfo {
total
totalPages
currentPage
pageSize
}
counties {
id
name
countryCode
currency
rentCycle
}
}
}
GRAPHQL VARIABLES
{
"pageNumber": 1,
"pageSize": 5
}
- Response:
{
"data": {
"getCountries": {
"pageInfo": {
"total": 33,
"totalPages": 7,
"currentPage": 1,
"pageSize": 5
},
"counties": [
{
"id": "eyJ0eXBlIjoiQ291bnRyeSIsImlkIjoxfQ==",
"name": "United States.",
"countryCode": "USA",
"currency": "USD",
"rentCycle": "MONTHLY"
},
{
"id": "eyJ0eXBlIjoiQ291bnRyeSIsImlkIjoyfQ==",
"name": "United Kingdom",
"countryCode": "GBR",
"currency": "GBP",
"rentCycle": "WEEKLY"
},
{
"id": "eyJ0eXBlIjoiQ291bnRyeSIsImlkIjozfQ==",
"name": "New Zealand",
"countryCode": "NZL",
"currency": "NZD",
"rentCycle": "WEEKLY"
},
{
"id": "eyJ0eXBlIjoiQ291bnRyeSIsImlkIjo0fQ==",
"name": "Canada",
"countryCode": "CAN",
"currency": "CAD",
"rentCycle": "MONTHLY"
},
{
"id": "eyJ0eXBlIjoiQ291bnRyeSIsImlkIjo1fQ==",
"name": "Australia",
"countryCode": "AUS",
"currency": "AUD",
"rentCycle": "WEEKLY"
}
]
}
}
}
GetCountry
-
API: getCountry
-
Purpose and Use Cases: You can retrieve detailed information for each country via this API endpoint.
-
Request:
| Attribute Name | Data Type | Required | Details |
|---|---|---|---|
| id | ID | Yes | Unique identifier for the country |
QUERY
query GetCountry($getCountryId: ID!) {
getCountry(id: $getCountryId) {
id
name
countryCode
currency
rentCycle
}
}
GRAPHQL VARIABLES
{
"getCountryId": "eyJ0eXBlIjoiQ291bnRyeSIsImlkIjoxfQ"
}
- Response:
{
"data": {
"getCountry": {
"id": "eyJ0eXBlIjoiQ291bnRyeSIsImlkIjoxfQ==",
"name": "United States.",
"countryCode": "USA",
"currency": "USD",
"rentCycle": "MONTHLY"
}
}
}
Country Object
| Attribute Name | Data Type | Details |
|---|---|---|
| id | ID | Unique identifier for the Country object |
| name | String | Name of the country |
| countryCode | String | Alpha-3 country code following the ISO 3166 international standard |
| currency | String | Alpha-3 currency code following the ISO 4217 standard |
| rentCycle | Enum | Supported billing cycle; possible values: DAILY WEEKLY MONTHLY |