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")
loHttp.SetRequestHeader("x-app-key","{{AppKey}}")
loHttp.SetRequestHeader("x-hotelid","{{HotelId}}")
// Adds the "Authorization: Bearer <access_token>" header.
loHttp.AuthToken = "<access_token>"
loResp = loHttp.QuickRequest("DELETE","https://domain.com/rsv/v0/hotels/{{HotelId}}/reservations/{{ReservationId}}/upsell")
if (loHttp.LastMethodSuccess = .F.) then
? loHttp.LastErrorText
release loHttp
return
endif
? str(loResp.StatusCode)
? loResp.BodyStr
release loResp
release loHttp
Curl Command
curl -X DELETE
-H "Authorization: Bearer <access_token>"
-H "x-hotelid: {{HotelId}}"
-H "x-app-key: {{AppKey}}"
https://domain.com/rsv/v0/hotels/{{HotelId}}/reservations/{{ReservationId}}/upsell
Postman Collection Item JSON
{
"name": "Remove an upsell from a reservation",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{Token}}",
"type": "string"
}
]
},
"method": "DELETE",
"header": [
{
"key": "x-hotelid",
"value": "{{HotelId}}",
"type": "text"
},
{
"key": "x-app-key",
"value": "{{AppKey}}",
"type": "text"
}
],
"url": {
"raw": "{{HostName}}/rsv/v0/hotels/{{HotelId}}/reservations/{{ReservationId}}/upsell",
"host": [
"{{HostName}}"
],
"path": [
"rsv",
"v0",
"hotels",
"{{HotelId}}",
"reservations",
"{{ReservationId}}",
"upsell"
]
}
},
"response": [
]
}