For Guest Profile, Guest Check-in, Room-Ready, Guest Check-Out and similar use-cases, the Contact and Contact Event integration points are used to tell Loop about a specific Contact and to trigger behaviour (respectively) based on events in that Contact's journey.
Contact
Insert a new or Update a current Contact of an account. The result of the call will be JSON containing a status and unique identifier for the Contact record.
No workflow rules are triggered based on this activity - please see ContactEvent for triggering specific events.
POST /api/<version>/Contact
DELETE /api/<version>/Contact
The request body shall be a JSON object containing the following fields (except for version which is in the URL):
Insert a Keyed Contact: Example
$ curl -i -X POST -HContent-type:application/json --data '{
"foreignId":"abc123",
"locationId":"529652b0121d5fa206011a79",
"firstname":"Rick",
"lastname":"Sanchez",
"email":"rs@abc.com",
"mobile":"16135551234",
"language":"en",
"arrivalTime":"2018-02-01T11:00:00.000Z",
"departureTime":"2018-02-04T13:15:00.000Z",
"checkedInStatus":"false",
"vipStatus":"Gold",
"groupName":"Rick&Morty",
"customFields": [
{"guestID": "188551"},
{"loyalty": "3883882"}
]
}' https://sunnyclear.blazeloop.net/api/v1/Contact?authToken=xxxx
Sample Response
{
"status":"Success",
"id":"4f1927a407caf1f0500002733"
}
Update a Keyed Contact: Example
$ curl -i -X POST -HContent-type:application/json --data '{
"foreignId":"abc123",
"checkedInStatus":"true",
"room":"4101",
"mobile":"16135551233"
}' https://sunnyclear.blazeloop.net/api/v1/Contact?authToken=xxxx
Sample Response
{
"status":"Success",
"id":"4f1927a407caf1f0500002733"
}
ContactEvent
Register an Event for a specific Contact, which will trigger workflow rules such as sending a welcome message. The result of the call will be JSON containing a status.
The request body shall be a JSON object containing the following fields (except for version which is in the URL):
ContactEvent by Reference: Example
$ curl -i -X POST -HContent-type:application/json --data '{
"event":"checkin",
"foreignId":"abc123"
}' https://sunnyclear.blazeloop.net/api/v1/ContactEvent?authToken=xxxx
$ curl -i -X POST -HContent-type:application/json --data '{
"Event":"checkout",
"contactId":"4f1927a407caf1f0500002733”
}' https://sunnyclear.blazeloop.net/api/v1/ContactEvent?authToken=xxxx
Sample Response
{
"status":"Success"
}
ContactEvent by Inclusion: Example
$ curl -i -X POST -HContent-type:application/json --data '{
"event":"roomready",
"foreignId":"abc123",
"location":"529652b0121d5fa206011a79",
"name":"Rick Sanchez",
"email":"rs@abc.com",
"mobile":"16135551234",
"language":"en",
"arrivalTime":"2018-02-01T11:00:00.000Z",
"departureTime":"2018-02-04T13:15:00.000Z",
"checkedInStatus":"false",
"vipStatus":"Gold",
"groupName":"Rick&Morty",
"customFields": [
{"guestID": "188551"},
{"loyalty": "3883882"}
]
}' https://sunnyclear.blazeloop.net/api/v1/ContactEvent?authToken=xxxx
Sample Response
{
"status":"Success"
}