Skip to main content

Event Overview

The Train Set webhook fires when a train consist is defined in ARMS — typically when wagons are assigned to a train with departure and arrival stations. It delivers the wagon list, station details (including names), train identifier, 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 a train consist is set up.

Payload Schema

{
  "event_type": "train_set",
  "event_timestamp": "2026-03-09T14:30:00+00:00",
  "work_order_id": "12345",
  "linked_resources": {
    "equipment": [
      {
        "resource_id": 2001,
        "car_number": "GCGO 11111"
      },
      {
        "resource_id": 2002,
        "car_number": "GCGO 22222"
      },
      {
        "resource_id": 2003,
        "car_number": "GCGO 33333"
      }
    ],
    "departure_station": {
      "resource_id": 6001,
      "name": "Hallsberg",
      "grouping_type": "station"
    },
    "arrival_station": {
      "resource_id": 6002,
      "name": "Gothenburg",
      "grouping_type": "station"
    }
  },
  "attributes": {
    "train_id": "T-9876"
  }
}

Field Reference

Top-level Fields

FieldTypeRequiredDescription
event_typestringYesAlways "train_set" for this event.
event_timestampstring (ISO 8601)NoWhen the event occurred. null if unavailable.
work_order_idstringNoID of the associated work order. null if the event has no work order.
linked_resourcesobjectYesEquipment, departure station, and arrival station for the train.
attributesobjectYesEvent-specific attributes (train identifier).

linked_resources.equipment

An array of wagons assigned to the train. Always an array, even for a single wagon.
FieldTypeDescription
resource_idintegerInternal equipment identifier.
car_numberstring or nullRailroad car/wagon number (e.g. "GCGO 11111").

linked_resources.departure_station

The station where the train departs from. null if no departure station is associated.
FieldTypeDescription
resource_idintegerInternal station identifier.
namestringHuman-readable station name.
grouping_typestringType of location (e.g. "station", "track").

linked_resources.arrival_station

The station where the train arrives. null if no arrival station is associated.
FieldTypeDescription
resource_idintegerInternal station identifier.
namestringHuman-readable station name.
grouping_typestringType of location (e.g. "station", "track").

attributes

FieldTypeDescription
train_idstringTrain identifier (e.g. train number or code).

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":{"train_id":"T-9876"},"event_timestamp":"2026-03-09T14:30:00+00:00","event_type":"train_set","linked_resources":{"arrival_station":{"grouping_type":"station","name":"Gothenburg","resource_id":6002},"departure_station":{"grouping_type":"station","name":"Hallsberg","resource_id":6001},"equipment":[{"car_number":"GCGO 11111","resource_id":2001},{"car_number":"GCGO 22222","resource_id":2002},{"car_number":"GCGO 33333","resource_id":2003}]},"work_order_id":"12345"}
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.

Setting Up This Webhook

1

Configure Workflow

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

Add Webhook Effect

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

Map Inputs

Wire the departure station, arrival station, equipment (wagons), and train ID from the trigger event to the effect inputs.
4

Implement Your Endpoint

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

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

Fires when a car is placed at a station or track.