To obtain all the available countries to send topups.


    curl --request GET \
         --url https://unicomusaonline.com/api/v1/countries \
         --header 'x-iotopup-user: USER' \
         --header 'x-iotopup-password: PASSWORD' \
         --header 'x-iotopup-key: KEY' 
            

    var client = new RestClient("https://unicomusaonline.com/api/v1/countries");
    var request = new RestRequest(Method.POST);
    
    request.AddHeader("x-iotopup-user", "APP-USER");
    request.AddHeader("x-iotopup-password", "APP-PASSWORD");
    request.AddHeader("x-iotopup-key", "APP-KEY");
    
    IRestResponse response = client.Execute(request);
            

    $curl = curl_init(); 
        
    curl_setopt_array($curl, array(
        CURLOPT_URL => "https://unicomusaonline.com/api/v1/countries",
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_ENCODING => "",
        CURLOPT_MAXREDIRS => 10,
        CURLOPT_TIMEOUT => 30,
        CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
        CURLOPT_CUSTOMREQUEST => "GET",
        CURLOPT_HTTPHEADER => array(
                "x-iotopup-user: USER",
                "x-iotopup-password: PASSWORD",
                "x-iotopup-key: KEY"
            ),
        ));

        $response = curl_exec($curl);
        $err = curl_error($curl);

        curl_close($curl);

        if ($err) {
            
            echo $err;
            
        } else {
            echo $response;
        }
            

        {
          "response_code": 200,
          "error_message": "",
          "response": [
            {
              "prefix": "93",
              "country_code": "AF",
              "name": "Afghanistan"
            },
            {
              "prefix": "1264",
              "country_code": "AI",
              "name": "Anguilla"
            },
            {
              "prefix": "1268",
              "country_code": "AG",
              "name": "Antigua and Barbuda"
            },
            {
              "prefix": "54",
              "country_code": "AR",
              "name": "Argentina"
            }
          ]
        }
            
Field Description
prefix Integer. Country Prefix.
country_code String. Country Code.
name String. Country Name.