For this API request, you will need to hit the following endpoint.
In order to be granted access to the API, all of your requests must include an APC-Auth header that includes your API Key. An APC-Auth-Secret header can also be supplied for special cases where a referrer cannot be found, however, in most cases it will not be necessary.
|APC-Auth||Required||Your unique 10 digit alphanumeric Air-Port-Codes API key. This can be located in your account settings.|
This is a list of the required and optional parameters that can help you retrieve the desired response.
|country||Required||This should be the 2-letter iso value of a desired country.|
|field_name||Optional||Use this if you want the response to be returned with the select html tag wrapping it with the name attribute being set to this value. This is useful, especially when the country doesn't have any states associated with it, an input field will be returned instead of a select field.|
|is_select_options||Optional||This will return the countries object as a string of options for a select tag, rather than an array of objects, if it is set to true.|
|autoselect_visitor_location||Optional||Allows you to have the visitors country auto selected in a select field.|
|selected||Optional||This will select the specified country in the select field.|
|ip_address||Optional||You can pass in an ip address and have the select field auto selected to the ip address' country.|