GetEventFestival
Description
This service allows you to search any events in CBT. You can query specified area by sending a parameter "provinceName".
Request Header
Header
Description
Content-Type
application/json, text/json
Method
GET
Authorization
Bearer {Your CBT API key}
Accept-Language
Display language support: "th" or "en"
Parameter
Name
Type
Required
Description
geolocation
String
Require*
A GIS location of latitude and longitude in decimal degree. Latitude is between -90 to 90 and longitude is between -180 and 180. For example: "13.7222793,100.528923".
provinceName
String
Require*
Refer to province name in Thailand.
radius
Int
Optional
Define the distance (in meter) within latitude (Lat) and longitude (Lon) parameter. Default value is "100,000" meters and maximum value is "200,000" meters.
numberOfResult
Int
Optional
Number of record to return per/page. Default value is "20" and Maximum value is "100".
pageNumber
Int
Optional
Number of Page. Default value is "1".
startDate
String
Optional
Start date of the event.
endDate
String
Optional
End date of the event.
*Required parameters must be assigned at least one value.
Status Codes
Status Codes
Description
200 OK
Request successful
400 Bad Request
Problem with the request
401 Unauthorized
Valid API Key is not specified
403 Forbidden
Not authorized to access the resource
404 Not Found
No result found for the query
405 Method Not Allowed
A request method is not supported for the requested resource
500 Internal Server Error
Error on the internal server
Response Body
Name
Type
Description
API Reference
Input
Output
Sample
https://cbtthailand.dasta.or.th/CBTAPI/Eventfestival/GetEventfestival?geolocation=13.456789,100.123456&radius=100000&numberOfresult=5&pageNumber=1
https://cbtthailand.dasta.or.th/CBTAPI/Eventfestival/GetEventfestival?numberOfresult=150&pageNumber=1&provinceName=กระบี่