TS Commerce Developers

Countries API

Current version: v1.1

List contries

List all available countries

GET
/countries/list.json
List contries Request

$storeden = new Storeden\Storeden($config);
$countries_list = $storeden->get('/countries/list.json');
					
List contries Response

[
    ...
   {
        "name": "Italia",
        "tld": "IT",
        "uid": 119
    }
    ...
   {
        "uid": 254,
        "tld": "US",
        "name": "United States"
    }
    ...
]
					

Get states list

Get all states from a specified country

GET
/countries/states.json?uid={country-uid}
uid required (int) Specify a valid country uid
Get states lists Request

$storeden = new Storeden\Storeden($config);
$states_list = $storeden->get('/countries/states.json?uid=254');
					
Get states lists Response

[
    {
        "uid": 14988,
        "countryUID" : 254,
        "name" : "AMF O'Hare"
    },
    ...
]