Station-classes

Station classes

These events are emitted by the Inventory API (btrz-api-inventory) when station classes are created, updated, or deleted.

Events

Action Event name Endpoint
Create a station class stationclass.created POST /station-classes
Update a station class stationclass.updated PUT /station-classes/:stationClassId
Delete a station class stationclass.deleted DELETE /station-classes/:stationClassId

Payload example created

{
  "attemptId": "46896f4b-c88e-41e5-946e-645614a20df3",
  "created": 1755034049,
  "data": {
    "_id": "689bb1bf38694206e10f4e90",
    "accountId": "52a377ec430c7d4e220001fc",
    "createdAt": {
      "offset": 0,
      "value": "2025-08-12T21:27:27.645Z"
    },
    "createdBy": "55fc2f318791db6e1a0000b6",
    "externalId": "2345",
    "name": "Test webhook",
    "updatedAt": {
      "offset": 0,
      "value": "2025-08-12T21:27:27.645Z"
    },
    "updatedBy": "55fc2f318791db6e1a0000b6"
  },
  "event": "stationclass.created",
  "id": "fca53b9c-53fb-4b97-8c31-c15a238a950d",
  "livemode": true
}

Payload example updated

{
  "attemptId": "a9da0609-130d-4635-b531-6e3973eaaeb8",
  "created": 1755034060,
  "data": {
    "_id": "689bb1bf38694206e10f4e90",
    "accountId": "52a377ec430c7d4e220001fc",
    "createdAt": {
      "offset": 0,
      "value": "2025-08-12T21:27:27.645Z"
    },
    "createdBy": "55fc2f318791db6e1a0000b6",
    "externalId": "2345",
    "name": "Test webhook update",
    "updatedAt": {
      "offset": 0,
      "value": "2025-08-12T21:27:37.826Z"
    },
    "updatedBy": "55fc2f318791db6e1a0000b6"
  },
  "event": "stationclass.updated",
  "id": "85fa5554-929d-49c2-a0ae-a55ce87fe867",
  "livemode": true
}

Payload example deleted

{
  "attemptId": "36a3fe0f-3984-49f7-bc0a-9fdc8461a2f9",
  "created": 1755034076,
  "data": {
    "stationClassId": "689bb1bf38694206e10f4e90"
  },
  "event": "stationclass.deleted",
  "id": "846db654-39d8-40f6-8649-a5cd54ac5d35",
  "livemode": true
}

Field descriptions — payload (station class events)

Field Type Description
attemptId string UUID of the attempt that triggered the event.
created number Unix timestamp when the event was created.
event string Event name (stationclass.created, stationclass.updated, stationclass.deleted).
id string UUID of the webhook event.
livemode boolean Whether the event occurred in live mode.
data._id string Station class id (24 hex characters).
data.accountId string Account that owns the station class (24 hex).
data.name string Name of the station class.
data.externalId string Id of this entity in an external system.
data.createdBy string User id that created this resource (24 hex).
data.updatedBy string User id that last updated this resource (24 hex).
data.createdAt object BzDate: creation date.
data.updatedAt object BzDate: last update date.
data.stationClassId string Station class id (stationclass.deleted only).