Mit terminals

MIT terminals webhooks

This page documents webhook events related to MIT terminals from the Inventory API (mit-terminals resource).


Inventory API – mit-terminals resource

Emitted when an MIT terminal is created (POST /mit-terminals), updated (PUT /mit-terminals/:mitTerminalId), or deleted (DELETE /mit-terminals/:mitTerminalId).

Events (Inventory API)

Action Event name Endpoint
Create an MIT terminal mitTerminals.created POST /mit-terminals
Update an MIT terminal mitTerminals.updated PUT /mit-terminals/:mitTerminalId
Delete an MIT terminal mitTerminals.deleted DELETE /mit-terminals/:mitTerminalId

Payload example – created (Inventory API)

The data object for mitTerminals.created is the full created MIT terminal (same shape as the API response mitTerminal).

{
  "attemptId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "created": 1623794000,
  "data": {
    "_id": "60c92280d9e6c43f77b5a583",
    "accountId": "5f243d100617680712e78dd7",
    "name": "Terminal 1",
    "serialNumber": "SN12345",
    "createdBy": "5f243d100617680712e78dd7",
    "updatedBy": "5f243d100617680712e78dd7",
    "createdAt": { "offset": 0, "value": "2021-06-15T12:00:00.000Z" },
    "updatedAt": { "offset": 0, "value": "2021-06-15T12:00:00.000Z" }
  },
  "event": "mitTerminals.created",
  "id": "uuid",
  "livemode": true
}

Payload example – updated (Inventory API)

The data object for mitTerminals.updated is the full updated MIT terminal (same shape as the API response mitTerminal).

{
  "attemptId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "created": 1623794000,
  "data": {
    "_id": "60c92280d9e6c43f77b5a583",
    "accountId": "5f243d100617680712e78dd7",
    "name": "Terminal 1",
    "serialNumber": "SN12345",
    "createdBy": "5f243d100617680712e78dd7",
    "updatedBy": "5f243d100617680712e78dd7",
    "createdAt": { "offset": 0, "value": "2021-06-15T12:00:00.000Z" },
    "updatedAt": { "offset": 0, "value": "2021-06-15T12:30:00.000Z" }
  },
  "event": "mitTerminals.updated",
  "id": "uuid",
  "livemode": true
}

Payload example – deleted (Inventory API)

The data object for mitTerminals.deleted contains only the id of the deleted MIT terminal.

{
  "attemptId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "created": 1623794000,
  "data": {
    "mitTerminalId": "60c92280d9e6c43f77b5a583"
  },
  "event": "mitTerminals.deleted",
  "id": "uuid",
  "livemode": true
}

Field descriptions – data (created / updated)

data matches the Inventory API MitTerminal schema. Main fields:

Field Type Description
_id string MIT terminal id (24 hex characters).
accountId string The account id.
name string A unique name to identify the terminal.
serialNumber string The serial number of the terminal.
createdBy string The user that created this resource.
updatedBy string The last user that updated this resource.
createdAt object The date the object was created (BzDate: offset, value).
updatedAt object The date the object was last updated (BzDate: offset, value).

Field descriptions – data (deleted)

Field Type Description
mitTerminalId string Id of the deleted MIT terminal (24 hex characters).