Travellers

Traveller webhooks are emitted by the Accounts API when travellers are created, updated, or deleted (POST /travellers, PUT /travellers/:travellerId, DELETE /travellers/:travellerId).

Events

Action Event name
creating a traveller (POST /travellers) traveller.created
updating a traveller (PUT /travellers/:travellerId) traveller.updated
deleting a traveller (DELETE /travellers/:travellerId) traveller.deleted

Payload example created and updated

{
  "id": "string",
  "attemptId": "string",
  "livemode": "boolean",
  "created": "int",
  "event": "string",
  "data": {
    "_id": "5f243d100617680712e78dd5",
    "firstName": "Raymond",
    "lastName": "Talbert",
    "email": "raymond@talbert.com",
    "fareId": "595f9f62df9127b11d5e03bd",
    "phone": "",
    "cards": [],
    "accountId": "5f243d100617680712e78dd6",
    "customerId": "5bfedd62768b77e83a9eefe6",
    "createdBy": "5f243d100617680712e78dd7",
    "updatedBy": "5f243d100617680712e78dd7",
    "createdAt": {
      "value": "2020-11-10T15:02:10Z",
      "offset": 0
    },
    "updatedAt": {
     "value": "2020-11-10T15:02:10Z",
      "offset": 0
    }
}

Payload fields (traveller.created / traveller.updated)

Field Type Description
data._id string Traveller id (ObjectId)
data.firstName string Traveller first name
data.lastName string Traveller last name
data.email string Traveller email
data.fareId string Fare id (ObjectId)
data.phone string Traveller phone
data.cards array Traveller cards (travellerCardTypeId, number, expirationDate)
data.accountId string Account id (ObjectId)
data.customerId string Customer id (ObjectId)
data.createdBy string User id that created the resource (ObjectId)
data.updatedBy string User id that last updated the resource (ObjectId)
data.createdAt object Creation timestamp (value, offset)
data.updatedAt object Last update timestamp (value, offset)

Payload example deleted

{
  "id": "string",
  "attemptId": "string",
  "livemode": "boolean",
  "created": "int",
  "event": "string",
  "data": {
    "travellerId": "5f243d100617680712e78dd5"
  }
}

Payload fields (traveller.deleted)

Field Type Description
data.travellerId string Id of the deleted traveller (ObjectId)