Function returns all countries and their currencies
https://rest.crmango.com/api/GetAllStates
Bearer
varchar
Auth token
This endpoint takes no body parameters
Function returns all countries and their currencies
state_id
integer
State ID
state_name
varchar
State name
ISO2
varchar
ISO short code
ISO3
varchar
ISO long code
telephone_prefix
varchar
Telephone prefix
currency_code
varchar
Currency code
curl --request GET \
--url 'https://rest.crmango.com/api/GetAllStates' \
--header 'Authorization: Bearer auth_token'
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://rest.crmango.com/api/GetAllStates',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer auth_token'
),
));
$response = curl_exec($curl);
echo $response;
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === 4) {
console.log(this.responseText);
}
});
xhr.open("GET", "https://rest.crmango.com/api/GetAllStates");
xhr.setRequestHeader("Authorization", "Bearer auth_token");
xhr.send();
import requests
url = "https://rest.crmango.com/api/GetAllStates"
payload = {}
headers = {
'Authorization': 'Bearer auth_token'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
{
"code": 200,
"response": [
{
"state_id": 1,
"state_name": "Andorra",
"ISO2": "AD",
"ISO3": "AND",
"telephone_prefix": "+376",
"currency_code": "EUR"
},
{
"state_id": 3,
"state_name": "Afganistan",
"ISO2": "AF",
"ISO3": "AFG",
"telephone_prefix": "+93",
"currency_code": "AFN"
},
{
"state_id": 4,
"state_name": "Antigua a Barbuda",
"ISO2": "AG",
"ISO3": "ATG",
"telephone_prefix": "+1268",
"currency_code": "XCD"
},
{
"state_id": 5,
"state_name": "Anguilla",
"ISO2": "AI",
"ISO3": "AIA",
"telephone_prefix": "+1264",
"currency_code": "XCD"
},
{
"state_id": 8,
"state_name": "Angola",
"ISO2": "AO",
"ISO3": "AGO",
"telephone_prefix": "+244",
"currency_code": "AOA"
},
{
"state_id": 101,
"state_name": "Indonezia",
"ISO2": "ID",
"ISO3": "IDN",
"telephone_prefix": "+62",
"currency_code": "IDR"
},
{
"state_id": 103,
"state_name": "Izrael",
"ISO2": "IL",
"ISO3": "ISR",
"telephone_prefix": "+972",
"currency_code": "ILS"
},
{
"state_id": 104,
"state_name": "Ostrov Man",
"ISO2": "IM",
"ISO3": "IMN",
"telephone_prefix": "+44",
"currency_code": "GBP"
},
{
"state_id": 105,
"state_name": "India",
"ISO2": "IN",
"ISO3": "IND",
"telephone_prefix": "+91",
"currency_code": "INR"
}
]
}
{
"code": "int",
"message": "string"
}