The API allows the selection of a country, enabling users to view and choose the language used in the specific country. Additionally, registered users can use this API to change their country as well.
Country Screen API
The Country Screen API facilitates the selection of the user's country within the e-commerce application. It provides a list of available countries, allowing users to choose their location from the provided options. The selected country information is essential for tailoring the app's content, currency, and shipping details to match the user's location, providing a personalized and region-specific shopping experience.
Country selection interface
Endpoint
{{baseurl}}/api/v1/countries
Method
GET
Request Parameters
The Country Screen API does not require any specific request parameters.
Response Format
The API responds with a JSON object containing a list of countries and their corresponding details, such as country code, name, currency, and other relevant information.
Features
Country Selection: The API allows users to select their country from the list of available options, ensuring the app's content is customized to their location.
Currency Localization: By selecting a country, the app can automatically set the appropriate currency for displaying product prices and conducting transactions.
Shipping Details: The selected country information is used to determine shipping options and costs, providing accurate delivery information to users.
Authentication Type:
"firebase": Indicates that Firebase authentication is used as the authentication method for the country. Firebase authentication provides secure authentication services using email/password, phone number, Google, Facebook, and other identity providers.
"auth_app": Indicates a custom authentication method specific to the application ("auth_app_phone" field may contain additional details). This could mean that the application has its own authentication system or integration with a third-party authentication service tailored for the app's requirements.
Usage
The Country Screen API is typically utilized during the app's onboarding process or settings section. By making a GET request to the API, the app fetches the list of countries and presents it to the user for selection.