Chilkat Online Tools

Unicode C++ / ORACLE Hospitality OPERA Cloud REST API Workflows / 19. Check-Out - postCheckout

Back to Collection Items

void ChilkatSample(void)
    {
    json.UpdateInt(L"reservation.reservationIdList.id",123);    json.UpdateString(L"reservation.reservationIdList.type",L"Reservation");    json.UpdateBool(L"reservation.stopCheckout",false);    json.UpdateInt(L"reservation.cashierId",3);    json.UpdateString(L"reservation.hotelId",L"{{HotelId}}");    json.UpdateString(L"reservation.eventType",L"CheckOut");    json.UpdateBool(L"reservation.autoCheckout",false);    json.UpdateString(L"reservation.checkoutInstr.roomStatus",L"Dirty");    json.UpdateBool(L"reservation.checkoutInstr.ignoreWarnings",true);    json.UpdateBool(L"verificationOnly",false);    http.put_AuthToken(L"<access_token>");
    }

Curl Command

curl -X POST
	-H "Authorization: Bearer <access_token>"
	-H "Content-Type: application/json"
	-H "x-hotelid: {{HotelId}}"
	-H "x-app-key: {{AppKey}}"
	-d '{
  "reservation": {
    "reservationIdList": {
      "id": {{ReservationId}},
      "type": "Reservation"
    },
    "stopCheckout": false,
    "cashierId": 3,
    "hotelId": "{{HotelId}}",
    "eventType": "CheckOut",
    "autoCheckout": false,
    "checkoutInstr": {
      "roomStatus": "Dirty",
      "ignoreWarnings": true
    }
  },
  "verificationOnly": false
}'
https://domain.com/csh/v0/hotels/{{HotelId}}/reservations/{{ReservationId}}/checkOuts

Postman Collection Item JSON

{
  "name": "19. Check-Out - postCheckout",
  "request": {
    "auth": {
      "type": "bearer",
      "bearer": [
        {
          "key": "token",
          "value": "{{Token}}",
          "type": "string"
        }
      ]
    },
    "method": "POST",
    "header": [
      {
        "key": "Content-Type",
        "name": "Content-Type",
        "type": "text",
        "value": "application/json"
      },
      {
        "key": "x-hotelid",
        "type": "text",
        "value": "{{HotelId}}"
      },
      {
        "key": "x-app-key",
        "value": "{{AppKey}}",
        "type": "text"
      }
    ],
    "body": {
      "mode": "raw",
      "raw": "{\r\n  \"reservation\": {\r\n    \"reservationIdList\": {\r\n      \"id\": {{ReservationId}},\r\n      \"type\": \"Reservation\"\r\n    },\r\n    \"stopCheckout\": false,\r\n    \"cashierId\": 3,\r\n    \"hotelId\": \"{{HotelId}}\",\r\n    \"eventType\": \"CheckOut\",\r\n    \"autoCheckout\": false,\r\n    \"checkoutInstr\": {\r\n      \"roomStatus\": \"Dirty\",\r\n      \"ignoreWarnings\": true\r\n    }\r\n  },\r\n  \"verificationOnly\": false\r\n}",
      "options": {
        "raw": {
          "language": "json"
        }
      }
    },
    "url": {
      "raw": "{{HostName}}/csh/v0/hotels/{{HotelId}}/reservations/{{ReservationId}}/checkOuts",
      "host": [
        "{{HostName}}"
      ],
      "path": [
        "csh",
        "v0",
        "hotels",
        "{{HotelId}}",
        "reservations",
        "{{ReservationId}}",
        "checkOuts"
      ]
    }
  },
  "response": [
  ]
}