Versionen im Vergleich

Schlüssel

  • Diese Zeile wurde hinzugefügt.
  • Diese Zeile wurde entfernt.
  • Formatierung wurde geändert.

...

Codeblock
POST /requests?type=guestRequest
{
    "title":"Extra towel in room #404",
    "content":{
        "Comment of guest":"Please in XL"
    },
    "link":"https://hotelkit.net/demo/123", //link to partners details
    "referenceID":"123",
    "actions":[
        {
            "type":"dodecline",
            "label":"DoDecline",
            "labelDone":"DoneDeclined",
            "labelType":"successerror",
            "isDone":true,
        },     "information":{
   {             "typetext":"decline",{
               "label":"Decline",     "required":true,
       "labelDone":"Declined",             "labelTypetype":"errortext",
            "isDone":true,             "informationlabel":{"Reason"
                }
"text":{            }
        "required":true}, 
        {
            "type":"textaccept",
            "label":"Accept",
            "labellabelDone":"ReasonAccepted",
            "labelType":"success",
   }         "isDone":true
   }         },
    ]
}

Getting Status Changes

The customer may now trigger an action with the buttons “Do” and “Accept” or “Decline”. As “Decline” requests some more information (text), it will be triggered for documentation purposes.
As soon as a button is pushed, a request to the webhook is triggered:

...

If the status change was handled by the partner a 200 response must be sent to finish the synchronization. If there are no follow up actions available, there is no payload.

Follow up actions means that there are new possible states for the request.
The follow up actions will be returned in the response:

Codeblock
> 200 OK
{
    "actions":[
        {
            "type":"reopen",
            "label":"Reopen",
            "labelDone":"Open",
            "labelType":"error",
            "isDone":false,
            "information":{
                "text":{
                    "required":true,
                    "type":"text",
                    "label":"Reson for reopening"
                }
            }
        }
    ]
}

More Details on cinfigurations of actions can be found in the previous chapter Status Management