Back to Collection Items
' This example assumes the Chilkat API to have been previously unlocked.
' See Global Unlock Sample for sample code.
Dim http As New ChilkatHttp
Dim success As Long
http.SetRequestHeader "x-app-key","{{AppKey}}"
http.SetRequestHeader "x-hotelid","{{HotelId}}"
' Adds the "Authorization: Bearer <access_token>" header.
http.AuthToken = "<access_token>"
Dim sbResponseBody As New ChilkatStringBuilder
success = http.QuickGetSb("https://domain.com/rsv/v1/hotels/{{HotelId}}/reservations/{{ReservationId}}/upsell",sbResponseBody)
If (success = 0) Then
Debug.Print http.LastErrorText
Exit Sub
End If
Debug.Print "Response status code = " & http.LastStatus
Debug.Print sbResponseBody.GetAsString()
Curl Command
curl -X GET
-H "Authorization: Bearer <access_token>"
-H "x-hotelid: {{HotelId}}"
-H "x-app-key: {{AppKey}}"
https://domain.com/rsv/v1/hotels/{{HotelId}}/reservations/{{ReservationId}}/upsell
Postman Collection Item JSON
{
"name": "Set if an upsell exists on a reservation",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{Token}}",
"type": "string"
}
]
},
"method": "GET",
"header": [
{
"key": "x-hotelid",
"value": "{{HotelId}}",
"type": "text"
},
{
"key": "x-app-key",
"value": "{{AppKey}}",
"type": "text"
}
],
"url": {
"raw": "{{HostName}}/rsv/v1/hotels/{{HotelId}}/reservations/{{ReservationId}}/upsell",
"host": [
"{{HostName}}"
],
"path": [
"rsv",
"v1",
"hotels",
"{{HotelId}}",
"reservations",
"{{ReservationId}}",
"upsell"
],
"query": [
{
"key": null,
"value": "889168",
"disabled": true
}
]
}
},
"response": [
]
}