Skip to main content

Event Overview

The Train Arrival webhook fires when a train arrives at a station in your network. It delivers equipment details, the arrival station, loaded/empty status, the train number, and the associated work order (if any).
This webhook is triggered through ARMS workflow automation. Configure it in your workflow rules to notify external systems when trains arrive at specific locations.

Payload Schema

{
  "event_type": "TrainArrival",
  "event_timestamp": "2026-03-10T08:15:00+00:00",
  "work_order_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "linked_resources": {
    "equipment": [
      {
        "resource_id": 100001,
        "car_number": "TTGX 995823"
      },
      {
        "resource_id": 100002,
        "car_number": "BNSF 726451"
      }
    ],
    "event_station": {
      "resource_id": 500,
      "grouping_type": "station"
    }
  },
  "attributes": {
    "is_loaded": true,
    "train_number": "T-4521"
  }
}

Field Reference

Top-level Fields

FieldTypeRequiredDescription
event_typestringYesAlways "TrainArrival" for this event.
event_timestampstring (ISO 8601)NoWhen the train arrived. null if unavailable.
work_order_idstringNoID of the associated work order. null if the event has no work order.
linked_resourcesobjectYesEquipment and station involved in the event.
attributesobjectYesEvent-specific attributes.

linked_resources.equipment

An array of equipment items on the arriving train. Always an array, even for a single car.
FieldTypeDescription
resource_idintegerInternal equipment identifier.
car_numberstring or nullRailroad car number (e.g. "TTGX 995823").

linked_resources.event_station

The station where the train arrived. null if no station is associated.
FieldTypeDescription
resource_idintegerInternal station identifier.
grouping_typestringType of location (e.g. "station", "track").

attributes

FieldTypeDescription
is_loadedbooleantrue if the cars are loaded, false if empty.
train_numberstring or nullTrain identifier (e.g. "T-4521"). null if no train ID is set.

Example HTTP Request

This is the full HTTP request your endpoint receives:
POST /your-webhook-endpoint HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJSUzI1NiIs...
X-Webhook-Timestamp: 1709651400
X-Webhook-Signature: <base64-encoded-ed25519-signature>
X-Webhook-KeyId: cedar-webhooks-2026
X-Webhook-Id: 550e8400-e29b-41d4-a716-446655440000

{"attributes":{"is_loaded":true,"train_number":"T-4521"},"event_timestamp":"2026-03-10T08:15:00+00:00","event_type":"TrainArrival","linked_resources":{"equipment":[{"car_number":"TTGX 995823","resource_id":100001},{"car_number":"BNSF 726451","resource_id":100002}],"event_station":{"grouping_type":"station","resource_id":500}},"work_order_id":"a1b2c3d4-e5f6-7890-abcd-ef1234567890"}
The JSON body is canonically serialized (sorted keys, no extra whitespace) so the signature can be verified deterministically. See the Webhook Overview for verification instructions.

Differences from Car Actually Placed

AspectCar Actually PlacedTrain Arrival
event_type"car_actually_placed""TrainArrival"
train_numberNot includedIncluded in attributes
Equipment scopeSingle car typicallyMultiple cars on the train
TriggerCar physically placed at a trackTrain arrives at a station

Setting Up This Webhook

1

Configure Workflow

In ARMS, create or edit a workflow rule that triggers on train arrival events.
2

Add Webhook Effect

Add the Train Arrival Webhook effect to the workflow. Provide your endpoint URL and authorization token.
3

Implement Your Endpoint

Build an HTTPS endpoint that receives the POST, verifies the signature, and processes the event.
4

Test

Trigger a test event and confirm your endpoint receives and verifies the payload correctly.

Webhook Overview

Signing, verification, public key, and shared HTTP headers.

Car Actually Placed

Webhook for individual car placement events.