These events are emitted by the Inventory API (btrz-api-inventory) when garages are created or updated. No event is emitted when a garage is deleted.
Events
| Action | Event name | Endpoint |
|---|---|---|
| Creating a garage | garages.created | POST /garages |
| Updating a garage | garages.updated | PUT /garages/:garageId |
Payload example (created)
{
"attemptId": "50ed4745-7922-4b2a-aee7-50bb767d434e",
"created": 1754317982,
"data": {
"_id": "6890c47499346c06f2965af2",
"accountId": "66cfac670bba74052b9e98ca",
"name": "Central Garage",
"location": "Terminal de Omnibus",
"stationId": "637d56739a27aff80e99c242",
"createdBy": "67254d96a63f890539c5b0ea",
"updatedBy": "67254d96a63f890539c5b0ea",
"createdAt": { "offset": 0, "value": "2025-08-04T14:32:20.788Z" },
"updatedAt": { "offset": 0, "value": "2025-08-04T14:32:20.788Z" }
},
"event": "garages.created",
"id": "5a104d9d-5cdf-4178-8fdd-480adb6093f7",
"livemode": false
}
Field descriptions — data (garages.created / garages.updated)
| Field | Type | Description |
|---|---|---|
| _id | string | Garage id (24 hex characters). |
| accountId | string | Account (provider) id. |
| name | string | The name of the garage. |
| location | string | The location of the garage. |
| stationId | string | The station id associated to the garage (24 hex characters). |
| createdBy | string | User id that created the resource. |
| updatedBy | string | User id that last updated the resource. |
| createdAt | object | Creation date (BzDate: value, offset). |
| updatedAt | object | Last update date (BzDate: value, offset). |
Payload example (updated)
The data object for garages.updated has the same shape as the garage that was updated (same fields as above).