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
Parameter | Meaning | Notes |
---|---|---|
callback | A JavaScript function to run when the response is received | Optional parameter allows you to specify a JavaScript function to handle query results for pure client-side implementations. Embed the API query in <script> tags. Define the callback function in <script> tags. |
api_key | Unique API key that is set in the control panel | This is optional key that can be set to limit unauthorized (accidental) access to your API |
Example request:
http://demo.abantecart.com/index.php?rt=a/common/access&api_key=[key]
{"error":"Access to API is disabled!"}
Get Countries
You can get all the countries from the system
Route: a/common/country
Method: GET
Parameter | Meaning | Notes |
---|---|---|
callback | A JavaScript function to run when the response is received | Optional parameter allows you to specify a JavaScript function to handle query results for pure client-side implementations. Embed the API query in <script> tags. Define the callback function in <script> tags. |
api_key | Unique API key that is set in the control panel | This is optional key that can be set to limit unauthorized (accidental) access to your API |
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
Parameter | Meaning | Notes |
---|---|---|
callback | A JavaScript function to run when the response is received | Optional parameter allows you to specify a JavaScript function to handle query results for pure client-side implementations. Embed the API query in <script> tags. Define the callback function in <script> tags. |
country_id | Unique country ID | Required |
api_key | Unique API key that is set in the control panel | This is optional key that can be set to limit unauthorized (accidental) access to your API |
Example request:
http://demo.abantecart.com/index.php?rt=a/common/zone&country_id=2
[ { "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" }, ... ]