Skip to content

Services API

ardeearam edited this page Nov 7, 2014 · 19 revisions

/services

The Special Services API is a publicly-accessible API. This means that the user need not be authenticated to be able to access the API's in this module.

This is inteded to be a general-purpose utility API, to make store front development faster, easier, and more standardized.

Related Development Tools

  • gcore-services.js - A thin JavaScript helper to have any location-related dropdowns lookup to the GCore Services API. See guides below on and off you go in 3 minutes.

How do I populate an empty dropdown with provinces?

How do I populate an empty dropdown with provinces, with cities on another dropdown?

GET /services/countries

Request

GET /services/countries HTTP/1.1
Host: api.gcore.galoretv.com
Accept: application/json

Response

HTTP/1.1 200 OK
x-GCore-Version: 0.99
[
    {
        "country_id": 93,
        "latitude": null,
        "longitude": null,
        "name": "Afghanistan"
    },
    {
        "country_id": 0,
        "dial_code": 93,
        "iso2_code": "AF",
        "iso3_code": "AFG",
        "latitude": null,
        "lbc_ib_zone": "G",
        "lbc_ob_zone": "G",
        "lbc_transit_time": 4,
        "longitude": null,
        "name": "Afghanistan",
        "numeric_code": 4
    },
...
]

GET /services/provinces/country_id/[country_id]

URL Parameters

  • country_id - The associated country code of a particular country.

Request

GET /services/provinces/country_id/63 HTTP/1.1
Host: api.gcore.galoretv.com
Accept: application/json

Response

HTTP/1.1 200 OK
x-GCore-Version: 0.99
[
    {
        "country_id": 63,
        "latitude": 17.5833,
        "longitude": 120.75,
        "name": "Abra",
        "province_id": "ABRA"
    },
    {
        "country_id": 63,
        "latitude": 9.1667,
        "longitude": 125.5,
        "name": "Agusan del Norte",
        "province_id": "AGUSANDELNORTE"
    },
...
]

GET /services/cities/province_id/[province_id]

URL Parameters

Request

Response

GET /services/barangays/city_id/[city_id]

URL Parameters

Request

Response

Clone this wiki locally