TIH regularly enhances its APIs products to follow good API design practices and standards, with the aim to reduce complexity, improve the quality and consistency of the TIH APIs for developers.
A new version (v2) of all TIH APIs was released in October 2022 with the enhancements described in the following table and will replace the older versions of the APIs. The older API versions v1 and v1.1 will become non-functional and deprecated on October 31, 2023*
*This is an extension from the earlier deprecation date of April 30, 2023 to give businesses more time to make the necessary changes.
What you need to do:
- Assess the impact of the version changes for the APIs you're using in your application
- Modify/upgrade and test your application with the latest API version v2
- Deploy changes before the deprecation date.
Important Information:
Kindly ensure your application is updated to use the latest API version v2, before the deprecation date. This is to avoid your application to malfunction. For more information, you may refer to respective API pages for the latest documentation.
1. List of enhancements introduced in TIH APIs version 2:
a. Global Changes on TIH APIs
TIH API Breaking Changes | ||||
For content providers and users of TIH APIs | New Domain Name | Enhancement Changes:
Applicable for all TIH APIs(except Visit Singapore Account APIs). New domain name: api.stb.gov.sg Old domain name: tih-api.stb.gov.sg |
||
For content providers and users of TIH APIs | Changes to Request Header | Enhancement Changes
|
||
For content providers and users of TIH APIs | New API URL Endpoint | Enhancement Changes
Changes in URL endpoint in the updated version (v2) of TIH APIs, to follow a standardised service endpoint format. Refer to the table below for the respective v2 APIs pages on the updated URL endpoint.
|
||
TIH API Other Changes | ||||
For content providers and users of TIH APIs | Enhanced HTTP Status Response | Enhancement Changes
The structure of the HTTP status response is enhanced with the following fields, to provide more details on the error scenario for developers:
|
||
For content providers and users of TIH APIs | Changes to DateTime Format in API Response | Enhancement Changes
The datetime information in the API response is in UTC+8 (SGT) and following the format 'YYYY-MM-DD[T]hh:mm:ss+08:00’.
|
||
For content providers and users of TIH APIs | New HATEOAS Feature | Enhancement Changes
HATEOAS (Hypermedia as The Engine of Application State) is a component of the REST application architecture. With HATEOAS, application servers can provide information dynamically through links, provided to the clients and users, to improve interaction and discoverability of APIs.
The following HATEOS guidelines are introduced in the updated version (v2) of TIH APIs:
|
b. Specific Changes
TIH API Breaking Changes | ||||||
For content users of TIH APIs | New Pagination Method | APIs:
Enhancement Changes: Changes to the pagination method in the TIH APIs with pagination.
|
||||
For content users of TIH APIs | Changes to Sorting Request Parameters |
APIs:
Enhancement Changes: Changes to the sorting request parameters:
|
||||
For content users of TIH APIs | Changes to Search APIs |
APIs:
Enhancement Changes: Content User APIs & Deals User APIs
Media User APIs
|
||||
For content providers and users of TIH APIs | Changes to List Content & Media Content Types, Media Content and Autocomplete List APIs |
APIs:
Enhancement Changes: List Content Types APIs The following Content list<Category>Types APIs are merged into a single List Content Types API to retrieve the list of content types (or sub-categories) for each category. The merged API will have a new request parameter "category" which can have value [accommodation | attractions | bars_clubs | cruises | events | food_beverages | precincts | shops | tours | venues | walking_trails] to indicate the content category.
List Media Content Types APIs The following Media list<Category>Types APIs are merged into a single List Media Content Types API to retrieve the list of media content types (or sub-categories) for each category. The merged API will have a new request parameter "category" which can have value [accommodation | attractions | bars_clubs | cruises | events | food_beverages | precincts | shops | tours | venues | walking_trails] to indicate the media content category.
Content & Media - AutoComplete List By Type API The following two APIs are merged into a single AutoComplete List By Type API for both content and media. The merged API will have a new request parameter "searchResourceType" which can have values "content" or "media" to indicate the resource type to search.
|
||||
For content providers and users of TIH APIs | Changes to Fields in API Response |
APIs:
Enhancement Changes: All content categories:
Attractions, Shops, Bars & Clubs, Food & Beverages and Tours content category:
Attractions content category:
Cruises content category:
Events content category:
Precincts content category:
Tours content category:
Venues content category:
Search Company By Keyword API:
|
c. New API URL Endpoint
Changes in URL endpoint in the updated version (v2) of TIH APIs, to follow a standardised service endpoint format. Refer to the respective v2 APIs pages on the updated URL endpoint:
Updated v2 APIs | Old v1/v1.1 APIs |
Content User API (v2) | Content User API (v1) |
Content Provider API (v2) | Content Provider API (v1/v1.1) |
Deals User and Provider API (v2) | Deals User and Provider API (v1/v1.1) |
Media User API (v2) | Media User API (v1) |
Media Provider API (v2) | Media Provider API (v1) |
Enhanced Navigation Map API (v2) | Enhanced Navigation Map API (v1/v1.1) |
Itinerary Planner API (v2) | Itinerary Planner API (v1) |
Recommendation Engine API (v2) | Recommendation Engine API (v1) |
3rd Party Information Sources API (v2) | 3rd Party Information Sources API (v1) |
2. Cessation of 360 Image and 360 Video APIs
The following 360 Image and 360 Video APIs will be ceased and no longer available from 30 April 2023, without any API replacement:
- 360imageByUUID
- 360imageSearchByKeyword
- 360videoByUUID
- 360videoSearchByKeyword