Work Order API
Pickup cars
Pickup cars. On success, completes the Pickup tasks.
POST
/
t
/
v1
/
pickup-cars
Pickup cars
curl --request POST \
--url https://api-lg-k-h1.arms.cedarai.com/t/v1/pickup-cars \
--header 'Carrier: <carrier>' \
--header 'Content-Type: application/json' \
--header 'x-arms-api-key: <api-key>' \
--header 'x-arms-assume-user: <api-key>' \
--data '
{
"exceptions": [],
"items": [
{
"pickup_task_id": "task_003"
},
{
"equipment_id": 66666
}
],
"train_consist_equipment_uuids": [
"uuid_car1",
"uuid_car2",
"uuid_car3",
"uuid_car4"
],
"work_order_id": "12345"
}
'import requests
url = "https://api-lg-k-h1.arms.cedarai.com/t/v1/pickup-cars"
payload = {
"exceptions": [],
"items": [{ "pickup_task_id": "task_003" }, { "equipment_id": 66666 }],
"train_consist_equipment_uuids": ["uuid_car1", "uuid_car2", "uuid_car3", "uuid_car4"],
"work_order_id": "12345"
}
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({
exceptions: [],
items: [{pickup_task_id: 'task_003'}, {equipment_id: 66666}],
train_consist_equipment_uuids: ['uuid_car1', 'uuid_car2', 'uuid_car3', 'uuid_car4'],
work_order_id: '12345'
})
};
fetch('https://api-lg-k-h1.arms.cedarai.com/t/v1/pickup-cars', 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/pickup-cars",
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([
'exceptions' => [
],
'items' => [
[
'pickup_task_id' => 'task_003'
],
[
'equipment_id' => 66666
]
],
'train_consist_equipment_uuids' => [
'uuid_car1',
'uuid_car2',
'uuid_car3',
'uuid_car4'
],
'work_order_id' => '12345'
]),
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/pickup-cars"
payload := strings.NewReader("{\n \"exceptions\": [],\n \"items\": [\n {\n \"pickup_task_id\": \"task_003\"\n },\n {\n \"equipment_id\": 66666\n }\n ],\n \"train_consist_equipment_uuids\": [\n \"uuid_car1\",\n \"uuid_car2\",\n \"uuid_car3\",\n \"uuid_car4\"\n ],\n \"work_order_id\": \"12345\"\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/pickup-cars")
.header("Carrier", "<carrier>")
.header("x-arms-api-key", "<api-key>")
.header("x-arms-assume-user", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"exceptions\": [],\n \"items\": [\n {\n \"pickup_task_id\": \"task_003\"\n },\n {\n \"equipment_id\": 66666\n }\n ],\n \"train_consist_equipment_uuids\": [\n \"uuid_car1\",\n \"uuid_car2\",\n \"uuid_car3\",\n \"uuid_car4\"\n ],\n \"work_order_id\": \"12345\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-lg-k-h1.arms.cedarai.com/t/v1/pickup-cars")
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 \"exceptions\": [],\n \"items\": [\n {\n \"pickup_task_id\": \"task_003\"\n },\n {\n \"equipment_id\": 66666\n }\n ],\n \"train_consist_equipment_uuids\": [\n \"uuid_car1\",\n \"uuid_car2\",\n \"uuid_car3\",\n \"uuid_car4\"\n ],\n \"work_order_id\": \"12345\"\n}"
response = http.request(request)
puts response.read_body{}{
"code": 123,
"details": [
{
"@type": "<string>"
}
],
"message": "<string>"
}Headers
Carrier ID
Body
application/json
Request message for completing Pickup tasks.
Request message for completing Pickup tasks.
List of the items to Pickup. The associated Pickup tasks will be closed on success.
Show child attributes
Show child attributes
Ordered list of equipment UUIDs representing the new consist sequence of the train after Pickup.
Show child attributes
Show child attributes
Deprecated. Use items instead.
Response
A successful response.
The response is of type object.
Was this page helpful?
⌘I
Pickup cars
curl --request POST \
--url https://api-lg-k-h1.arms.cedarai.com/t/v1/pickup-cars \
--header 'Carrier: <carrier>' \
--header 'Content-Type: application/json' \
--header 'x-arms-api-key: <api-key>' \
--header 'x-arms-assume-user: <api-key>' \
--data '
{
"exceptions": [],
"items": [
{
"pickup_task_id": "task_003"
},
{
"equipment_id": 66666
}
],
"train_consist_equipment_uuids": [
"uuid_car1",
"uuid_car2",
"uuid_car3",
"uuid_car4"
],
"work_order_id": "12345"
}
'import requests
url = "https://api-lg-k-h1.arms.cedarai.com/t/v1/pickup-cars"
payload = {
"exceptions": [],
"items": [{ "pickup_task_id": "task_003" }, { "equipment_id": 66666 }],
"train_consist_equipment_uuids": ["uuid_car1", "uuid_car2", "uuid_car3", "uuid_car4"],
"work_order_id": "12345"
}
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({
exceptions: [],
items: [{pickup_task_id: 'task_003'}, {equipment_id: 66666}],
train_consist_equipment_uuids: ['uuid_car1', 'uuid_car2', 'uuid_car3', 'uuid_car4'],
work_order_id: '12345'
})
};
fetch('https://api-lg-k-h1.arms.cedarai.com/t/v1/pickup-cars', 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/pickup-cars",
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([
'exceptions' => [
],
'items' => [
[
'pickup_task_id' => 'task_003'
],
[
'equipment_id' => 66666
]
],
'train_consist_equipment_uuids' => [
'uuid_car1',
'uuid_car2',
'uuid_car3',
'uuid_car4'
],
'work_order_id' => '12345'
]),
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/pickup-cars"
payload := strings.NewReader("{\n \"exceptions\": [],\n \"items\": [\n {\n \"pickup_task_id\": \"task_003\"\n },\n {\n \"equipment_id\": 66666\n }\n ],\n \"train_consist_equipment_uuids\": [\n \"uuid_car1\",\n \"uuid_car2\",\n \"uuid_car3\",\n \"uuid_car4\"\n ],\n \"work_order_id\": \"12345\"\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/pickup-cars")
.header("Carrier", "<carrier>")
.header("x-arms-api-key", "<api-key>")
.header("x-arms-assume-user", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"exceptions\": [],\n \"items\": [\n {\n \"pickup_task_id\": \"task_003\"\n },\n {\n \"equipment_id\": 66666\n }\n ],\n \"train_consist_equipment_uuids\": [\n \"uuid_car1\",\n \"uuid_car2\",\n \"uuid_car3\",\n \"uuid_car4\"\n ],\n \"work_order_id\": \"12345\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-lg-k-h1.arms.cedarai.com/t/v1/pickup-cars")
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 \"exceptions\": [],\n \"items\": [\n {\n \"pickup_task_id\": \"task_003\"\n },\n {\n \"equipment_id\": 66666\n }\n ],\n \"train_consist_equipment_uuids\": [\n \"uuid_car1\",\n \"uuid_car2\",\n \"uuid_car3\",\n \"uuid_car4\"\n ],\n \"work_order_id\": \"12345\"\n}"
response = http.request(request)
puts response.read_body{}{
"code": 123,
"details": [
{
"@type": "<string>"
}
],
"message": "<string>"
}