ITS
- Provider Information:
Id |
its |
Type |
terminal |
Trace Type |
API |
Credentials |
customer |
Limits |
40 containers |
Status |
development |
Doc Status |
draft |
Doc Version |
1 |
- URLs:
Type |
URL |
Environment |
---|---|---|
Request |
DEV/STG/PRD |
|
Request |
DEV/STG/PRD |
- Sites:
Name |
Site Id |
Description |
---|---|---|
name |
ern |
the description |
Requests
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.itslb.com/tms2/account/login
body should be as following.
{
"userName": "your-username",
"password": "your-password",
"terminalCd": "ITS"
}
Note
terminalCd can be either ITS or HUSKY.
ITS API supports 2 terminals, in order to query data related to one of them, the terminalCd has to be provided when requesting an access token, and then use that token for the needed request.
Terminal Name |
Code |
---|---|
ITS Long Beach |
ITS |
Husky Tacoma |
HUSKY |
Query Containers Request
Query containers using the following request by adding the access token to the headers and the container numbers and refType to the body as the following example.
POST https://api.itslb.com/tms2/import/containeravailability
body should be as following.
{
"refType": "CN",
"refNums": "KKFU7773551,MOFU5869949,TRLU6667343"
}
Note
The container numbers are separated by a comma like the example above.
headers should be as following.
Authorization: Bearer <Access Token>
Responses
Access Token Request Response
Returned status code: 200 OK
We only use the access_token from this payload.
{
"access_token": "<access token>",
"token_type": "bearer",
"expires_in": 2592000,
"userName": "your-username",
".issued": "1/2/2020 8:02:42 PM +00:00",
".expires": "2/1/2020 8:02:42 PM +00:00"
}
Query Containers Response
If token is invalid, it returns the following response.
Returned status code: 401 Unauthorized
401 Unauthorized
If a given container number was invalid or valid but not found it returns Not Found.
Returned status code: 404 Not Found
404 Not Found
If given containers contained valid and found containers and other invalid and/or not found containers, it returns the results for the found and ignores the invalid or not found.
Returned status code: 200 OK
{
"containerAvailabilities": [{
"containerNumber": "HLXU8469402",
"shippingLineScac": "HLCU",
"containerSzTpHt": "40DR96",
"chassisNumber": null,
"spotNum": "ARRIVING",
"estDischargeDateShift": "12/16 2nd",
"dischargedDtTm": null,
"deliveredDtTm": null,
"blNum": "SGN2108AWNW1",
"vesselName": "ONE MANHATTAN",
"voyageNum": "028E",
"truckingCoName": null,
"deliveryOrderRemark": null,
"lastFreeDay": null,
"demurrageAmt": null,
"demurrageNote": null,
"examFeeAmt": null,
"examFeeNote": null,
"isCustomsStatusOK": true,
"customsStatusNote": "OK",
"isFreightStatusOK": true,
"freightStatusNote": "OK",
"isExamStatusOK": true,
"examStatusNote": "OK",
"isSpotStatusOK": false,
"spotStatusNote": "ARRIVING",
"isSpecialStatusOK": true,
"specialStatusNote": "OK",
"isLineFeeStatusOK": true,
"lineFeeStatusNote": "OK",
"isPierPassStatusOK": true,
"pierPassStatusNote": "OK",
"isContainerAvailable": false
}]
}
- Data Mapping:
Property |
Source Property |
Description |
---|---|---|
container_number |
containerNumber |
The container number |
carrier.steamshipLine |
shippingLineScac |
The shipping company scac |
carrier.vessel |
vesselName |
The vessel name |
carrier.voyage |
voyageName |
The voyage number |
event[n].code |
isContainerAvailable |
Arrived event is created if isContainerAvailable is true |
event[n].code |
spotStatusNote |
Grounded event is created if spotStatusNote is not ‘ARRIVING’ or empty |
event[n].code |
lastFreeDay |
Released event is created if lastFreeDay is not null |
event[n].code |
spotNum |
Outgated event is created if spotNum is ‘DELIVERED’ |
event[n].code
|
* customsStatusNote
* freightStatusNote
* examStatusNote
* pierPassStatusNote
|
* Customs hold event if customsStatusNote is ‘NOT RELEASED’
and spotNum is not ‘ARRIVING’
* OBL Hold if freightStatusNote is ‘NOT RELEASED’
and spotNum is not ‘ARRIVING’
* EXAM Hold if examStatusNote is ‘CET’
* TMF Hold if pierPassStatusNote is ‘TMF HOLD’
and spotNum not in (‘ARRIVING’,’DELIVERED’,’SPOTTING’)
|
event[n].location.name |
Default |
its |
event[n].location.type |
Default |
Terminal as ITS is a terminal |
event[n].location.lot
|
spotNum
|
The lot is the spotNum if it’s value not in
(‘ARRIVING’,’DELIVERED’,’SPOTTING’)
|
event[n].date |
Default |
Today date is a default date |
event[n].data.lfd |
lastFreeDay |
Container last free day in ISO format |
- Arrived Event:
Property |
Source Property |
Description |
---|---|---|
event[n].code |
isContainerAvailable |
Arrived event is created if isContainerAvailable is true |
event[n].location.name |
Default |
its |
event[n].location.type |
Default |
Terminal as ITS is a terminal |
event[n].location.lot
|
spotNum
|
The lot is the spotNum if it’s value not in
(‘ARRIVING’,’DELIVERED’,’SPOTTING’)
|
event[n].date |
Default |
Today date is a default date |
- Grounded Event:
Property |
Source Property |
Description |
---|---|---|
event[n].code |
spotStatusNote |
Grounded event is created if spotStatusNote is not ‘ARRIVING’ or empty |
event[n].location.name |
Default |
its |
event[n].location.type |
Default |
Terminal as ITS is a terminal |
event[n].location.lot
|
spotNum
|
The lot is the spotNum if it’s value not in
(‘ARRIVING’,’DELIVERED’,’SPOTTING’)
|
event[n].date |
Default |
Today date is a default date |
- Lfd Event:
Property |
Source Property |
Description |
---|---|---|
event[n].code |
lastFreeDay |
Lfd event is created if lastFreeDay is not null |
event[n].location.name |
Default |
its |
event[n].location.type |
Default |
Terminal as ITS is a terminal |
event[n].location.lot
|
spotNum
|
The lot is the spotNum if it’s value not in
(‘ARRIVING’,’DELIVERED’,’SPOTTING’)
|
event[n].date |
Default |
Today date is a default date |
event[n].data.lfd |
lastFreeDay |
Container last free day in ISO format |
- Released Event:
Property |
Source Property |
Description |
---|---|---|
event[n].code |
lastFreeDay |
Released event is created if lastFreeDay is not null |
event[n].location.name |
Default |
its |
event[n].location.type |
Default |
Terminal as ITS is a terminal |
event[n].location.lot
|
spotNum
|
The lot is the spotNum if it’s value not in
(‘ARRIVING’,’DELIVERED’,’SPOTTING’)
|
event[n].date |
Default |
Today date is a default date |
- Outgated Event:
Property |
Source Property |
Description |
---|---|---|
event[n].code |
spotNum |
Outgated event is created if spotNum is ‘DELIVERED’ |
event[n].location.name |
Default |
its |
event[n].location.type |
Default |
Terminal as ITS is a terminal |
event[n].location.lot
|
spotNum
|
The lot is the spotNum if it’s value not in
(‘ARRIVING’,’DELIVERED’,’SPOTTING’)
|
event[n].date |
Default |
Today date is a default date |
event[n].data.outgate_scac |
truckingCompanyScac |
The trucking company scac |
event[n].data.outgate_confirmed |
Default |
True |
- Hold Events:
Property |
Source Property |
Description |
---|---|---|
event[n].code |
Hold |
Hold is the default value for the event |
event[n].location.name |
Default |
its |
event[n].location.type |
Default |
Terminal as ITS is a terminal |
event[n].location.lot
|
spotNum
|
The lot is the spotNum if it’s value not in
(‘ARRIVING’,’DELIVERED’,’SPOTTING’)
|
event[n].date |
Default |
Today date is a default date |
event[n].code
|
* customsStatusNote
* freightStatusNote
* examStatusNote
* pierPassStatusNote
|
* Customs hold event if customsStatusNote is ‘NOT RELEASED’
and spotNum is not ‘ARRIVING’
* OBL Hold if freightStatusNote is ‘NOT RELEASED’
and spotNum is not ‘ARRIVING’
* EXAM Hold if examStatusNote is ‘CET’
* TMF Hold if pierPassStatusNote is ‘TMF HOLD’
and spotNum not in (‘ARRIVING’,’DELIVERED’,’SPOTTING’)
|
event[n].data.code |
Customs Hold, Exam Hold, TMF Hold, OBL Hold |