GetCountries
Endpoint
Overview
The "GetCountries" endpoint is a GET request. It is used to retrieve a list of countries with their codes. Detailed functionality of how to use this endpoint is explained in the Shipping section.
The endpoint on Swagger is: Shipping_GetCountries.
Now, we are going to declare the endpoint and its models along with each accepted parameter and possible value.
Request Header
Add "Authorization": "Bearer {Token}" to request header. Token of demo configuration can be found here.
Request Model
The request is a GET request without any parameters.
Response Model
After viewing the Response Model that you will get as a result of your request, here, you will find full details about the Data Model of this API endpoint. Let's check it and its contents.
Response Field | Type | Description |
---|---|---|
CountryCode | string | The country code that will be used in shipping addresses. |
CountryName | string | The country name that will be displayed for your customer. |
Sample Message
/v2/GetCountries
{
"IsSuccess": true,
"Message": null,
"FieldsErrors": null,
"Data": [
{
"CountryCode": "KW",
"CountryName": "KUWAIT"
},
{
"CountryCode": "KY",
"CountryName": "CAYMAN ISLANDS"
},
.......
]
}
Updated 10 months ago