Common DATA API
There is some additional data available via API.
Validate Access to API
You can run this simple request to check if API access is working. You will get error if no access or empty reply if access it OK.
Route: a/common/access
Method: GET
Example request:
http://demo.abantecart.com/index.php?rt=a/common/access&api_key=[key]
Example response
{"error":"Access to API is disabled!"}
Get Countries
You can get all the countries from the system
Route: a/common/country
Method: GET
Example request: http://demo.abantecart.com/index.php?rt=a/common/country
Get Zones
You can get all the geo zones for specified country ID
Route: a/common/zone
Method: GET
Example request:
http://demo.abantecart.com/index.php?rt=a/common/zone&country_id=2
Example response
[
{
"zone_id":"33",
"country_id":"2",
"code":"BR",
"name":"Berat",
"status":"1",
"sort_order":"0"
},
{
"zone_id":"34",
"country_id":"2",
"code":"BU",
"name":"Bulqize",
"status":"1",
"sort_order":"0"
},
...
]