Tasks

Created by Piyush Mutha, Modified on Wed, 29 May, 2024 at 6:26 PM by Piyush Mutha

1. Use the below cURL request to get the list of hotels in the group

curl --location 'https://hopr.roomchecking.com/external-api/Hotel/GetListOfHotels?hotelGroupKey=barriere' \

--header 'Content-Type: application/json' \

--header 'ClientId: {{ClientId}}' \

--header 'ClientKey: {{ClientKey}}'


2. Use the below cURL request to fetch Assets

curl --location 'https://hopr.roomchecking.com/external-api/Asset/GetListOfAssets' \

--header 'Content-Type: application/json' \

--header 'ClientId: {{ClientId}}' \

--header 'ClientKey: {{ClientKey}}'

--data '{

"hotelGroupKey": "barriere",

"hotelId": "61dd4676e8ee0b0014f83783" //Get the hotelId from Request 1

}'


3. Use the below cURL request to fetch all the tasks

curl --location 'https://hopr.roomchecking.com/external-api/Task/GetAllTasks' \

--header 'Content-Type: application/json' \

--header 'ClientId: {{ClientId}}' \

--header 'ClientKey: {{ClientKey}}'

--data '{

"hotelGroupKey": "barriere",

"hotelId": "61dd4676e8ee0b0014f83783",

"loadOnlyLastMonth": true //True to fetch tasks from last month

}'


4. Use the below cURL to create a task

curl --location 'https://hopr.roomchecking.com/external-api/Task/Create' \

--header 'Content-Type: application/json' \

--header 'ClientId: {{ClientId}}' \

--header 'ClientKey: {{ClientKey}}'

--data '{

"hotelGroupKey": "barriere",

"hotelId": "61dd4676e8ee0b0014f83783",

"roomName": "string", //Room Name or ReservationId

"reservationId": "string", //Room Name or ReservationId

"userId": "string", //Optional to assign to a specific user

"assetActions": [

{

"assetQuantity": 0,

"assetId": "string", //Get from Request 2 (assetId or assetName)

"assetName": "string", //Get from Request 2 (assetId or assetName)

"actionId": "string", //Get from Request 2 (actionId or actionName)

"actionName": "string" //Get from Request 2 (actionId or actionName)

}

],

"requestedBy": "string", //Put your login name ({{ClientId}})

"comment": "string", //Optional comment

"credits": 0, //Optional

"isForPlannedAttendant": true,

"isGuestRequest": true,

"price": 0,

"priorityKey": "string",

"startsAt": "2024-05-03T18:21:48.554Z", //Optional, specify when the task starts

"useDefaultAssignedUser": true

}'


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article