CN
- Provider Information:
Id |
cn |
Type |
rail |
Trace Type |
API |
Credentials |
Uses key and secret and it is Envase based |
Limits |
Maximum number of containers per request is 100 |
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://api.cn.ca/v1/oauth/jwt-token/accesstokenJWT?grant_type=client_credentials
Note
This request needs authorization info of key and secret.
This request needs x-apiKey in the headers with the value of the key.
Query Containers Request
Query containers using the following request by adding the access token from the previous request in the headers as following.
Authorization: Bearer <Access Token>
GET https://api.cn.ca/customers/v1/shipments/tracking?equipmentIds={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.
{
"organization_name": "<organization_name>",
"developer.email": "<developer@envasetechnologies.com>",
"client_id": "<client_id>",
"access_token": "<access_token>",
"issued_at": "1634823499502",
"token_type": "BearerToken",
"application_name": "<application_name>",
"scope": null,
"expires_in": "3599",
"refresh_count": "0",
"status": "approved"
}
Query Containers Request Response
There is no found response for this provider if none of the containers were found it returns the following.
{
"ThirdPartyIntermodalShipment":
{
"Equipment": []
}
}
ETA Event Response
{
"ThirdPartyIntermodalShipment": {
"Equipment": [
{
"EquipmentId": "ACLU970372",
"InquiryValue": [
"ACLU970372"
],
"WaybillStatus": "Executing",
"LoadEmpty": "L",
"Destination": {
"Type": "CN",
"Station": "MONTREAL TASCH YARD",
"ProvState": "QC",
"CountryCode": "CA",
"SPLC": "030191000"
},
"ETA": {
"Time": "2021-10-21 12:00 ET",
"Description": "DERAMPED",
"LastUpdatedTimestamp": "2021-10-20 17:18:43.000000",
"Location": {
"Type": "CN",
"Station": "MONTREAL TASCH YARD",
"ProvState": "QC",
"CountryCode": "CA",
"SPLC": "030191000"
}
},
"Event": {
"Time": "2021-10-21 10:04 ET",
"Description": "DERAMPED",
"CLM": "V",
"EDI214": "AV",
"EDI322": "UR",
"Location": {
"Type": "CN",
"Station": "MONTREAL TASCH YARD",
"ProvState": "QC",
"CountryCode": "CA",
"SPLC": "030191000",
"ReportedBy": "Train",
"ReportedId": "Z 12111 19"
}
},
"Weight": [
{
"Weight": 7758,
"Unit": "kg",
"Type": "Gross"
},
{
"Weight": 3902,
"Unit": "kg",
"Type": "Net"
},
{
"Weight": 3856,
"Unit": "kg",
"Type": "Tare"
}
],
"BadOrder": {
"AARBOCode": null,
"AARBODescription": null,
"BOCodeDescription": null
},
"StorageCharge": {
"LastFreeDay": "2021-10-23"
}
}
]
}
}
- Data Mapping:
Property |
Source Property |
Description |
---|---|---|
container_number |
EquipmentId |
The container reference number. |
loaded
|
LoadEmpty
|
If the value is ‘L’ Loaded property is
set to ‘laden’, if the value is ‘E’
loaded value is set to ‘empty’.
|
destination.site_id
|
Destination.SPLC
|
The URN of the site identifying the
location.
|
destination.name |
Destination.Station |
User friendly name for the location. |
destination.type
|
This is a static value represents where
event happens and it is set to ‘rail’.
|
|
event[n].code
|
Represents an ETA event and it is set
to ‘eta’.
|
|
event[n].date
|
ETA.LastUpdatedTimestamp
|
Date and time when the ETA event
happens.
|
event[n].location.site_id
|
Destination.SPLC
|
The URN of the site identifying the
location.
|
event[n].location.name |
Destination.Station |
User friendly name for the location. |
event[n].location.type
|
This is a static value represents where
the event happens and it is set
to ‘rail’.
|
|
event[n].data.eta |
ETA.Time |
Date of the ETA event. |
Arrived Event Response
{
"ThirdPartyIntermodalShipment": {
"Equipment": [
{
"EquipmentId": "EMHU652093",
"InquiryValue": [
"EMHU652093"
],
"WaybillStatus": "Executing",
"LoadEmpty": "L",
"Destination": {
"Type": "CN",
"Station": "MEMPHIS INTER TERM",
"ProvState": "TN",
"CountryCode": "US",
"SPLC": "439875000"
},
"ETA": {
"Time": "2021-10-25 10:15 CT",
"Description": "DERAMPED",
"LastUpdatedTimestamp": "2021-10-21 03:38:34.000000",
"Location": {
"Type": "CN",
"Station": "MEMPHIS INTER TERM",
"ProvState": "TN",
"CountryCode": "US",
"SPLC": "439875000"
}
},
"Event": {
"Time": "2021-10-19 03:16 CT",
"Description": "ARRIVED",
"CLM": "A",
"EDI214": "X4",
"EDI322": "A",
"Location": {
"Type": "CN",
"Station": "WINNIPEG SYMING YAR",
"ProvState": "MB",
"CountryCode": "CA",
"SPLC": "061265000",
"ReportedBy": "Train",
"ReportedId": "Z 11451 17"
}
},
"Weight": [
{
"Weight": 50766,
"Unit": "lb",
"Type": "Gross"
},
{
"Weight": 40406,
"Unit": "lb",
"Type": "Net"
},
{
"Weight": 10360,
"Unit": "lb",
"Type": "Tare"
}
],
"BadOrder": {
"AARBOCode": null,
"AARBODescription": null,
"BOCodeDescription": null
},
"StorageCharge": {
"LastFreeDay": null
}
}
]
}
}
- Data Mapping:
Property |
Source Property |
Description |
---|---|---|
event[n].code
|
Event.CLM
|
As the code value is ‘A’, this represents an
arrived event and it is set to ‘arrived’.
|
event[n].date
|
Date and time when this event was stored and it
it is value is always set to the current
date time.
|
|
event[n].location.site_id |
Destination.SPLC |
The URN of the site identifying the location. |
event[n].location.name |
Destination.Station |
User friendly name for the location. |
event[n].location.type
|
This is a static value represents where the
event happens and it is set to ‘rail’.
|
|
event[n].data.arrived |
Event.Time |
Date of the arrived event. |
Grounded Event Response
{
"ThirdPartyIntermodalShipment": {
"Equipment": [
{
"EquipmentId": "CAIU987449",
"InquiryValue": [
"CAIU987449"
],
"WaybillStatus": "Executing",
"LoadEmpty": "L",
"Destination": {
"Type": "CN",
"Station": "MONTREAL TASCH YARD",
"ProvState": "QC",
"CountryCode": "CA",
"SPLC": "030191000"
},
"ETA": {
"Time": null,
"Description": null,
"LastUpdatedTimestamp": null,
"Location": {
"Type": null,
"Station": null,
"ProvState": null,
"CountryCode": null,
"SPLC": null
}
},
"Event": {
"Time": "2021-10-20 13:20 ET",
"Description": "AT DESTINATION",
"CLM": "D",
"EDI214": "AR",
"EDI322": "AR",
"Location": {
"Type": "CN",
"Station": "MONTREAL TASCH YARD",
"ProvState": "QC",
"CountryCode": "CA",
"SPLC": "030191000",
"ReportedBy": "Train",
"ReportedId": "Q 10651 14"
}
},
"LotLocation": {
"Lot": "C",
"Row": "19",
"Spot": "5"
},
"Weight": [
{
"Weight": 17799,
"Unit": "kg",
"Type": "Gross"
},
{
"Weight": 13930,
"Unit": "kg",
"Type": "Net"
},
{
"Weight": 3869,
"Unit": "kg",
"Type": "Tare"
}
],
"BadOrder": {
"AARBOCode": null,
"AARBODescription": null,
"BOCodeDescription": null
},
"StorageCharge": {
"LastFreeDay": null
}
}
]
}
}
- Data Mapping:
Property |
Source Property |
Description |
---|---|---|
event[n].code
|
Event.CLM
|
As the code value is ‘D’, this represents
a grounded event and it is set to
‘grounded’.
|
event[n].date
|
Event.Time
|
Date and time when this event was stored
and it is value is always set to the
current date time.
|
event[n].location.site_id
|
Destination.SPLC
|
The URN of the site identifying the
location.
|
event[n].location.name |
Destination.Station |
User friendly name for the location. |
event[n].location.lot |
LotLocation |
Represents lot, row and spot location value |
event[n].location.type
|
This is a static value represents where
the event happens and it is set to ‘rail’.
|
|
event[n].data.grounded |
Event.Time |
Date of the grounded event. |
Note
Grounded event is also returned if lot location has a value but the Grounded event code ‘D’ was not seen, in this case the grounded value is defaulted to the current date time as long as it is earlier than the released and outgated dates.
Lfd Event Response
{
"ThirdPartyIntermodalShipment": {
"Equipment": [
{
"EquipmentId": "FTAU123491",
"InquiryValue": [
"FTAU123491"
],
"WaybillStatus": "Executing",
"LoadEmpty": "L",
"Destination": {
"Type": "CN",
"Station": "MONTREAL TASCH YARD",
"ProvState": "QC",
"CountryCode": "CA",
"SPLC": "030191000"
},
"ETA": {
"Time": null,
"Description": null,
"LastUpdatedTimestamp": null,
"Location": {
"Type": null,
"Station": null,
"ProvState": null,
"CountryCode": null,
"SPLC": null
}
},
"Event": {
"Time": "2021-10-20 06:28 ET",
"Description": "DERAMPED",
"CLM": "W",
"EDI214": "AV",
"EDI322": "UR",
"Location": {
"Type": "CN",
"Station": "MONTREAL TASCH YARD",
"ProvState": "QC",
"CountryCode": "CA",
"SPLC": "030191000",
"ReportedBy": "Train",
"ReportedId": "Z 12111 18"
}
},
"Weight": [
{
"Weight": 22840,
"Unit": "kg",
"Type": "Gross"
},
{
"Weight": 20740,
"Unit": "kg",
"Type": "Net"
},
{
"Weight": 2100,
"Unit": "kg",
"Type": "Tare"
}
],
"BadOrder": {
"AARBOCode": null,
"AARBODescription": null,
"BOCodeDescription": null
},
"StorageCharge": {
"LastFreeDay": "2021-10-22"
}
}
]
}
}
- Data Mapping:
Property |
Source Property |
Description |
---|---|---|
event[n].code
|
StorageCharge.LastFreeDay
|
When StorageCharge object has LastFreeDay
Then its a lfd event and code is set to ‘lfd’.
|
event[n].date
|
Event.Time
|
Date and time when this event was
stored and it is value is always set to
the current date time.
|
event[n].location.site_id
|
Destination.SPLC
|
The URN of the site identifying the
location.
|
event[n].location.name |
Destination.Station |
User friendly name for the location. |
event[n].location.type
|
This is a static value represents where
the event happens and it is set to ‘rail’.
|
|
event[n].data.lfd |
StorageCharge.LastFreeDay |
LFD for the container. |
Released Event Response
{
"ThirdPartyIntermodalShipment": {
"Equipment": [
{
"EquipmentId": "FTAU123491",
"InquiryValue": [
"FTAU123491"
],
"WaybillStatus": "Executing",
"LoadEmpty": "L",
"Destination": {
"Type": "CN",
"Station": "MONTREAL TASCH YARD",
"ProvState": "QC",
"CountryCode": "CA",
"SPLC": "030191000"
},
"ETA": {
"Time": null,
"Description": null,
"LastUpdatedTimestamp": null,
"Location": {
"Type": null,
"Station": null,
"ProvState": null,
"CountryCode": null,
"SPLC": null
}
},
"Event": {
"Time": "2021-10-20 06:28 ET",
"Description": "DERAMPED",
"CLM": "W",
"EDI214": "AV",
"EDI322": "UR",
"Location": {
"Type": "CN",
"Station": "MONTREAL TASCH YARD",
"ProvState": "QC",
"CountryCode": "CA",
"SPLC": "030191000",
"ReportedBy": "Train",
"ReportedId": "Z 12111 18"
}
},
"Weight": [
{
"Weight": 22840,
"Unit": "kg",
"Type": "Gross"
},
{
"Weight": 20740,
"Unit": "kg",
"Type": "Net"
},
{
"Weight": 2100,
"Unit": "kg",
"Type": "Tare"
}
],
"BadOrder": {
"AARBOCode": null,
"AARBODescription": null,
"BOCodeDescription": null
},
"StorageCharge": {
"LastFreeDay": "2021-10-22"
}
}
]
}
}
- Data Mapping:
Property |
Source Property |
Description |
---|---|---|
event[n].code
|
Event.CLM
|
As the code value is ‘W’, this represents
a released event and it is set
to ‘released’.
|
event[n].date
|
Event.Time
|
Date and time when this event was
stored and it is value is always set to
the current date time.
|
event[n].location.site_id
|
Destination.SPLC
|
The URN of the site identifying the
location.
|
event[n].location.name |
Destination.Station |
User friendly name for the location. |
event[n].location.type
|
This is a static value represents where
the event happens and it is set to ‘rail’.
|
|
event[n].data.released |
Event.Time |
Date of the released event. |
Outgated Event Response
{
"ThirdPartyIntermodalShipment": {
"Equipment": [
{
"EquipmentId": "EMHU831606",
"InquiryValue": [
"EMHU831606"
],
"WaybillStatus": "Executing",
"LoadEmpty": "L",
"Destination": {
"Type": "CN",
"Station": "MEMPHIS INTER TERM",
"ProvState": "TN",
"CountryCode": "US",
"SPLC": "439875000"
},
"ETA": {
"Time": null,
"Description": null,
"LastUpdatedTimestamp": null,
"Location": {
"Type": null,
"Station": null,
"ProvState": null,
"CountryCode": null,
"SPLC": null
}
},
"Event": {
"Time": "2021-10-19 10:16 CT",
"Description": "OUT-GATE",
"CLM": "E",
"EDI214": "OA",
"EDI322": "OA",
"Location": {
"Type": "CN",
"Station": "MEMPHIS INTER TERM",
"ProvState": "TN",
"CountryCode": "US",
"SPLC": "439875000",
"ReportedBy": "Train",
"ReportedId": "Z 19491 15"
}
},
"Weight": [
{
"Weight": 50075,
"Unit": "lb",
"Type": "Gross"
},
{
"Weight": 39875,
"Unit": "lb",
"Type": "Net"
},
{
"Weight": 10200,
"Unit": "lb",
"Type": "Tare"
}
],
"BadOrder": {
"AARBOCode": null,
"AARBODescription": null,
"BOCodeDescription": null
},
"StorageCharge": {
"LastFreeDay": null
}
}
]
}
}
- Data Mapping:
Property |
Source Property |
Description |
---|---|---|
event[n].code
|
Event.CLM
|
As the code value is ‘E’, this
represents and outgated event and it is
set to ‘outgated’.
|
event[n].date
|
Event.Time
|
Date and time when this event was stored
and it is value is always set to the
current date time.
|
event[n].location.site_id
|
Destination.SPLC
|
The URN of the site identifying the
location.
|
event[n].location.name |
Destination.Station |
User friendly name for the location. |
event[n].location.type
|
This is a static value represents where
the event happens and it is set to ‘rail’.
|
|
event[n].data.outgate |
Event.Time |
Date of the outgated event. |
event[n].data.outgate_confirmed
|
A static value with ‘True’ which represents
that the rail provides outgate information.
|
Hold Event Response
{
"ThirdPartyIntermodalShipment": {
"Equipment": [
{
"EquipmentId": "TCLU981094",
"InquiryValue": [
"TCLU981094"
],
"WaybillStatus": "Executing",
"LoadEmpty": "L",
"FlatcarEquipmentId": "DTTX729593",
"CarKind": "KC4",
"CarKindDescription": "CONTAINER UNHEATED/DRY 40' - EXT HEIGHT 9' - 9'6\"",
"Destination": {
"Type": "CN",
"Station": "CHICAGO INTER TERM",
"ProvState": "IL",
"CountryCode": "US",
"SPLC": "380002000"
},
"ETA": {
"Time": "2022-09-01 14:10 CT",
"Description": "DERAMPED",
"LastUpdatedTimestamp": "2022-08-26T08:11:31",
"Location": {
"Type": null,
"Station": null,
"ProvState": null,
"CountryCode": null,
"SPLC": null
}
},
"Event": {
"Time": "2022-08-26 10:06 PT",
"Description": "ARRIVED",
"CLM": "A",
"EDI214": "X4",
"EDI322": "A",
"Location": {
"Type": "CN",
"Station": "VAVENBY",
"ProvState": "BC",
"CountryCode": "CA",
"SPLC": "094697000",
"ReportedBy": "Train",
"ReportedId": "Q 11851 25"
}
},
"CustomsHold": {
"Description": "Broker has filed",
"Timestamp": "2022-08-19 13:28"
},
"Weight": [
{
"Weight": 7984,
"Unit": "kg",
"Type": "Gross"
},
{
"Weight": 4144,
"Unit": "kg",
"Type": "Net"
},
{
"Weight": 3840,
"Unit": "kg",
"Type": "Tare"
}
],
"BadOrder": {
"AARBOCode": null,
"AARBODescription": null,
"BOCodeDescription": null
},
"StorageCharge": {
"LastFreeDay": null
}
}
]
}
}
- Data Mapping:
Property |
Source Property |
Description |
---|---|---|
event[n].code |
Default |
Hold is the default value for the event. |
event[n].eventDate |
Default |
Today date is the default date value. |
event[n].location.siteId |
Destination.SPLC |
The URN of the site identifying the location. |
event[n].location.name |
Destination.Station |
User friendly name for the location. |
event[n].location.type
|
Default
|
This is a static value represents where
the event happens and it is set to ‘rail’.
|
event[n].data.holdType
|
CustomsHold.Description
|
Value is set to ‘customs’ if description value is:
Broker has filed
Broker has not filed. Contact your broker
General Order Status, Contact your broker to avoid possible extra charges/CBP Penalties
In Bond
In Bond - Broker Filed PARS
Piece Count Mismatch, Contact your broker to correct and avoid delays
US Customs has not yet cleared this shipment
|
event[n].data.code |
CustomsHold.Description |
Value is set with whatever value on description. |