Request Details

Method Controller Resource Parameters
GET platform countries  country_id

Parameters Guide

Parameter Accepts
country_id int id of country in Beep Database (See get all countries - to retrieve ids)

Example Request Format

Direct Url https://api.beepxtra.com/platform/countries/3
Curl CURL -A "YOURAPPNAME|1.0|AppID|AppKEY|platform" -X GET https://api.beepxtra.com/platform/countries/3
PHP SDK $beepapi->request('get', 'platform', 'countries/3');

Sample Response

Success
{  
   "success":true,
   "request":{  
      "method":"GET",
      "controller":"platform",
      "resource":"countries",
      "parameters":{  
         "\/platform\/countries\/3":""
      },
      "url_elements":[  
         "platform",
         "countries",
         "3"
      ]
   },
   "error":{  
      "errorid":0,
      "message":0
   },
   "data":{  
      "id":"3",
      "name":"United Kingdom",
      "flag_name":"United-Kingdom",
      "country_code":"44",
      "continent":"Europe",
      "currency":"GBP",
      "map_x":"54",
      "map_y":"-2"
   }
}
Error
{  
   "success":false,
   "request":{  
      "method":"GET",
      "controller":"platform",
      "resource":"countries",
      "parameters":{  
         "\/platform\/countries\/0":""
      },
      "url_elements":[  
         "platform",
         "countries",
         "0"
      ]
   },
   "error":{  
      "errorid":1000,
      "message":"There is no active country with id 0"
   },
   "data":{  
      "error":"There is no active country with id 0"
   }
}

Response Guide

Parameter Type Details
error String No errors available
id int The internal id of the country in Beep Database
name string Country name
flag_name string The flag image name for the country. Can be accessed via https://www.beepxtra.com/images/flags-32/flag_name.png
country_code int The international country calling code
continent string The continent name of the country
currency string Currency code
map_x float The X (Longitude) coordinates of the country
map_y float The Y (Latitude) coordinates of the country