Consume

The Event Consume endpoint allows you to set the state of attendance to booked, absent, or attended. See the table below about the various states.

The Event Consume endpoint will enable integrations where attendance is managed through a different mechanism i.e. not the built-in check-in. This can be useful if your classroom or event activities need additional communication, access codes, or tickets.

Attendance States

States

booked The user is registered for the event.

attended

The user has attended the event.

absent

The user was absent at the event/did not attend.

Consuming Attendance

In order to consume attendance, you will need to retrieve the attendance guid. This can either be done via the event list endpoint or automatically via event webhooks. The consume endpoint allows you to set the attendance state for single or multiple users.

WebhooksList

Parameters

Key

Type

guids

Array. A list of GUIDs.

state

String. The state to set the attendance to.

curl -X POST \
  v1/rewards/consume \
  -H 'Authorization: Basic <Your Base64 Encoded Token>' \
  -d '{
	"guids" : ["3bf56525-d5ad-4f39-88b3-0cdcd0bfc7dc",...etc],
	"state" : "attended"
}'

Success Response

The response will contain how many attendees have a changed state. Attendees will only change their state if the current state does not match the new state.

{
    "status": "success",
    "data": {
        "changed": 5
    },
    "hash": "dfdfac8d5493733dfab6d24c599785ba",
    "response_time": 0.11311697959899902
}

Last updated