Events
| Action | Event name |
|---|---|
| create a new station | station.created |
| update an existing station | station.updated |
The payload data object contains the full station document, including an optional customFields array when the station has custom field values. Each item in customFields has internalId (the custom field definition id for model "Stations") and value (string or null).
Payload example created
{
"attemptId": "3e25bece-6398-4adc-8aab-dccd66431b8c",
"created": 1623864385,
"data": {
"isBorder": false,
"disabled": false,
"createdAt": {
"offset": 0,
"value": "2021-06-16T17:26:24.695Z"
},
"userId": "55fc2f318791db6e1a0000b6",
"country": "CA",
"primaryCurrencyCode": null,
"ord": 0,
"type": {
"code": "",
"name": ""
},
"address": "34 ho",
"airlines": [],
"canReceive": false,
"_id": "60ca34408b8bf3199e511e8e",
"displayedCurrencies": null,
"canSend": false,
"province": "Nunavut",
"name": "111aaaa",
"deleted": false,
"alternativeNames": [
{
"deleted": null,
"id": "b4a7e40f-67be-4967-81a9-1323ccffe481",
"name": "alt1"
},
{
"deleted": null,
"id": "c78c0f63-b2c1-476e-bec7-d388af58ea97",
"name": "alt2"
}
],
"connex": {
"waitingTimes": {
"max": 0,
"min": 0,
"override": false
}
},
"updatedAt": {
"offset": 0,
"value": "2021-06-16T17:26:24.695Z"
},
"longitude": "-54.000",
"details": "111aaaa",
"city": "toy",
"timeZone": "America/Toronto",
"shipTrackClientId": "",
"zone": "2",
"latitude": "12.890",
"acceptedCurrencies": null,
"timeZoneDiff": 0,
"stationsGroupedWithThisStation": [],
"excludeFromConnex": true,
"accountId": "52a377ec430c7d4e220001fc",
"zip": "Z1Z 1Z1",
"stationsInGroupAreBoarding": false,
"terminals": [],
"shortcode": "TST",
"forceShiftDeposits": {},
"institutionCodes": [],
"hideWhenPrintingManifest": false,
"locationPurchaseLimits": {},
"isCountryCustom": false,
"operatingCompanyId": "5d94b5289a70a63c62eebf68",
"costCenter": "COST CENTER",
"operatingCompanyName": "test operating company",
"seriesNumber": "10",
"externalId": "T1",
"borderCode": "",
"GTFSData": [],
"customFields": [
{ "internalId": "507f1f77bcf86cd799439011", "value": "some value" },
{ "internalId": "507f1f77bcf86cd799439012", "value": "on" }
]
},
"event": "station.created",
"id": "55d5a792-9b0a-4daf-8fc7-63bf070689c1",
"livemode": true
}
Payload example updated
{
"attemptId": "b50655f0-2ef4-4b1b-8264-48d733cf3bac",
"created": 1623864436,
"data": {
"isBorder": false,
"disabled": false,
"createdAt": {
"offset": 0,
"value": "2021-06-16T17:26:24.695Z"
},
"userId": "55fc2f318791db6e1a0000b6",
"country": "CA",
"primaryCurrencyCode": null,
"ord": 0,
"type": {
"code": "",
"name": ""
},
"address": "34 ho",
"airlines": [],
"canReceive": false,
"_id": "60ca34408b8bf3199e511e8e",
"displayedCurrencies": null,
"canSend": false,
"province": "Nunavut",
"name": "111aaaa",
"deleted": false,
"alternativeNames": [
{
"deleted": null,
"id": "b4a7e40f-67be-4967-81a9-1323ccffe481",
"name": "alt1"
},
{
"deleted": null,
"id": "c78c0f63-b2c1-476e-bec7-d388af58ea97",
"name": "alt2"
}
],
"connex": {
"waitingTimes": {
"max": 0,
"min": 0,
"override": false
}
},
"updatedAt": {
"offset": 0,
"value": "2021-06-16T17:26:38.143Z"
},
"longitude": "-54.000",
"details": "desc",
"city": "toy",
"timeZone": "America/Toronto",
"shipTrackClientId": "",
"zone": "2",
"latitude": "12.890",
"acceptedCurrencies": null,
"timeZoneDiff": 0,
"stationsGroupedWithThisStation": [],
"excludeFromConnex": true,
"accountId": "52a377ec430c7d4e220001fc",
"zip": "Z1Z 1Z1",
"stationsInGroupAreBoarding": false,
"terminals": [],
"shortcode": "TST",
"forceShiftDeposits": {},
"institutionCodes": [],
"hideWhenPrintingManifest": false,
"locationPurchaseLimits": {},
"isCountryCustom": false,
"operatingCompanyId": "5d94b5289a70a63c62eebf68",
"costCenter": "COST CENTER",
"operatingCompanyName": "test operating company",
"seriesNumber": "10",
"externalId": "T1",
"borderCode": "",
"GTFSData": [],
"customFields": [
{ "internalId": "507f1f77bcf86cd799439011", "value": "some value" },
{ "internalId": "507f1f77bcf86cd799439012", "value": null }
]
},
"event": "station.updated",
"id": "0dbaa21f-dbdc-444e-8b50-1080b5f18a90",
"livemode": true
}