Multiproduct sales settings

Multi-product sales settings webhooks are emitted by the Accounts API when multi-product sales settings are created or updated via PUT /multiproduct-sales-settings.

Events

Action Event name
create multi-product sales settings (PUT /multiproduct-sales-settings, first time) networks.created
update multi-product sales settings (PUT /multiproduct-sales-settings, existing) networks.updated

Payload example (networks.created / networks.updated)

The webhook payload includes the standard envelope (id, attemptId, created, event, livemode) and a data object:

{
  "attemptId": "20ebdb3d-85e1-47a4-a81d-7b6c7dd1a481",
  "created": 1634755434,
  "data": {
    "providerId": "52a377ec430c7d4e220001fc",
    "apiKey": "the-x-api-key-header-value",
    "data": {
      "_id": "6170632a61ecfa13a78c6eb9",
      "accountId": "52a377ec430c7d4e220001fc",
      "type": "multiProduct",
      "productsMapping": {},
      "stationsMapping": {},
      "faresMapping": {},
      "fareClassesMapping": {},
      "createdAt": { "value": "2021-10-20T18:42:50.342Z", "offset": 0 },
      "updatedAt": { "value": "2021-10-20T18:42:50.342Z", "offset": 0 }
    }
  },
  "event": "networks.created",
  "id": "2e32d603-a379-46f9-9393-ba4d1859e2fe",
  "livemode": true
}

Payload fields (networks.created / networks.updated)

Field Type Description
id string Webhook event id
attemptId string Delivery attempt id
created number Unix timestamp when the event was created
event string networks.created or networks.updated
livemode boolean Whether the account is in live mode
data object Custom payload from the API
data.providerId string Account id (ObjectId) that owns the settings
data.apiKey string Value of the X-API-KEY header used in the request
data.data object The saved multi-product settings document
data.data._id string Multi-product settings document id (ObjectId)
data.data.accountId string Account id
data.data.type string multiProduct
data.data.productsMapping object Mapping of product ObjectId to array of product ObjectIds
data.data.stationsMapping object Mapping of station ObjectId to array of station ObjectIds
data.data.faresMapping object Mapping of fare ObjectId to array of fare ObjectIds
data.data.fareClassesMapping object Mapping of fareClass ObjectId to array of fareClass ObjectIds
data.data.createdAt object Creation timestamp (value, offset)
data.data.updatedAt object Last update timestamp (value, offset)