HTTP Status 200
Function returns all countries and their currencies
-
state_id Type: integer
State ID
-
state_name Type: varchar
State name
-
ISO2 Type: varchar
ISO short code
-
ISO3 Type: varchar
ISO long code
-
telephone_prefix Type: varchar
Telephone prefix
-
currency_code Type: varchar
Currency code
-
Query Response Example
{ "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" } ] }
Error Response Example
{ "code": "int", "message": "string" }
Parameters
Parameters that need to be sent in the request
-
Bearer Type: varchar
Auth token
Authorization
Body data
None-
Example Request
$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);
curl_close($curl);
echo $response;