UP
- Provider Information:
Id |
up |
Type |
rail |
Trace Type |
API |
Credentials |
Uses user and password and it is Envase based |
Limits
|
Maximum number of containers per request is 20
Generating token: 8 per hour is the limit.
|
Status |
completed |
Doc Status |
draft |
Doc Version |
1 |
- URLs:
Type |
URL |
Environment |
---|---|---|
Request |
DEV/STG/PRD |
- Sites:
Name |
Site Id |
Description |
---|---|---|
name |
ern |
the description |
Request
Access Token Request
Querying containers requires an access token, so the first step is to get an access token using the following request.
POST https://customer.api.up.com/oauth/token
Note
This request needs basic authorization of username and password.
This request needs in body: grant_type as key and client_credentials as value.
Query Containers Request
Query containers using the following request by adding the access token from the previous request and date in headers as following.
Authorization: Bearer <Access Token>
date: ISO date format of today's date
GET https://customer.api.up.com/services/v2/public/shipments?equipment_id={ContainerNumbers}
Note
Container numbers in the request should be separated with commas.
Responses
Access Token Request Response
We only use the access_token from this payload.
{
"access_token": "<access_token>",
"expires_in": 7199
}
Query Containers Request Response
If token is expired or invalid token given, it returns Status: 401 Unauthorized, with the following response.
401 Unauthorized
If date is not passed in the request, it returns Status: 200 OK, with empty response like the following response.
If given containers were valid but invalid containers like Test123456 it returns Status: 200 OK , with the following respnse.
[
]
If given containers were valid but not found it returns the following response.
[
{
"load": {
"equipment": {
"id": "UMXU253714"
},
"load_empty_code": "Unknown"
}
}
]
If given containers were valid but one found and the other is not found it returns the following response.
[
{
"load": {
"equipment": {
"id": "UMXU266473",
"aar_type": "U283"
},
"load_empty_code": "Empty",
"associated_equipment": [
{
"id": "PAHZ806363"
}
]
},
"route": {
"last_accomplished_event_stop": {
"location": {
"city": "Latc",
"state_abbreviation": "CA"
}
}
},
"operational_move_events": [
{
"description": "Interchanged Delivered ",
"type_code": "Movement",
"status_code": "Accomplished",
"date_time": "2021-11-03T10:44:00Z",
"location": {
"id": "Knw4ODMyMDUwMDB8Knwq",
"city": "Latc",
"state_abbreviation": "CA"
}
}
],
"up_flip_authorized": false
},
{
"load": {
"equipment": {
"id": "EMHU239691"
},
"load_empty_code": "Unknown"
}
}
]
- Data Mapping:
Property |
Source Property |
Description |
---|---|---|
container_number |
load.equipment.id |
The container reference number |
event[n].code
|
operational_move_events.description
|
Indicate which event is created
Event: description value
ETA: estimated time of grounding
Arrived: arrived
Grounded: deramped
Released: van notification
Outgated: departed
|
event[n].date |
Default |
Today date is a default date |
event[n].location.site_id |
operational_move_events.location |
Location.id determine site id |
event[n].location.name
|
operational_move_events.Location
|
Location.type_code
determines location name
|
event[n].location.type
|
Default
|
This is static value represents
type of location which is rail.
|
Note
Next events are determined by the description value founded in operational_move_events.
ETA Event Response
[
{
"load": {
"equipment": {
"id": "UMXU266473",
"aar_type": "U283"
},
"load_empty_code": "Empty",
"associated_equipment": [
{
"id": "PAHZ806363"
}
]
},
"route": {
"last_accomplished_event_stop": {
"location": {
"city": "Latc",
"state_abbreviation": "CA"
}
}
},
"operational_move_events": [
{
"description": "Estimated Time Of Grounding",
"type_code": "Movement",
"status_code": "Accomplished",
"date_time": "2021-11-03T10:44:00Z",
"location": {
"id": "Knw4ODMyMDUwMDB8Knwq",
"city": "Latc",
"state_abbreviation": "CA"
}
}
],
"up_flip_authorized": false
}
]
- ETA Event Data Mapping:
Property |
Source Property |
Description |
---|---|---|
event[n].code
|
operational_move_events.description
|
Event is created if value is
Estimated Time Of Grounding
|
event[n].date |
Default |
Today date is a default date |
event[n].location.site_id |
operational_move_events.location |
Location.id has The site id |
event[n].location.name |
operational_move_events.Location |
Location.type_code has name |
event[n].location.type
|
Default
|
This default value represents
type of location which is rail.
|
event[n].data.eta |
operational_move_events.date_time |
Estimated arrived datetime |
Arrived Event Response
[
{
"load": {
"equipment": {
"id": "UMXU266473",
"aar_type": "U283"
},
"load_empty_code": "Empty",
"associated_equipment": [
{
"id": "PAHZ806363"
}
]
},
"route": {
"last_accomplished_event_stop": {
"location": {
"city": "Latc",
"state_abbreviation": "CA"
}
}
},
"operational_move_events": [
{
"description": "arrived",
"type_code": "Movement",
"status_code": "Accomplished",
"date_time": "2021-11-03T10:44:00Z",
"location": {
"id": "Knw4ODMyMDUwMDB8Knwq",
"city": "Latc",
"state_abbreviation": "CA"
}
}
],
"up_flip_authorized": false
},
{
"load": {
"equipment": {
"id": "EMHU239691"
},
"load_empty_code": "Unknown"
}
}
]
- Arrived Event Data Mapping:
Property |
Source Property |
Description |
---|---|---|
event[n].code
|
operational_move_events.description
|
Event is created if
value is arrived
|
event[n].date |
Default |
Today date is a default date |
event[n].location.site_id |
operational_move_events.location |
Location.id determine site id |
event[n].location.name |
operational_move_events.Location |
Location.type_code has name |
event[n].location.type
|
Default
|
This default value represents
location type which is rail.
|
event[n].data.arrived |
operational_move_events.date_time |
Date of the arrived event. |
Grounded Event Response
[
{
"load": {
"equipment": {
"id": "UMXU266473",
"aar_type": "U283"
},
"load_empty_code": "Empty",
"associated_equipment": [
{
"id": "PAHZ806363"
}
]
},
"route": {
"last_accomplished_event_stop": {
"location": {
"city": "Latc",
"state_abbreviation": "CA"
}
}
},
"operational_move_events": [
{
"description": "deramped",
"type_code": "Movement",
"status_code": "Accomplished",
"date_time": "2021-11-03T10:44:00Z",
"location": {
"id": "Knw4ODMyMDUwMDB8Knwq",
"city": "Latc",
"state_abbreviation": "CA"
}
}
],
"up_flip_authorized": false
}
]
- Grounded Event Data Mapping:
Property |
Source Property |
Description |
---|---|---|
event[n].code
|
operational_move_events.description
|
Event is created if
value is deramped
|
event[n].date |
Default |
Today date is a default date |
event[n].location.site_id |
operational_move_events.location |
Location.id has site id |
event[n].location.name
|
operational_move_events.Location
|
Location.type_code
determines location name
|
event[n].location.type
|
Default
|
Default value represents
location type which is rail
|
event[n].data.grounded |
operational_move_events.date_time |
Date of the grounded event. |
Lfd Event Response
[
{
"load": {
"equipment": {
"id": "UMXU266473",
"aar_type": "U283"
},
"load_empty_code": "Empty",
"associated_equipment": [
{
"id": "PAHZ806363"
}
]
},
"route": {
"last_accomplished_event_stop": {
"location": {
"city": "Latc",
"state_abbreviation": "CA"
}
}
},
"operational_move_events": [
{
"description": "van notification",
"type_code": "Movement",
"status_code": "Accomplished",
"date_time": "2021-11-03T10:44:00Z",
"location": {
"id": "Knw4ODMyMDUwMDB8Knwq",
"city": "Latc",
"state_abbreviation": "CA"
}
}
],
"up_flip_authorized": false
}
]
- Lfd Event Data Mapping:
Property |
Source Property |
Description |
---|---|---|
event[n].code |
storage_charges |
Event is created if storage_charges has a value |
event[n].date |
Default |
Today date is a default date |
event[n].location.site_id |
operational_move_events.location |
Location.id determine site id |
event[n].location.name |
operational_move_events.Location |
Location.type_code has name |
event[n].location.type
|
Default
|
This default value represents
location type which is rail.
|
event[n].data.lfd |
storage_charges |
Last free date for container |
Released Event Response
[
{
"load": {
"equipment": {
"id": "UMXU266473",
"aar_type": "U283"
},
"load_empty_code": "Empty",
"associated_equipment": [
{
"id": "PAHZ806363"
}
]
},
"route": {
"last_accomplished_event_stop": {
"location": {
"city": "Latc",
"state_abbreviation": "CA"
}
}
},
"operational_move_events": [
{
"description": "van notification",
"type_code": "Movement",
"status_code": "Accomplished",
"date_time": "2021-11-03T10:44:00Z",
"location": {
"id": "Knw4ODMyMDUwMDB8Knwq",
"city": "Latc",
"state_abbreviation": "CA"
}
}
],
"up_flip_authorized": false
}
]
- Released Event Data Mapping:
Property |
Source Property |
Description |
---|---|---|
event[n].code
|
operational_move_events.description
|
Event is created if
value is van notification
|
event[n].date |
Default |
Today date is a default date |
event[n].location.site_id |
operational_move_events.location |
Location.id determine site id |
event[n].location.name |
operational_move_events.Location |
Location.type_code has name |
event[n].location.type
|
Default
|
This default value represents
location type which is rail.
|
event[n].data.released |
operational_move_events.date_time |
Date of the released event. |
Outgated Event Response
[
{
"load": {
"equipment": {
"id": "UMXU266473",
"aar_type": "U283"
},
"load_empty_code": "Empty",
"associated_equipment": [
{
"id": "PAHZ806363"
}
]
},
"route": {
"last_accomplished_event_stop": {
"location": {
"city": "Latc",
"state_abbreviation": "CA"
}
}
},
"operational_move_events": [
{
"description": "departed",
"type_code": "Movement",
"status_code": "Accomplished",
"date_time": "2021-11-03T10:44:00Z",
"location": {
"id": "Knw4ODMyMDUwMDB8Knwq",
"city": "Latc",
"state_abbreviation": "CA"
}
}
],
"up_flip_authorized": false
}
]
- Outgated Event Data Mapping:
Property |
Source Property |
Description |
---|---|---|
event[n].code
|
operational_move_events.description
|
Event is created if
value is departed
|
event[n].date |
Default |
Today date is a default date |
event[n].location.site_id |
operational_move_events.location |
Location.id determine site id |
event[n].location.name
|
operational_move_events.Location
|
Location.type_code
determines location name
|
event[n].location.type
|
Default
|
This default value represents
location type which is rail.
|
event[n].data.outgated |
operational_move_events.date_time |
Date of the outgated event. |
event[n].data.outgate_confirmed
|
Default
|
Value is set to True as it is
and indicator for event as
outgated or not
|