List Work Orders
Returns list of Work Orders
curl --request POST \
--url https://api-lg-k-h1.arms.cedarai.com/t/v1/list-work-orders \
--header 'Carrier: <carrier>' \
--header 'Content-Type: application/json' \
--header 'x-arms-api-key: <api-key>' \
--header 'x-arms-assume-user: <api-key>' \
--data '
{
"attributes": {
"priority": "high",
"shift": "day"
},
"customer_location_ids": [
"33333"
],
"designated_date_range": {
"end": "2024-01-31T23:59:59Z",
"start": "2024-01-01T00:00:00Z"
},
"destination_location_ids": [
"22222"
],
"equipment_name": "BNSF 123456",
"include_tasks": true,
"name": "Daily Switch Job",
"origin_location_ids": [
"11111"
],
"page_next_token": "eyJwYWdlIjogMiwgImxhc3RfaWQiOiAiMTIzNDUifQ==",
"page_size": 50,
"serving_location_ids": [
"44444"
],
"statuses": [
"ACTIVE",
"PENDING"
],
"work_order_ids": [
"12345",
"67890"
]
}
'import requests
url = "https://api-lg-k-h1.arms.cedarai.com/t/v1/list-work-orders"
payload = {
"attributes": {
"priority": "high",
"shift": "day"
},
"customer_location_ids": ["33333"],
"designated_date_range": {
"end": "2024-01-31T23:59:59Z",
"start": "2024-01-01T00:00:00Z"
},
"destination_location_ids": ["22222"],
"equipment_name": "BNSF 123456",
"include_tasks": True,
"name": "Daily Switch Job",
"origin_location_ids": ["11111"],
"page_next_token": "eyJwYWdlIjogMiwgImxhc3RfaWQiOiAiMTIzNDUifQ==",
"page_size": 50,
"serving_location_ids": ["44444"],
"statuses": ["ACTIVE", "PENDING"],
"work_order_ids": ["12345", "67890"]
}
headers = {
"Carrier": "<carrier>",
"x-arms-api-key": "<api-key>",
"x-arms-assume-user": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Carrier: '<carrier>',
'x-arms-api-key': '<api-key>',
'x-arms-assume-user': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
attributes: {priority: 'high', shift: 'day'},
customer_location_ids: ['33333'],
designated_date_range: {end: '2024-01-31T23:59:59Z', start: '2024-01-01T00:00:00Z'},
destination_location_ids: ['22222'],
equipment_name: 'BNSF 123456',
include_tasks: true,
name: 'Daily Switch Job',
origin_location_ids: ['11111'],
page_next_token: 'eyJwYWdlIjogMiwgImxhc3RfaWQiOiAiMTIzNDUifQ==',
page_size: 50,
serving_location_ids: ['44444'],
statuses: ['ACTIVE', 'PENDING'],
work_order_ids: ['12345', '67890']
})
};
fetch('https://api-lg-k-h1.arms.cedarai.com/t/v1/list-work-orders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-lg-k-h1.arms.cedarai.com/t/v1/list-work-orders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'attributes' => [
'priority' => 'high',
'shift' => 'day'
],
'customer_location_ids' => [
'33333'
],
'designated_date_range' => [
'end' => '2024-01-31T23:59:59Z',
'start' => '2024-01-01T00:00:00Z'
],
'destination_location_ids' => [
'22222'
],
'equipment_name' => 'BNSF 123456',
'include_tasks' => true,
'name' => 'Daily Switch Job',
'origin_location_ids' => [
'11111'
],
'page_next_token' => 'eyJwYWdlIjogMiwgImxhc3RfaWQiOiAiMTIzNDUifQ==',
'page_size' => 50,
'serving_location_ids' => [
'44444'
],
'statuses' => [
'ACTIVE',
'PENDING'
],
'work_order_ids' => [
'12345',
'67890'
]
]),
CURLOPT_HTTPHEADER => [
"Carrier: <carrier>",
"Content-Type: application/json",
"x-arms-api-key: <api-key>",
"x-arms-assume-user: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-lg-k-h1.arms.cedarai.com/t/v1/list-work-orders"
payload := strings.NewReader("{\n \"attributes\": {\n \"priority\": \"high\",\n \"shift\": \"day\"\n },\n \"customer_location_ids\": [\n \"33333\"\n ],\n \"designated_date_range\": {\n \"end\": \"2024-01-31T23:59:59Z\",\n \"start\": \"2024-01-01T00:00:00Z\"\n },\n \"destination_location_ids\": [\n \"22222\"\n ],\n \"equipment_name\": \"BNSF 123456\",\n \"include_tasks\": true,\n \"name\": \"Daily Switch Job\",\n \"origin_location_ids\": [\n \"11111\"\n ],\n \"page_next_token\": \"eyJwYWdlIjogMiwgImxhc3RfaWQiOiAiMTIzNDUifQ==\",\n \"page_size\": 50,\n \"serving_location_ids\": [\n \"44444\"\n ],\n \"statuses\": [\n \"ACTIVE\",\n \"PENDING\"\n ],\n \"work_order_ids\": [\n \"12345\",\n \"67890\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Carrier", "<carrier>")
req.Header.Add("x-arms-api-key", "<api-key>")
req.Header.Add("x-arms-assume-user", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-lg-k-h1.arms.cedarai.com/t/v1/list-work-orders")
.header("Carrier", "<carrier>")
.header("x-arms-api-key", "<api-key>")
.header("x-arms-assume-user", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"attributes\": {\n \"priority\": \"high\",\n \"shift\": \"day\"\n },\n \"customer_location_ids\": [\n \"33333\"\n ],\n \"designated_date_range\": {\n \"end\": \"2024-01-31T23:59:59Z\",\n \"start\": \"2024-01-01T00:00:00Z\"\n },\n \"destination_location_ids\": [\n \"22222\"\n ],\n \"equipment_name\": \"BNSF 123456\",\n \"include_tasks\": true,\n \"name\": \"Daily Switch Job\",\n \"origin_location_ids\": [\n \"11111\"\n ],\n \"page_next_token\": \"eyJwYWdlIjogMiwgImxhc3RfaWQiOiAiMTIzNDUifQ==\",\n \"page_size\": 50,\n \"serving_location_ids\": [\n \"44444\"\n ],\n \"statuses\": [\n \"ACTIVE\",\n \"PENDING\"\n ],\n \"work_order_ids\": [\n \"12345\",\n \"67890\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-lg-k-h1.arms.cedarai.com/t/v1/list-work-orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Carrier"] = '<carrier>'
request["x-arms-api-key"] = '<api-key>'
request["x-arms-assume-user"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"attributes\": {\n \"priority\": \"high\",\n \"shift\": \"day\"\n },\n \"customer_location_ids\": [\n \"33333\"\n ],\n \"designated_date_range\": {\n \"end\": \"2024-01-31T23:59:59Z\",\n \"start\": \"2024-01-01T00:00:00Z\"\n },\n \"destination_location_ids\": [\n \"22222\"\n ],\n \"equipment_name\": \"BNSF 123456\",\n \"include_tasks\": true,\n \"name\": \"Daily Switch Job\",\n \"origin_location_ids\": [\n \"11111\"\n ],\n \"page_next_token\": \"eyJwYWdlIjogMiwgImxhc3RfaWQiOiAiMTIzNDUifQ==\",\n \"page_size\": 50,\n \"serving_location_ids\": [\n \"44444\"\n ],\n \"statuses\": [\n \"ACTIVE\",\n \"PENDING\"\n ],\n \"work_order_ids\": [\n \"12345\",\n \"67890\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"next_token": "eyJwYWdlIjogMiwgImxhc3RfaWQiOiAiMTIzNDYifQ==",
"prev_token": "",
"results": [
{
"crew_ids": [
"crew1",
"crew2"
],
"designated_date": "2024-01-15T00:00:00Z",
"equipment_ids": [
"uuid_car1",
"uuid_car2"
],
"status": "ACTIVE",
"train_id": "Train 123",
"work_order_id": "12345"
},
{
"crew_ids": [
"crew3"
],
"designated_date": "2024-01-16T00:00:00Z",
"equipment_ids": [
"uuid_car3"
],
"status": "PENDING",
"train_id": "Train 456",
"work_order_id": "6789"
}
]
}{
"code": 123,
"details": [
{
"@type": "<string>"
}
],
"message": "<string>"
}Headers
Carrier ID
Body
Request message for listing work orders with optional filtering and pagination. Used to search and retrieve work orders based on various criteria such as status, equipment, locations, and dates.
Request message for listing work orders with optional filtering and pagination. Used to search and retrieve work orders based on various criteria such as status, equipment, locations, and dates.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
WORK_ORDER_DIRECTION_FILTER_UNSPECIFIED, WORK_ORDER_DIRECTION_FILTER_INBOUND, WORK_ORDER_DIRECTION_FILTER_OUTBOUND Whether to include scheduled stop arrival/departure times, activity codes, and cancellation info in the response.
Whether to include task details in the response.
PENDING, ACTIVE, CLOSED, CANCELLED Optional list of work order ids to fetch. When provided these are the only work orders returned.
Related topics
List Work Order TasksAPI IntroductionList class list tasksUpdate a Work OrderList class listsWas this page helpful?
curl --request POST \
--url https://api-lg-k-h1.arms.cedarai.com/t/v1/list-work-orders \
--header 'Carrier: <carrier>' \
--header 'Content-Type: application/json' \
--header 'x-arms-api-key: <api-key>' \
--header 'x-arms-assume-user: <api-key>' \
--data '
{
"attributes": {
"priority": "high",
"shift": "day"
},
"customer_location_ids": [
"33333"
],
"designated_date_range": {
"end": "2024-01-31T23:59:59Z",
"start": "2024-01-01T00:00:00Z"
},
"destination_location_ids": [
"22222"
],
"equipment_name": "BNSF 123456",
"include_tasks": true,
"name": "Daily Switch Job",
"origin_location_ids": [
"11111"
],
"page_next_token": "eyJwYWdlIjogMiwgImxhc3RfaWQiOiAiMTIzNDUifQ==",
"page_size": 50,
"serving_location_ids": [
"44444"
],
"statuses": [
"ACTIVE",
"PENDING"
],
"work_order_ids": [
"12345",
"67890"
]
}
'import requests
url = "https://api-lg-k-h1.arms.cedarai.com/t/v1/list-work-orders"
payload = {
"attributes": {
"priority": "high",
"shift": "day"
},
"customer_location_ids": ["33333"],
"designated_date_range": {
"end": "2024-01-31T23:59:59Z",
"start": "2024-01-01T00:00:00Z"
},
"destination_location_ids": ["22222"],
"equipment_name": "BNSF 123456",
"include_tasks": True,
"name": "Daily Switch Job",
"origin_location_ids": ["11111"],
"page_next_token": "eyJwYWdlIjogMiwgImxhc3RfaWQiOiAiMTIzNDUifQ==",
"page_size": 50,
"serving_location_ids": ["44444"],
"statuses": ["ACTIVE", "PENDING"],
"work_order_ids": ["12345", "67890"]
}
headers = {
"Carrier": "<carrier>",
"x-arms-api-key": "<api-key>",
"x-arms-assume-user": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Carrier: '<carrier>',
'x-arms-api-key': '<api-key>',
'x-arms-assume-user': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
attributes: {priority: 'high', shift: 'day'},
customer_location_ids: ['33333'],
designated_date_range: {end: '2024-01-31T23:59:59Z', start: '2024-01-01T00:00:00Z'},
destination_location_ids: ['22222'],
equipment_name: 'BNSF 123456',
include_tasks: true,
name: 'Daily Switch Job',
origin_location_ids: ['11111'],
page_next_token: 'eyJwYWdlIjogMiwgImxhc3RfaWQiOiAiMTIzNDUifQ==',
page_size: 50,
serving_location_ids: ['44444'],
statuses: ['ACTIVE', 'PENDING'],
work_order_ids: ['12345', '67890']
})
};
fetch('https://api-lg-k-h1.arms.cedarai.com/t/v1/list-work-orders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-lg-k-h1.arms.cedarai.com/t/v1/list-work-orders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'attributes' => [
'priority' => 'high',
'shift' => 'day'
],
'customer_location_ids' => [
'33333'
],
'designated_date_range' => [
'end' => '2024-01-31T23:59:59Z',
'start' => '2024-01-01T00:00:00Z'
],
'destination_location_ids' => [
'22222'
],
'equipment_name' => 'BNSF 123456',
'include_tasks' => true,
'name' => 'Daily Switch Job',
'origin_location_ids' => [
'11111'
],
'page_next_token' => 'eyJwYWdlIjogMiwgImxhc3RfaWQiOiAiMTIzNDUifQ==',
'page_size' => 50,
'serving_location_ids' => [
'44444'
],
'statuses' => [
'ACTIVE',
'PENDING'
],
'work_order_ids' => [
'12345',
'67890'
]
]),
CURLOPT_HTTPHEADER => [
"Carrier: <carrier>",
"Content-Type: application/json",
"x-arms-api-key: <api-key>",
"x-arms-assume-user: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-lg-k-h1.arms.cedarai.com/t/v1/list-work-orders"
payload := strings.NewReader("{\n \"attributes\": {\n \"priority\": \"high\",\n \"shift\": \"day\"\n },\n \"customer_location_ids\": [\n \"33333\"\n ],\n \"designated_date_range\": {\n \"end\": \"2024-01-31T23:59:59Z\",\n \"start\": \"2024-01-01T00:00:00Z\"\n },\n \"destination_location_ids\": [\n \"22222\"\n ],\n \"equipment_name\": \"BNSF 123456\",\n \"include_tasks\": true,\n \"name\": \"Daily Switch Job\",\n \"origin_location_ids\": [\n \"11111\"\n ],\n \"page_next_token\": \"eyJwYWdlIjogMiwgImxhc3RfaWQiOiAiMTIzNDUifQ==\",\n \"page_size\": 50,\n \"serving_location_ids\": [\n \"44444\"\n ],\n \"statuses\": [\n \"ACTIVE\",\n \"PENDING\"\n ],\n \"work_order_ids\": [\n \"12345\",\n \"67890\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Carrier", "<carrier>")
req.Header.Add("x-arms-api-key", "<api-key>")
req.Header.Add("x-arms-assume-user", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-lg-k-h1.arms.cedarai.com/t/v1/list-work-orders")
.header("Carrier", "<carrier>")
.header("x-arms-api-key", "<api-key>")
.header("x-arms-assume-user", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"attributes\": {\n \"priority\": \"high\",\n \"shift\": \"day\"\n },\n \"customer_location_ids\": [\n \"33333\"\n ],\n \"designated_date_range\": {\n \"end\": \"2024-01-31T23:59:59Z\",\n \"start\": \"2024-01-01T00:00:00Z\"\n },\n \"destination_location_ids\": [\n \"22222\"\n ],\n \"equipment_name\": \"BNSF 123456\",\n \"include_tasks\": true,\n \"name\": \"Daily Switch Job\",\n \"origin_location_ids\": [\n \"11111\"\n ],\n \"page_next_token\": \"eyJwYWdlIjogMiwgImxhc3RfaWQiOiAiMTIzNDUifQ==\",\n \"page_size\": 50,\n \"serving_location_ids\": [\n \"44444\"\n ],\n \"statuses\": [\n \"ACTIVE\",\n \"PENDING\"\n ],\n \"work_order_ids\": [\n \"12345\",\n \"67890\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-lg-k-h1.arms.cedarai.com/t/v1/list-work-orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Carrier"] = '<carrier>'
request["x-arms-api-key"] = '<api-key>'
request["x-arms-assume-user"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"attributes\": {\n \"priority\": \"high\",\n \"shift\": \"day\"\n },\n \"customer_location_ids\": [\n \"33333\"\n ],\n \"designated_date_range\": {\n \"end\": \"2024-01-31T23:59:59Z\",\n \"start\": \"2024-01-01T00:00:00Z\"\n },\n \"destination_location_ids\": [\n \"22222\"\n ],\n \"equipment_name\": \"BNSF 123456\",\n \"include_tasks\": true,\n \"name\": \"Daily Switch Job\",\n \"origin_location_ids\": [\n \"11111\"\n ],\n \"page_next_token\": \"eyJwYWdlIjogMiwgImxhc3RfaWQiOiAiMTIzNDUifQ==\",\n \"page_size\": 50,\n \"serving_location_ids\": [\n \"44444\"\n ],\n \"statuses\": [\n \"ACTIVE\",\n \"PENDING\"\n ],\n \"work_order_ids\": [\n \"12345\",\n \"67890\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"next_token": "eyJwYWdlIjogMiwgImxhc3RfaWQiOiAiMTIzNDYifQ==",
"prev_token": "",
"results": [
{
"crew_ids": [
"crew1",
"crew2"
],
"designated_date": "2024-01-15T00:00:00Z",
"equipment_ids": [
"uuid_car1",
"uuid_car2"
],
"status": "ACTIVE",
"train_id": "Train 123",
"work_order_id": "12345"
},
{
"crew_ids": [
"crew3"
],
"designated_date": "2024-01-16T00:00:00Z",
"equipment_ids": [
"uuid_car3"
],
"status": "PENDING",
"train_id": "Train 456",
"work_order_id": "6789"
}
]
}{
"code": 123,
"details": [
{
"@type": "<string>"
}
],
"message": "<string>"
}