Check-in provides a paginated API to retrieve the list of access control records for your event.
Start with page=1 and paginate every 500 access control records.
If you need to know the total number of access control records for your event, call:
GET /api/v1/events/{id}.format
and check the check_in_count property.
JSON
Request
GET /api/v1/events/{event_id}/access_controls.json?page=1&auth_token=YOUR_API_TOKENResponse
// 200 OK
[
{
"_id": "{id}",
// When did the access control take place? (UTC, use event.timezone for display purposes) "access_stamp": "2012-11-26T15:44:44+01:00",
// The UID found in the scanned QR code. Note that guest.uid != guest.id "guest_uid": "68vju8yxgl",
// ACCESS_GRANTED = 0, GUEST_UNKNOWN = 1, NOT_AUTHORIZED = 2, TOO_MANY_CHECK_INS = 3 "access_status": 0,
// The access point where the access control took place "accesspoint_id": "{check_in_point_id}",
"event_id": "{event_id}",
"created_at": "2012-11-26T15:44:44+01:00",
"updated_at": "2012-11-26T15:44:44+01:00"
},
{
"_id": "{id}",
"access_stamp": "2012-11-26T15:44:44+01:00",
"guest_uid": "5ch0b30mnc",
"access_status": 0,
"accesspoint_id": "{check_in_point_id}",
"event_id": "{event_id}",
"created_at": "2012-11-26T15:44:44+01:00",
"updated_at": "2012-11-26T15:44:44+01:00"
},
// ...
]
XML
Request
GET /api/v1/events/{event_id}/access_controls.xml?page=1&auth_token=YOUR_API_TOKENResponse
<!-- 200 OK -->
<?xml version="1.0" encoding="UTF-8"?>
<access-controls type="array">
<access-control>
<_id>{id}</_id>
<access-stamp type="datetime">2012-11-26T14:44:44Z</access-stamp>
<access-status type="integer">0</access-status>
<guest-uid>68vju8yxgl</guest-uid>
<accesspoint-id>{check_in_point_id}</accesspoint-id>
<event-id>{event_id}</event-id>
<created-at type="datetime">2012-11-26T14:44:44Z</created-at>
<updated-at type="datetime">2012-11-26T14:44:44Z</updated-at>
</access-control>
<access-control>
<_id>{id}</_id>
<access-stamp type="datetime">2012-11-26T14:44:44Z</access-stamp>
<access-status type="integer">0</access-status>
<guest-uid>5ch0b30mnc</guest-uid>
<accesspoint-id>{check_in_point_id}</accesspoint-id>
<event-id>{event_id}</event-id>
<created-at type="datetime">2012-11-26T14:44:44Z</created-at>
<updated-at type="datetime">2012-11-26T14:44:44Z</updated-at>
</access-control>
</access-controls>
Create an access control record
This is essentially the method used by our iPad guest list management application. Every time a guest is checked in (either by tapping the guest list or scanning a QR code), this endpoint is called.
JSON
Request
POST /api/v1/events/{event_id}/access_controls.json?auth_token=YOUR_API_TOKEN Content-Type: application/json; charset=utf-8 {
// Where did the access control take place?
"accesspoint_id": "{check_in_point_id}",
// Which guest UID?
"guest_uid": "19j38293ju",
// When (UTC)? If omitted, the server sets access_stamp to DateTime.now
"access_stamp": "2012-11-26T14:44:44Z"
}Response
// 201 Created
{
// The access control record that was created.
// You can inspect access_status:
// if it is 0, the access was granted ("green"),
// otherwise it was denied ("red").
}
XML
Request
POST /api/v1/events/{event_id}/access_controls.xml?auth_token=YOUR_API_TOKEN Content-Type: application/xml; charset=utf-8 <access-control>
<!-- Where did the access control take place? --> <accesspoint-id>{check_in_point_id}</accesspoint-id>
<!-- Which guest UID? -->
<guest-uid>19j38293ju</guest-uid>
<!-- When (UTC)? If omitted, the server sets access_stamp to DateTime.now -->
<access-stamp>2012-11-26T14:44:44Z</access-stamp>
</access-control>
Response
<!-- 201 Created -->
<?xml version="1.0" encoding="UTF-8"?>
<access-control>
<!-- The access control record that was created.
You can inspect access_status:
if it is 0, the access was granted ("green"),
otherwise it was denied ("red"). -->
</access-control>
Bulk create access control records
This endpoint is also used by our iPad guest list management application.
When operating offline, it allows the application to synchronize locally stored access control records once network connectivity is restored.
Submit an array of access control records to create.
If every record is valid and the insertion succeeds, the API returns 201 Created.
If at least one record cannot be inserted, the API returns 422 Unprocessable Entity.
The response contains both the successfully created records and an error report, in the same order as the submitted payload.
JSON
Request
POST /api/v1/events/{event_id}/access_controls/batch_create.json?auth_token=YOUR_API_TOKEN Content-Type: application/json; charset=utf-8[
{
"accesspoint_id": "{check_in_point_id}",
"guest_uid": "19j38293ju"
// "access_stamp":
"2012-11-26T14:44:44Z"
},
{
"accesspoint_id": "{check_in_point_id}",
"guest_uid": "ieuwh8w7wn"
// "access_stamp":
"2012-11-26T15:44:44Z"
}
]
Response
// 201 Created
[
{
// The first access control record created
},
{
// The second access control record created
}
]
XML
Request
POST /api/v1/events/{event_id}/access_controls/batch_create.xml?auth_token=YOUR_API_TOKEN Content-Type: application/xml; charset=utf-8<!-- 201 Created -->
<access-controls type="array">
<access-control>
<!-- The first access control record created -->
</access-control>
<access-control>
<!-- The second access control record created -->
</access-control>
</access-controls>
Response
<!-- 201 Created -->
<access-controls type="array">
<access-control>
<!-- The first access control record created -->
</access-control>
<access-control>
<!-- The second access control record created -->
</access-control>
</access-controls>
Delete an access control record
JSON
Request
DELETE /api/v1/events/{event_id}/access_controls/{id}.json?auth_token=YOUR_API_TOKENResponse
// 204 No Content
XML
Request
DELETE /api/v1/events/{event_id}/access_controls/{id}.xml?auth_token=YOUR_API_TOKENResponse
<!-- 204 No Content -->
