GET zone/grouped

Returns grouped locations based on prayer time zones provided by Jakim .

Resource URL

http://kayrules.com/zone/grouped.json

Parameters

Parameter Remark Description
state Optional The state within Malaysia.
Input: Johor / Kedah / Kelantan / Melaka / Negeri Sembilan / Pahang / Perak / Perlis / Pulau Pinang / Sabah / Sarawak / Selangor / Terengganu / Putrajaya / Kuala Lumpur / Labuan.
zone Optional The location code based on prayer time zones provided by Jakim.
Input: Refer to zone codes here.
pre Optional Show result in preformatted text enclosed with <pre> tags.
Input: true / false
Default: false

Response Fields

Parameter Description
states List all states within Malaysia based on selected `state` filter.
results

Information based on the selected zone.

zone The location code based on prayer time zones provided by Jakim.
Input: Refer to zone codes here.
negeri List of states within Malaysia.
lokasi List of locations identified by Jakim for which having similar prayer timezone.

Exception Fields

Parameter Description
error_code Return error code `400` for any error occured.
error_type Error types either REQUIRED_FIELD, INVALID_ZONE, LIMIT_EXCEEDED or COMPLEX_ERROR
error_desc

Show error description based on table below

REQUIRED_FIELD Missing Required field.
INVALID_ZONE Invalid zone code given.
LIMIT_EXCEEDED Maximum limit of 365 queries exceeded.
COMPLEX_ERROR Complex error has occured.

Example Request

http://kayrules.com/zone/grouped.json?state=selangor&zone=sgr01

Example Result

{
    "states": [
        "Selangor"
    ],
    "results": [
        {
            "zone": "SGR01",
            "negeri": "Selangor",
            "lokasi": "Gombak,Hulu Selangor,Rawang,Hulu Langat,Sepang,Petaling Jaya,Shah Alam"
        }
    ]
}