Events
The shift payload includes a location object with the station where the shift was opened. Its structure is the same as Shift location (shiftLocation) described in structure: it includes name, stationId, country, province, shortcode, latitude, longitude, costCenter, operatingCompanyId, operatingCompanyName, locationPurchaseLimits, primaryCurrencyCode, acceptedCurrencies, externalId, and timeZone (IANA time zone, e.g. America/Toronto).
| Action | Event name |
|---|---|
| opening a shift | shift.created |
| adding comments to a closed shift | shift.updated |
| adding deposits to a shift | shifts.deposit.created |
| adding manual ticket to a shift | shifts.manualTicket.created |
| closing a shift | shift.closed |
Payload example
{
"id": "string",
"attemptId": "string",
"livemode": "boolean",
"created": "int",
"event": "string",
"data": {
"_id": "string",
"variance": "int",
"userId": "string",
"user": {
"username": "string",
"email": "string"
},
"shiftNumber": "string",
"location": {
"stationId": "string",
"name": "string",
"country": "string",
"province": "string",
"shortcode": "string",
"latitude": "string",
"longitude": "string",
"costCenter": "string",
"operatingCompanyId": "string",
"operatingCompanyName": "string",
"locationPurchaseLimits": {},
"primaryCurrencyCode": "string",
"acceptedCurrencies": [],
"externalId": "string",
"timeZone": "string"
},
"internalId": "",
"deposits": [],
"comment": "string",
"closedAt": {},
"closed": "boolean",
"agencyId": "string",
"accountId": "string",
"deleted": "boolean",
"createdAt": {
"value": "string",
"offset": "int"
},
"updatedAt": {
"value": "string",
"offset": "int"
}
}
}
Payload example deposit created
{
"attemptId": "bbbe2471-131a-4bce-a1a9-3ccff1aa2139",
"created": 1682013279,
"data": {
"id": "string",
"bag": "1",
"comment": "",
"deposit": 23,
"depositMXN": 300,
"depositPEN": 200,
"slip": "3",
"userId": "string",
"partialDeposit": "boolean",
"partialDepositOrder": 0,
"location": {
"stationId": "string",
"name": "string",
"country": "string",
"province": "string",
"shortcode": "string",
"latitude": "string",
"longitude": "string",
"costCenter": "string",
"operatingCompanyId": "string",
"operatingCompanyName": "string",
"locationPurchaseLimits": {},
"primaryCurrencyCode": "string",
"acceptedCurrencies": [],
"externalId": "string",
"timeZone": "string"
},
"user": {
"username": "string",
"email": "string"
},
"operatingCompanyId": "string",
"operatingCompanyName": "string",
"createdAt": {
"value": "string",
"offset": "int"
},
"type": "string"
},
"event": "shifts.deposit.created",
"id": "857dc9d7-19b9-4591-a059-df21a59ea851",
"livemode": false
}
Payload example manual ticket created
{
"attemptId": "a992ea6d-d264-4f2d-a460-db3451f3e2c1",
"created": 1684159205,
"data": {
"manifestDate": {
"offset": 0,
"value": "2023-05-15T00:00:00.000Z"
},
"scheduleName": "SC-name",
"tickets": [
{
"price": 999,
"ticketNumber": "TN-128823"
}
]
},
"event": "shifts.manualTicket.created",
"id": "d0e42807-3fcb-4602-a438-3c58ad74b199",
"livemode": false
}