Back to Collection Items
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
loHttp = createobject("CkHttp")
loQueryParams = createobject("CkJsonObject")
loQueryParams.UpdateString("includeInactiveFlag","false")
loHttp.SetRequestHeader("x-app-key","{{AppKey}}")
loHttp.SetRequestHeader("x-hotelid","{{HotelId}}")
// Adds the "Authorization: Bearer <access_token>" header.
loHttp.AuthToken = "<access_token>"
loResp = loHttp.QuickRequestParams("GET","https://domain.com/lov/v1/listOfValues/hotels/{{HotelId}}/space/BALLROOM/eventRateCode",loQueryParams)
if (loHttp.LastMethodSuccess = .F.) then
? loHttp.LastErrorText
release loHttp
release loQueryParams
return
endif
? str(loResp.StatusCode)
? loResp.BodyStr
release loResp
release loHttp
release loQueryParams
Curl Command
curl -G -d "includeInactiveFlag=false"
-H "Authorization: Bearer <access_token>"
-H "x-app-key: {{AppKey}}"
-H "x-hotelid: {{HotelId}}"
https://domain.com/lov/v1/listOfValues/hotels/{{HotelId}}/space/BALLROOM/eventRateCode
Postman Collection Item JSON
{
"name": "Search for rental codes",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{Token}}",
"type": "string"
}
]
},
"method": "GET",
"header": [
{
"key": "x-app-key",
"type": "text",
"value": "{{AppKey}}"
},
{
"key": "x-hotelid",
"type": "text",
"value": "{{HotelId}}"
}
],
"url": {
"raw": "{{HostName}}/lov/v1/listOfValues/hotels/{{HotelId}}/space/BALLROOM/eventRateCode?includeInactiveFlag=false",
"host": [
"{{HostName}}"
],
"path": [
"lov",
"v1",
"listOfValues",
"hotels",
"{{HotelId}}",
"space",
"BALLROOM",
"eventRateCode"
],
"query": [
{
"key": "includeInactiveFlag",
"value": "false"
}
]
},
"description": "(using Function Space from previous operation)"
},
"response": [
]
}