List status changes
Each time the status of an object changes (e.g. by holding, booking or releasing it), a status change is recorded in seats.io. Use the following API call to list the status changes for an event.
Status changes are returned paginated, with the most recent ones first. Response body contains the hold token if a hold token was passed in when doing the status change (e.g. to hold an object, or to release an object that was previously held).
We only return status changes that happened in the last 365 days. Older status changes are deleted.
- Text
- PHP
- C#
- Java
- Python
- Ruby
- Javascript
- Go
GET https://api-{region}.seatsio.net/events/{eventKey}/status-changes
GET https://api-{region}.seatsio.net/events/{eventKey}/status-changes?filter=A-1
GET https://api-{region}.seatsio.net/events/{eventKey}/status-changes?sort=objectLabel:desc
More info: https://docs.seats.io/docs/api-pagination
$seatsioClient->events->statusChanges(eventKey, filter?, sortField?, sortDirection?)->firstPage(pageSize?)
$seatsioClient->events->statusChanges(eventKey, filter?, sortField?, sortDirection?)->pageAfter(afterId, pageSize?)
$seatsioClient->events->statusChanges(eventKey, filter?, sortField?, sortDirection?)->pageBefore(beforeId, pageSize?)
$seatsioClient->events->statusChanges(eventKey, filter?, sortField?, sortDirection?)->all()
/*
Some examples (for charts, but listing status changes works similarly):
https://github.com/seatsio/seatsio-php/blob/master/README.md#listing-charts-page-by-page
https://github.com/seatsio/seatsio-php/blob/master/README.md#listing-all-charts
*/
await client.Events.StatusChanges(eventKey, filter?, sortField?, sortDirection?).FirstPageAsync(pageSize?)
await client.Events.StatusChanges(eventKey, filter?, sortField?, sortDirection?).PageAfterAsync(afterId, filter?, pageSize?)
await client.Events.StatusChanges(eventKey, filter?, sortField?, sortDirection?).PageBeforeAsync(beforeId, filter?, pageSize?)
client.Events.StatusChanges(eventKey, filter?, sortField?, sortDirection?).AllAsync(filter?);
/*
Some examples (for charts, but listing status changes works similarly):
https://github.com/seatsio/seatsio-dotnet/blob/master/README.md#listing-charts-page-by-page
https://github.com/seatsio/seatsio-dotnet/blob/master/README.md#listing-all-charts
*/
client.events.statusChanges(eventKey, filter?, sortField?, sortDirection?).firstPage(pageSize?)
client.events.statusChanges(eventKey, filter?, sortField?, sortDirection?).pageAfter(afterId, pageSize?)
client.events.statusChanges(eventKey, filter?, sortField?, sortDirection?).pageBefore(beforeId, pageSize?)
client.events.statusChanges(eventKey, filter?, sortField?, sortDirection?).all();
/*
Some examples (for charts, but listing status changes works similarly):
https://github.com/seatsio/seatsio-java/blob/master/README.md#listing-charts-page-by-page
https://github.com/seatsio/seatsio-java/blob/master/README.md#listing-all-charts
*/
client.events.status_changes(event_key, filter? sort_field?, sort_direction?).first_page(page_size?)
client.events.status_changes(event_key, filter? sort_field?, sort_direction?).page_after(after_id, page_size?)
client.events.status_changes(event_key, filter? sort_field?, sort_direction?).page_before(before_id, page_size?)
client.events.status_changes(event_key, filter? sort_field?, sort_direction?).list()
"""
Some examples (for charts, but listing status changes works similarly):
https://github.com/seatsio/seatsio-python/blob/master/README.md#listing-charts-page-by-page
https://github.com/seatsio/seatsio-python/blob/master/README.md#listing-all-charts
"""
client.events.list_status_changes(event_key, filter?, sort_field?, sort_direction?).first_page(page_size?)
client.events.list_status_changes(event_key, filter?, sort_field?, sort_direction?).page_after(after_id, page_size?)
client.events.list_status_changes(event_key, filter?, sort_field?, sort_direction?).page_before(before_id, page_size?)
client.events.list_status_changes(event_key, filter?, sort_field?, sort_direction?)
# Some examples (for charts, but listing status changes works similarly):
# https://github.com/seatsio/seatsio-ruby/blob/master/README.md#listing-charts-page-by-page
# https://github.com/seatsio/seatsio-ruby/blob/master/README.md#listing-all-charts
import { StatusChangesParams } from 'seatsio'
for await (let statusChange of client.events.statusChanges(event.key).all(params?)) {
//Do something with the status change
}
let params = new StatusChangesParams().sortByObjectLabel().sortDescending()
await client.events.statusChanges(event.key).firstPage(params, pageSize?)
let params = new StatusChangesParams().sortByStatus().sortAscending()
await client.events.statusChanges(event.key).pageAfter(afterId, params, pageSize?)
let params = new StatusChangesParams().withFilter('filter').sortByDate().sortDescending()
await client.events.statusChanges(event.key).pageBefore(beforeId, params, pageSize?)
/*
Some examples (for charts, but listing status changes works similarly):
https://github.com/seatsio/seatsio-js/blob/master/README.md#listing-charts-page-by-page
https://github.com/seatsio/seatsio-js/blob/master/README.md#listing-all-charts
*/
statusChanges, err := client.Events.StatusChanges(event.Key).All(<optional pagination params>)
support := events.EventSupport
statusChanges, err := client.Events.StatusChanges(event.Key, support.WithSortDesc("objectLabel")).All()
changes, err := client.Events.StatusChanges(event.Key).ListFirstPage(<optional pagination params>)
statusChanges, err := client.Events.StatusChanges("", support.WithFilter("filter"), support.WithSortDesc("date")).ListPageAfter(afterId, <optional pagination parameters>)
statusChanges, err := client.Events.StatusChanges("", support.WithFilter("filter"), support.WithSortDesc("date")).ListPageBefore(beforeId, <optional pagination parameters>)
Some examples (for charts, but listing status changes works similarly):
https://github.com/seatsio/seatsio-go/blob/master/README.md#listing-charts-page-by-page
https://github.com/seatsio/seatsio-go/blob/master/README.md#listing-all-charts
*/
filter
: use this parameter to filter on object labels. E.g. if you pass in 'A-1', all status changes for objects that have 'A-1' in their name will be returned (e.g. 'A-11', 'A-1', 'Section A-A-1').sort
: by default, status changes are sorted by date, with the newest status changes coming first. You can change this to sort by object label (objectLabel
) or by status (status
). Sorting by date with the oldest status changes first is also possible (date:asc
)
Example request
curl https://api-{region}.seatsio.net/events/anEvent/status-changes?limit=100&start_after_id=34 \
-u aSecretKey:
{
"next_page_starts_after": 122,
"items": [
{
"id": 169,
"eventId": 12,
"status": "booked",
"quantity": 1,
"objectLabel": "A-1",
"date": "2017-05-05T10:58:44.715Z",
"orderId": "anOrder",
"extraData": {
"userId": "123"
},
"origin": {
"type": "API_CALL",
"ip": "10.4.32.67"
},
"isPresentOnChart": true
},
{
"id": 168,
"eventId": 12,
"status": "reservedByToken",
"quantity": 1,
"objectLabel": "B-1",
"date": "2017-05-05T09:58:44.715Z",
"orderId": "anotherOrder",
"extraData": {
"userId": "456"
},
"holdToken": "wvXbB9MlHt",
"origin": {
"type": "HELD_BY_USER"
},
"isPresentOnChart": false,
"notPresentOnChartReason": "RENAMED_OR_DELETED"
},
...
]
}
origin
can be either API_CALL
, HELD_BY_USER
, HOLD_RELEASED_BY_USER
or HOLD_EXPIRED
. An ip
property is present when the type equals API_CALL
.
isPresentOnChart
indicates whether the object of the status change still exists on the chart, as a bookable object. E.g. a seat might still exist, but if its
table is now bookable as a whole it's not bookable anymore.
If isPresentOnChart
is false
, notPresentOnChartReason
is set to either:
RENAMED_OR_DELETED
SWITCHED_TO_BOOK_WHOLE_TABLE
: the table seat was bookable, but now the table is bookable as a wholeSWITCHED_TO_BOOK_BY_SEAT
: the table was bookable as a whole, but is now bookable by seat