Regions
Regions
Section titled “Regions”GET /v1/regions
Section titled “GET /v1/regions”List regions.
curl -H "Authorization: Bearer $GISPH_API_KEY" "https://api.gis.ph/v1/regions?limit=50"Response (200):
{ "data": [ { "id": "reg_001", "name": "Luzon", "code": "LUZ" }, { "id": "reg_002", "name": "Visayas", "code": "VIS" } ]}GET /v1/regions/{region_id}
Section titled “GET /v1/regions/{region_id}”Retrieve a region by ID.
curl -H "Authorization: Bearer $GISPH_API_KEY" "https://api.gis.ph/v1/regions/reg_001"Response (200):
{ "id": "reg_001", "name": "Luzon", "code": "LUZ" }POST /v1/regions
Section titled “POST /v1/regions”Create a region.
Request payload:
{ "name": "Mindanao", "code": "MIN"}Example (curl):
curl -X POST -H "Authorization: Bearer $GISPH_API_KEY" \ -H "Content-Type: application/json" \ -d '{"name":"Mindanao","code":"MIN"}' \ "https://api.gis.ph/v1/regions"Response (201):
{ "id": "reg_003", "name": "Mindanao", "code": "MIN" }