GET zone/zones

Returns all zones including their codes and coordinates.

Resource URL

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

Parameters

No parameters needed.

Response Fields

Parameter Description
states List all states within Malaysia.

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/states.json

Example Result

{
    "states": [
        "Johor",
        "Kedah",
        "Kelantan",
        "Melaka",
        "Negeri Sembilan",
        "Pahang",
        "Perak",
        "Perlis",
        "Pulau Pinang",
        "Sabah",
        "Sarawak",
        "Selangor",
        "Terengganu",
        "Putrajaya",
        "Kuala Lumpur",
        "Labuan"
    ]
}