Skip to content

Data Presentation

API Design

The JSON field definitions for the "Have Something to Say" page are as follows, and developers only need to follow these specifications during development. The complete JSON format for each page is provided below.

/citizen-report

Hot Report Data

JSON
"data": {
  "hot_report": [
    {
      "id": "R-1",
      "name": "教育事務",
      "icon": "/images/report/report-transport.svg"
    },
    {
      "id": "R-2",
      "name": "公車、計程車、復康巴士問題",
      "icon": "/images/report/report-building.svg"
    },
    {
      "id": "R-3",
      "name": "停車管理及收費問題",
      "icon": "/images/report/report-transport.svg"
    },
    {
      "id": "R-4",
      "name": "建築物使用管理、違建查報及拆除",
      "icon": "/images/report/report-building.svg"
    },
    {
      "id": "R-11",
      "name": "教育事務",
      "icon": "/images/report/report-transport.svg"
    },
    {
      "id": "R-12",
      "name": "公車、計程車、復康巴士問題",
      "icon": "/images/report/report-building.svg"
    },
    {
      "id": "R-13",
      "name": "停車管理及收費問題",
      "icon": "/images/report/report-transport.svg"
    },
    {
      "id": "R-14",
      "name": "建築物使用管理、違建查報及拆除",
      "icon": "/images/report/report-building.svg"
    },
    {
      "id": "R-15",
      "name": "教育事務",
      "icon": "/images/report/report-transport.svg"
    },
    {
      "id": "R-16",
      "name": "公車、計程車、復康巴士問題",
      "icon": "/images/report/report-building.svg"
    }
  ],
}

Progress Search Data

JSON
{
  "data": {
    "1999": [
      {
        "id": "A10-1130930-00160",
        "title": "公車、計程車、復康巴士問題",
        "date": "2024/09/28 15:55:57",
        "status": "處理中"
      },
      {
        "id": "A10-1130930-00161",
        "title": "建築物使用管理、違建查報及拆除",
        "date": "2024/10/28 15:55:57",
        "status": "處理完成"
      },
      {
        "id": "A10-1130930-00162",
        "title": "停車管理及收費問題",
        "date": "2024/11/28 15:55:57",
        "status": "處理中"
      }
    ],
    "disaster": []
  }
}

Data Field Description - Hot Report

FieldPurposeExample
hot_reportHot reporting itemsRefer to hot_report
hot_report
FieldPurposeExample
idReporting item IDR-16
nameReporting item name公車、計程車、復康巴士問題
iconIcon URL for the reporting item (if you want to keep the icon locally, place it in the public folder)/images/report/report-building.svg

Data Field Description - Progress Inquiry

FieldPurposeExample
1999Items belonging to the 1999 reporting categoryRefer to 1999
disasterItems belonging to the disaster reporting categoryData format is the same as 1999, refer to 1999
1999
FieldPurposeExample
idReporting item IDA10-1130930-00160
titleReporting item name公車、計程車、復康巴士問題
dateReporting date2024/11/28 15:55:57
statusProcessing status處理完成 (if progress is finished, it is called 處理完成)

/citizen-report/list

All Reporting Item Data

JSON
{
  "data": {
    "all_report": [
      {
        "id": "CR-1",
        "name": "垃圾、噪音、汙染及資源回收",
        "icon": "/images/report/report-env.svg",
        "service_requesting": [
          {
            "id": "R-5",
            "name": "道路散落物或油漬處理"
          },
          {
            "id": "R-6",
            "name": "汙染舉發"
          }
        ],
        "problem_reporting": [
          {
            "id": "R-7",
            "name": "無牌廢棄車、廢物誤觸理(含醫療廢棄物)及資源回收"
          },
          {
            "id": "R-8",
            "name": "有牌廢棄車"
          }
        ]
      },
      {
        "id": "CR-2",
        "name": "文教、體育、資訊、觀光及媒體",
        "icon": "/images/report/report-env.svg",
        "service_requesting": [],
        "problem_reporting": [
          {
            "id": "R-9",
            "name": "文化事務(樹木保護、文化資產、表演藝術、文化場館、藝文推廣)"
          },
          {
            "id": "R-1",
            "name": "教育事務(校園、教師、幼兒園、圖書館、補教業)"
          }
        ]
      }
    ]
  }
}

Data Field Description - All Reporting Items

FieldPurposeExample
all_reportAll reporting itemsRefer to all_report
all_report
FieldPurposeExample
idReporting item category IDCR-2
nameReporting item category name文教、體育、資訊、觀光及媒體
iconIcon URL for the reporting item category (if you want to host the icon locally, place it in the public folder)/images/report/report-env.svg
service_requestingReporting items that require immediate assistanceRefer to service_requesting
problem_reportingReporting items for public grievancesThe data format is the same as service_requesting, refer to service_requesting
service_requesting
FieldPurposeExample
idReporting item IDR-9
nameReporting item name文化事務(樹木保護、文化資產、表演藝術、文化場館、藝文推廣)

/citizen-report/search-detail/:id

Progress inquiry detailed information; here you need to use the id from the URL params to request the corresponding detailed information from the API. First, look at the expected data example.

JSON
{
  "data": {
    "status": "處理完成",
    "reply": {
      "from": {
        "agency": "文化局",
        "date": "2024/09/30 15:32:23"
      },
      "content": "AABBCCDDEEFFF"
    },
    "detail": {
      "case_title": "主旨主旨主旨",
      "case_id": "A10-1130930-00160",
      "acceptance_time": "2024/09/28 15:55:57",
      "category": "文教、體育、資訊、觀光及媒體-文化事務(樹木保護、文化資產、表演藝術、文化場館、藝文推廣)",
      "agency": "文化局",
      "expected_time": "2024/10/09",
      "actual_time": "2024/09/30",
      "content": "1234567890"
    }
  }
}

Data Field Description - Progress Inquiry Details

FieldPurposeExample
statusProcessing status處理完成
replyResponse from the relevant unitRefer to reply
detailDetailed content of the reporting itemRefer to detail
reply
FieldPurposeExample
fromWhich unit the reply is fromRefer to from
contentContent of the replyAABBCCDDEEFFF
from
FieldPurposeExample
agencyReplying unit文化局
dateReply time2024/09/30 15:32:23
detail
FieldPurposeExample
case_titleReporting subject主旨主旨主旨
case_idReporting case numberA10-1130930-00160
acceptance_timeAcceptance time2024/09/28 15:55:57
categoryReporting case category文教、體育、資訊、觀光及媒體-文化事務(樹木保護、文化資產、表演藝術、文化場館、藝文推廣)
agencyResponsible authority文化局
expected_timeExpected completion time2024/10/09
actual_timeActual completion time2024/09/30
contentSpecific content of the report1234567890