POST api/GetCountries_V1
Get All Countries
Request Information
URI Parameters
None.
Body Parameters
The request is presented below!
WS_Repository.Models.Requests.Lists.GetCountriesRequest| Name | Description | Type | Additional information |
|---|---|---|---|
| WS_Key |
(Mandatory) User Webservice Key provided by 2ship support |
string |
None. |
Request Formats
application/json, text/json
Sample:
{
"WS_Key": "sample string 1"
}
application/xml, text/xml
Sample:
<GetCountriesRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WS_Repository.Models.Requests.Lists"> <WS_Key>sample string 1</WS_Key> </GetCountriesRequest>
application/x-www-form-urlencoded
Sample:
Response Information
Resource Description
WS_Repository.Models.Responses.Lists.GetCountriesResponse| Name | Description | Type | Additional information |
|---|---|---|---|
| Success |
Specify if the request was successfully done |
boolean |
None. |
| ErrorMessage |
The error message if the request get an error |
string |
None. |
| Countries |
The List of countries |
Collection of WS_Repository.Models.Responses.Lists.Country |
None. |
Response Formats
application/json, text/json
Sample:
{
"Success": true,
"ErrorMessage": "sample string 2",
"Countries": [
{
"Code": "sample string 1",
"Name": "sample string 2",
"Currency": "sample string 3",
"StatesProvincesList": [
{
"Code": "sample string 1",
"Name": "sample string 2"
},
{
"Code": "sample string 1",
"Name": "sample string 2"
}
]
},
{
"Code": "sample string 1",
"Name": "sample string 2",
"Currency": "sample string 3",
"StatesProvincesList": [
{
"Code": "sample string 1",
"Name": "sample string 2"
},
{
"Code": "sample string 1",
"Name": "sample string 2"
}
]
}
]
}
application/xml, text/xml
Sample:
<GetCountriesResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WS_Repository.Models.Responses.Lists">
<Countries>
<Country>
<Code>sample string 1</Code>
<Currency>sample string 3</Currency>
<Name>sample string 2</Name>
<StatesProvincesList>
<StateProvince>
<Code>sample string 1</Code>
<Name>sample string 2</Name>
</StateProvince>
<StateProvince>
<Code>sample string 1</Code>
<Name>sample string 2</Name>
</StateProvince>
</StatesProvincesList>
</Country>
<Country>
<Code>sample string 1</Code>
<Currency>sample string 3</Currency>
<Name>sample string 2</Name>
<StatesProvincesList>
<StateProvince>
<Code>sample string 1</Code>
<Name>sample string 2</Name>
</StateProvince>
<StateProvince>
<Code>sample string 1</Code>
<Name>sample string 2</Name>
</StateProvince>
</StatesProvincesList>
</Country>
</Countries>
<ErrorMessage>sample string 2</ErrorMessage>
<Success>true</Success>
</GetCountriesResponse>