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

ParameterMeaningNotes
callbackA JavaScript function to run when the response is receivedOptional 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_keyUnique API key that is set in the control panelThis 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]

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

ParameterMeaningNotes
callbackA JavaScript function to run when the response is receivedOptional 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_keyUnique API key that is set in the control panelThis 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

ParameterMeaningNotes
callbackA JavaScript function to run when the response is receivedOptional 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_idUnique country IDRequired
api_keyUnique API key that is set in the control panelThis 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

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"
   },
...
]