Classify a class list
Creates a class list (switch list) from a list of car numbers by automatically picking destination tracks based on the carrier’s configured block-to-track scope.
This is the API equivalent of the inventory Classify dialog: you provide just the cars, and Cedar mirrors the UI logic to compute where each car goes. Customers replacing the existing class-list API typically batch 5–60 cars per call, scoped to the lead/shift the crew is working — see the switchListBatch example for a realistic shape.
Classification logic (per car, in request order):
- Find the parent grouping of the carrier-configured block type (for example
yard_block). - Look up the assigned tracks for that block in priority order.
- Pick the first assigned track with capacity for the car.
- Otherwise fall back to the lowest-priority assigned track.
- Otherwise — only when a block exists — fall back to the car’s current track if
classifyFallbackToCurrentTrackis enabled in carrier settings.
The operation is atomic: if any car cannot be resolved (missing in inventory, has no block of the carrier-configured type, or has no usable destination) the entire request is rejected and no class list is created. Cars without a block are always rejected, regardless of the fallback setting, mirroring the inventory dialog’s behaviour.
Usage notes:
equipmentInitialAndNumbersaccepts entries like"BNSF 999001". The order is preserved in the resulting class list (it determinesworkOrderPriorityon the persisted tasks) and is also used for capacity accounting.scopeis optional. When omitted, the first scope accessible to the caller is used. Scopes that do not start withblock2track_are automatically prefixed. A scope that is not configured for the carrier is rejected with400 Bad Request.jobIdis optional. Carriers commonly pass the train or job number the crew is working (for example350orMORNING-JOB-12); when omitted, a label likeClassify 2026-04-30 22:34:11 UTCis generated.isBackdefaults tofalse; set totrueto switch from the back of the track.- The inventory page also offers a Classify by Current Track action that splits a multi-track selection into one class list per source track. To replicate that, partition the cars by current track yourself and call this endpoint once per group (see the
byCurrentTrackPerCallexample).
Permission required: workOrderManagement.classList.classifyThirdParty.
Authorizations
Your ARMS API key
Email of a user assigned to the appropriate user group
Query Parameters
Carrier identifier; required for all endpoints
Optional user group context
Body
Input for classifying a class list (switch list) from a list of car numbers.
Carrier identifier.
Equipment initial and numbers to classify, e.g. ['BNSF 999001', 'UP 999010']. Order is preserved in the resulting class list and is also used for capacity accounting.
1Block-to-track scope to use. Real-world scopes are usually named after the lead and shift the crew is working (for example yard1_first_shift or mainyard_lead_morning). If omitted, the first scope accessible to the caller is used. Values that do not start with block2track_ are automatically prefixed (so yard1_first_shift and block2track_yard1_first_shift are equivalent). A scope that is not configured for the carrier is rejected with 400 Bad Request.
User-specified label for the class list. Carriers commonly pass the train or job number the crew is working (for example 350 or MORNING-JOB-12). If omitted, a label like Classify <UTC timestamp> is generated.
True if switching from the back of the track. Defaults to false.
Response
OK
A class list (switch list) represents a work order for switching operations.
UUID that complements the legacy numeric resourceId.
User-specified label for the class list
Status of the class list
ACTIVE, ARCHIVED When the class list was created
Cut positions in the class list
True if switching from the back of the track