RailSight
- Provider Information:
Id |
railsight |
Type |
rail |
Trace Type |
API |
Credentials
|
Envase credentials requires username, password and account
Customer credentials requires fleet code
|
Limits |
Maximum number of containers per request is 50 |
Status |
development |
Doc Status |
draft |
Doc Version |
1 |
- URLs:
Type |
URL |
Environment |
---|---|---|
Request |
DEV/STG/PRD |
- Sites:
Name |
Site Id |
Description |
---|---|---|
name |
ern |
the description |
Request
Query Containers Request
Query containers using the following request by adding the account, fleet and container numbers.
GET https://services.railinc.com/tracing/rs-api/v1/customers/{Account}/fleets/{Fleet}/equipment/{ContainerNumber}/tracing/latest
Responses
The success response for all the events is similar
{
"requestDateTime": "2022-10-25T13:17:27",
"equipment": {
"initial": "FANU",
"number": "0000304709"
},
"tripTraces": [
{
"equipment": {
"initial": "FANU",
"number": "0000304709"
},
"cycleNumber": 2,
"tripStart": "2022-09-13T15:15:00",
"tripEnd": "2022-09-20T09:19:00",
"loadEmpty": "L",
"waybill": {
"equipment": {
"initial": "FANU",
"number": "0000304709"
},
"createdDate": "2022-09-15T16:26:49",
"waybillNumber": "328006",
"waybillDate": "2022-09-15T00:00:00",
"billingRoadMarkName": "CPRS",
"waybillSourceCode": "R",
"loadEmptyStatus": "L",
"originMarkName": "CPRS",
"origin": {
"city": "SCHPK",
"cityLong": "SCHILLER PARK",
"station": "SCHMTYDEPOT",
"fsac": "00468",
"scac": "CPRS",
"splc": "381215000",
"state": "IL",
"timeZone": "CT",
"latitude": "+041.967632",
"longitude": "-087.871132",
"country": "US"
},
"destinationMarkName": "CPRS",
"destination": {
"city": "MTLCASIMS",
"cityLong": "MONTREAL CAST IMS",
"station": "MONTREAL CAST IMS",
"fsac": "02341",
"scac": "CPRS",
"splc": "030328000",
"state": "PQ",
"timeZone": "ET",
"latitude": "+045.476657",
"longitude": "-073.558157",
"country": "CA"
},
"sendingRoadMark": "CPRS",
"billOfLadingNumber": "609895853",
"billOfLadingDate": "2022-09-13T14:15:00",
"equipmentWeight": 23455,
"tareWeight": 0,
"allowableWeight": 0,
"dunnageWeight": 0,
"equipmentWeightCode": "N",
"commodity": {
"code": "4950150"
}
},
"events": [
{
"equipment": {
"initial": "FANU",
"number": "0000304709"
},
"sightingDate": "2022-09-20T09:19:00",
"sightingEventCode": "6068",
"reportingRailroadScac": "CPRS",
"postingDate": "2022-09-20T08:44:54",
"fromMarkId": "CPRS",
"loadEmptyStatus": "L",
"location": {
"city": "MTLCASIMS",
"cityLong": "MONTREAL CAST IMS",
"station": "MONTREAL CAST IMS",
"fsac": "02341",
"scac": "CPRS",
"splc": "030328000",
"state": "PQ",
"timeZone": "ET",
"latitude": "+045.476657",
"longitude": "-073.558157",
"country": "CA"
},
"sightingClmCode": "V",
"sightingEventCodeText": "DERAMPED",
"trainIIAlphaCode": "DRMP"
}
]
}
]
}
- Data Mapping:
Property |
Source Property |
Description |
---|---|---|
container_number
|
equipment.initial +
equipment.number
|
Container number (for equipment.number we leave
out the first 4 digits only)
|
loaded |
loadEmpty |
Represents if container is loaded or empty |
steamshipBL |
waybill.billOfLadingNumber |
Bill of lading |
carrier.type |
Defaulted to vessel |
|
carrier.steamshipLine |
events[0].reporting_railroad_scac |
Carrier steamship line |
carrier.vessel |
events[0].trainID |
empty string |
destination.type |
Defaulted to rail |
|
destination.name |
waybill.destination.station |
Destination station name |
event[n].code |
One of the following values:
|
|
event[n].date |
Date and time when this event was stored and it is
value is always set to the current date time.
|
|
event[n].location.name |
waybill.destination.station |
Name of the location |
event[n].data.eta |
roadEta.etaDate |
Date of the ETA event. Filled if the
event_code = ‘eta’
|
event[n].data.outgated |
event[0].sightingDate |
Outgated event date. Filled if the
event_code = ‘outgated’
|
event[n].data.grounded |
event[0].sightingDate |
Grounded event date. Filled if the
event_code = ‘grounded’
|
event[n].data.arrived |
event[0].sightingDate |
Arrival event date. Filled if the
event_code = ‘arrived’
|
event[n].data.released |
event[0].sightingDate |
Release event date. Filled if the
event_code = ‘released’
|
Forbidden request Response
Check fleet code.
{
"date": "2022-10-25T14:12:07",
"errorCode": 40300,
"httpStatus": "FORBIDDEN",
"message": "Unable to access secure object.",
"error": "AccessDeniedException",
"path": "/v1/customers/PROFIT/fleets/IXTTET/equipment/TGHU974965/tracing/latest"
}
Bad Request Response
The request could not be understood by the server due to incorrect container number.
{
"date": "2022-10-25T14:09:07",
"errorCode": 40001,
"httpStatus": "BAD_REQUEST",
"message": "[ { equipmentId : TGHU9749656 : EquipmentId format is invalid. Valid formats are BNSF1234, KCS345676, BN000876 } ]",
"error": "InvalidParameterException",
"path": "/v1/customers/PROFIT/fleets/IXTTEST/equipment/TGHU9749656/tracing/latest"
}