Sun Ferry Services Company Limited

Sun Ferry ETA API specification and data dictionary

官方 PDF

PDF page 1

 Estimated time of arrivals of next ferry trip
                      Of
Sun Ferry Services Company Limited




      API Specification
      & Data Dictionary




                   Version 1.0
                   June 2021

PDF page 2

Estimated time of arrivals of next ferry trip

Document History


       Date                Revision                  Description of Change      Author
   30-06-2021                  1.0                           Initial release   IT Sun Ferry




Copyright © 2021 Sun Ferry Services Company Limited
(Incorporated in British Virgin Islands with limited liability).
All Rights Reserved.

PDF page 3

Estimated time of arrivals of next ferry trip




Table of Content
1     Introduction ................................................................................................................................... 1
2     API Base URL .................................................................................................................................. 1
3     ETA API ........................................................................................................................................... 2
4     Data Dictionary .............................................................................................................................. 4




Copyright © 2021 Sun Ferry Services Company Limited
(Incorporated in British Virgin Islands with limited liability).
All Rights Reserved.

PDF page 4

Estimated time of arrivals of next ferry trip




1 Introduction
The ETA API is a REST API provides estimated time of arrivals of next ferry trip of Sun Ferry in JSON
format. The Data Dictionary provides the information of the data fields involved, such as field name,
data type and field description.




2 API Base URL
https://www.sunferry.com.hk




Copyright © 2021 Sun Ferry Services Company Limited
(Incorporated in British Virgin Islands with limited liability).                         Page 1 of 8
All Rights Reserved.

PDF page 5

Estimated time of arrivals of next ferry trip




3 ETA API
Description: This API takes a route code and returns the estimated arrival time of next ferry trip.

HTTP Request:
 Endpoint                                    /eta/?route={route_code}
 HTTP Method                                 GET



 Parameter                Parameter Type           Description                        Required
 route_code               Path                     Route Code                          Y
                                                   Valid route code are:
                                                   CECC : Central - Cheung Chau
                                                   CCCE : Cheung Chau - Central
                                                   CEMW : Central - Mui Wo
                                                   MWCE : Mui Wo - Central
                                                   NPHH : North Point - Hung Hom
                                                   HHNP : Hung Hom - North Point
                                                   NPKC : North Point - Kowloon City
                                                   KCNP : Kowloon City - North Point
                                                   IIPECMUW : Peng Chau - Mui Wo
                                                   IIMUWPEC : Mui Wo - Peng Chau
                                                   IIMUWCMW : Mui Wo - Chi Ma Wan
                                                   IICMWMUW : Chi Ma Wan - Mui Wo
                                                   IICMWCHC : Chi Ma Wan - Cheung Chau
                                                   IICHCCMW : Cheung Chau - Chi Ma Wan
                                                   IICHCMUW : Cheung Chau - Mui Wo
                                                   IIMUWCHC : Mui Wo - Cheung Chau



Sample Request:
 /eta/?route=IIMUWCMW


HTTP Response:

Copyright © 2021 Sun Ferry Services Company Limited
(Incorporated in British Virgin Islands with limited liability).                           Page 2 of 8
All Rights Reserved.

PDF page 6

Estimated time of arrivals of next ferry trip

 Response format                                                   JSON


 Response Code                                                     Response
 200                                                               Success, see sample response below
 422                                                               Invalid route code
 500                                                               Internal server error



Sample Response:
 {

      type: "ETA",
      version: "1.0",
      generated_timestamp: "2021-02-22T11:39:02+08:00",
      data:

       [

         o    {
                   route_en: "Cheung Chau - Central",
                   route_tc: "長洲 - 中環",
                   route_sc: "长洲 - 中环",
                   vesselcode: "CHAO",
                   depart_time: "11:15",
                   eta: "12:05",
                   lat: "22.251367",
                   lng: "114.067817",
                   rmk_en: null,
                   rmk_tc: null,
                   rmk_sc: null,
                   date_timestamp: "2021-02-22T11:39:02+08:00",

              }

       ],

 }


Copyright © 2021 Sun Ferry Services Company Limited
(Incorporated in British Virgin Islands with limited liability).                                        Page 3 of 8
All Rights Reserved.

PDF page 7

Estimated time of arrivals of next ferry trip



4 Data Dictionary
Below is the list of data fields involved in the ETA API.


 Field Name           Data Type            Field Description       Field Definition (if   Example
                                                                   applicable)
 type                 String               The data type of        “ETA” : Estimated      type: "ETA",
                                           the JSON                time of arrival of
                                           returned                departed ferry trip
 version              String               The version             The version number     "version": "1.0"
                                           number of the           in major and minor
                                           JSON returned.          versioning format.
 generated_ti         String               The timestamp of Date time with time           "generated_timestamp ":
 mestamp                                   the initial       zone in ISO 8601             "2021-03-
                                           generated time of format.                      28T13:28:00+08:00"
                                           the response
                                           before it is
                                           cached.
 data                 Object Array         An array of object      The object consists    "data":[
                                           of the data             of the following            {
                                           requested. Each         fields:                           "route_en":
                                           object represents       route_en                          "Central to
                                           an estimated                                              Cheung Chau",
                                           time of arrival.        route_tc                          "route_tc": "中環
                                                                                                     往長洲",
                                                                   route_sc                          "route_sc": "中环
                                                                                                     往长洲",
                                                                   vesselcode                        " vesselcode ":
                                                                                                     "FF8",
                                                                   depart_time                       "depart_time":
                                                                                                     "16:15",
                                                                   eta                               "eta": "2021-03-
                                                                                                     28T17:15:00+08:0
                                                                   rmk_en                            0",
                                                                   rmk_tc                            "rmk_en":"[]",
                                                                   rmk_sc                            "rmk_tc":"[]"
Copyright © 2021 Sun Ferry Services Company Limited
(Incorporated in British Virgin Islands with limited liability).                                      Page 4 of 8
All Rights Reserved.

PDF page 8

Estimated time of arrivals of next ferry trip

                                                                   data_timestamp                 "rmk_sc":"[]"
                                                                                                  "data_timestamp"
                                                                                                  : "2020-10-
                                                                                                  12T16:28:00+08:0
                                                                                                  0"
                                                                                             }
                                                                                         ]
 route_en             String               The sailing route       Possible values:      "route_en": "Central to
                                           of the scheduled         "Central to         Cheung Chau",
                                           departure in                 Cheung Chau"
                                           English.                 "Cheung Chau
                                                                        to Central"
                                                                    "Central to Mui
                                                                        Wo"
                                                                    "Mui Wo to
                                                                   Central"
                                                                    "Inter Islands
                                                                        (Peng Chau -
                                                                        Mui Wo)"
                                                                    "Inter Islands
                                                                        (Mui Wo - Peng
                                                                        Chau)"
                                                                    "Inter Islands
                                                                        (Mui Wo - Chi
                                                                        Ma Wan)"
                                                                    "Inter Islands
                                                                        (Chi Ma Wan -
                                                                        Mui Wo)"
                                                                    "Inter Islands
                                                                        (Chi Ma Wan -
                                                                        Cheung Chau)"
                                                                    "Inter Islands
                                                                        (Cheung Chau -
                                                                        Chi Ma Wan)"
                                                                    "Inter Islands
                                                                        (Cheung Chau -
                                                                        Mui Wo)"

Copyright © 2021 Sun Ferry Services Company Limited
(Incorporated in British Virgin Islands with limited liability).                                    Page 5 of 8
All Rights Reserved.

PDF page 9

Estimated time of arrivals of next ferry trip

                                                                      "Mui Wo to
                                                                       Cheung Chau"
                                                                      "North Point to
                                                                       Hung Hom"
                                                                      "Hung Hom to
                                                                       North Point"
                                                                      "North Point to
                                                                       Kowloon City"
                                                                      "Kowloon City
                                                                       to North Point"


 route_tc             String               The sailing route       Possible values:      "route_tc": "中環往長洲"
                                           of the scheduled         "中環 - 長洲"
                                           departure in             "長洲 - 中環"
                                           Simplified.              "中環 - 梅窩"
                                                                    "梅窩 - 中環"
                                                                    "橫水渡 - (坪
                                                                        洲-梅窩)"
                                                                    "橫水渡 - (梅
                                                                        窩-坪洲)"
                                                                    "橫水渡 - (梅
                                                                        窩-芝麻灣)"
                                                                    "橫水渡 - (芝
                                                                        麻灣-梅窩)"
                                                                    "橫水渡 - (芝
                                                                        麻灣-長洲)"
                                                                    "橫水渡 - (長
                                                                        洲-芝麻灣)"
                                                                    "橫水渡 - (長
                                                                        洲-梅窩)"
                                                                    "橫水渡 - (梅
                                                                        窩-長洲) "
                                                                    "北角 - 紅磡"
                                                                    "紅磡 - 北角"
                                                                    "北角 - 九龍
                                                                        城"
                                                                    "九龍城 - 北

Copyright © 2021 Sun Ferry Services Company Limited
(Incorporated in British Virgin Islands with limited liability).                                 Page 6 of 8
All Rights Reserved.

PDF page 10

Estimated time of arrivals of next ferry trip

                                                                        角"


 route_sc             String               The sailing route       Possible values:      "route_sc": "中环往长洲"
                                           of the scheduled            "中环 - 长洲"
                                           departure in                "长洲 - 中环"
                                           Traditional                 "中环 - 梅窝"
                                           Chinese.                    "梅窝 - 中环"
                                                                       "横水渡 - (坪
                                                                        洲-梅窝)"
                                                                       "横水渡 - (梅
                                                                        窝-坪洲)"
                                                                       "横水渡 - (梅
                                                                        窝-芝麻湾)"
                                                                       "横水渡 - (芝
                                                                        麻湾-梅窝)"
                                                                       "横水渡 - (芝
                                                                        麻湾-长洲)"
                                                                       "横水渡 - (长
                                                                        洲-芝麻湾)"
                                                                       "横水渡 - (长
                                                                        洲-梅窝)"
                                                                       "横水渡 - (梅
                                                                        窝-长洲) "
                                                                       "北角 - 红磡"
                                                                       "红磡 - 北角"
                                                                       "北角 - 九龙
                                                                        城"
                                                                       "九龙城 - 北
                                                                        角"


 Vesselcode           String               The code of
                                           vessel deployed
                                           for the schedule
 depart_time          String               Scheduled               24 Hours based time   "depart_time": "16:15"
                                           Departure Time          format
 eta                  String               The timestamp of        Date time with time   "eta": "2021-03-
                                           the estimated           zone in               28T17:15:00+08:00"

Copyright © 2021 Sun Ferry Services Company Limited
(Incorporated in British Virgin Islands with limited liability).                                   Page 7 of 8
All Rights Reserved.

PDF page 11

Estimated time of arrivals of next ferry trip

                                           time of arrival of      ISO 8601 format.
                                           the scheduled
                                           departure
 rmk_en               String               Remark of an ETA
                                           in English.
 rmk_tc               String               Remark of an ETA
                                           in Simplified
                                           Chinese.
 rmk_sc               String               Remark of an ETA
                                           in Traditional
                                           Chinese.
 data_timesta         String               The timestamp of Date time with time       "data_timestamp": "2020-
 mp                                        the initial       zone in                  10-12T16:28:00+08:00"
                                           generated time of ISO 8601 format.
                                           the object.




Copyright © 2021 Sun Ferry Services Company Limited
(Incorporated in British Virgin Islands with limited liability).                                Page 8 of 8
All Rights Reserved.
相關資料集
其他格式

Markdown · 詮釋資料 JSON

擷取文字;版面及圖表請參閱官方 PDF。

來源及使用條款

Publisher listed by DATA.GOV.HK: Sun Ferry Services Company Limited. Follow the original source PDF linked on this record.

Locate an applicable current public-reuse notice or obtain publisher clarification for the exact documentation; retain metadata and official source references in the meantime.

Publisher-independent publication is the user's editorial instruction. Recorded publisher classifications do not determine selection. It does not establish per-document legal clearance or a publisher permission grant.

No publisher-wide copyright or document-specific reuse scope has been established.

Official source PDF remains authoritative. Automatic extraction can omit or misformat content.

Source PDF SHA-256: ea046d34e14ad1d9216efbee92173199d391a673609423d996465671148320fe.

Publisher listed by DATA.GOV.HK and original source PDF are identified on this copy. Publisher listing does not establish authorship.

Rights in the original source material remain with its rights holders. Editorial selection does not establish a publisher permission grant or per-document legal clearance. Consult the original PDF and recorded terms.

This is a Markdown text conversion with formatting changes. The official source PDF remains authoritative. No provider endorsement is claimed.

This copy supports noncommercial educational reference to help readers understand and use upstream schemas and APIs. This project purpose does not restrict rights granted by the provider licence.

Reuse evidence