IBC. Inc.

IBC Event History Request API

Use this API to retrieve your status events associated with your IBC account in batch mode. You can receive the data as a JSON object, an array of strings or download a CSV file directly.

For Air AMS Events use this URL:

For IBC Pactrak Events use this URL (when IBC is your final mile provider):

You will need these parameters with your URL:
  • start_dt - format "YYYY-MM-DD HH:MM" required.
  • end_dt - format "YYYY-MM-DD HH:MM" required.
  • key - Simple base64 encoded key that contains your account name, number and ibc_key required.
  • as - optional - values are 'object' for JSON, 'text' for String Array, 'csv' for csv output file, default is 'object'

The requested time frame of events is between start_dt and end_dt parameters, these should always be in the past!.
NOTE: Maximum time frame is 8 hours

Event Pagination

Recommendation is to use 1 connection per attempt and cover a specified time fram from NOW back to 10, 15, 30, 45 minutes or 1, 4, 6, 8 hours in past!

Once you have covered that time period you don't need to retrieve that time frame again!

Examples date parameters for a single day using 3 separate connections: (8 hour intervals)
request #1: start_dt="2024-01-01 00:00"&end_dt="2024-01-01 08:00"
request #2: start_dt="2024-01-01 08:00"&end_dt="2024-01-01 16:00"
request #3: start_dt="2024-01-01 16:00"&end_dt="2024-01-02 00:00"

NOTES: the request takes input the date and time the events are recorded on our system. These dates should always be in the past!.

Expected ouput

JSON Output - default

            
{
    "hostname": "",
    "message": "",
    "developer_message": "",
    "code": 200,
    "is_error": false,
    "result": [
        {
            "event_date_time": "YYYY-MM-DD HH:MM",  /* time the event is reported */
            "ibc_id": "0",   /* internal id for reference */  
            "track_number": "0",   /* ibc_track number */  
            "full_track": "0",   /* if track number is langer than 11 chars should appear here */  
            "reference": "0",   /* reference number reported to ibc */  
            "vendor_reference": "0",   /* reference number reported to ibc */  
            "station": "MIA",   /* IBC station reported */  
            "event_code": "_A",   /* event code - see event code list */  
            "event_description": "AAMS DATA RECEIVED",   /* event description */  
        },
    ],  
    "execution_time": 0
}
            
            

the "result" key will contain an array of strings if 'as=text' is passed as a URL parameter, [ []string ]

            
"result": [
    ["event_date_time", "ibc_id", "track_number", "full_track", "reference", 
        "vendor_reference", "station", "event_code", "event_description"],
    ["2023-01-01 10:00", "111111", "1126464", "AB1126464", "", "", "MIA", "_A", "AAMS DATA RECEIVED"],
    ["2023-01-01 10:00", "111112", "1126465", "AB1126465", "", "", "MIA", "_A", "AAMS DATA RECEIVED"],
    .....
]
            
            

Troubleshooting Recommendations

  • Test your URL call on a browser
  • To speed up your searches limit your timeframes to smaller intervals, every 1 hour 30 mins etc.

Event Codes

AAMS - Typical events (may not apply to every case)
CodeDescription
_AData Received
CCCleared Customs
GRGateway Received
_PDelivered to Last Mile Provider
PACTRAK - Normal Events (may not apply to every case)
CodeDescription
_AGatewayed at Station
_BBagged at Station
_MPrepared for Outbound
OFOut for Delivery
_PDelivered

For a full list of IBC events download this resource.

Download to CSV call samples

WGET request

sample to retrieve a file using the start and end date and store the output locally to 'output.csv'

wget -O output.csv "?start_dt=\"2023-12-27 16:00\"&end_dt=\"2023-12-27 18:00\"&key=########&as=csv"

CURL request

sample to retrieve a file using the start and end date and store the output locally to 'output.csv'

curl --get -o output.csv --data-urlencode 'start_dt="2023-12-27 16:00"' --data-urlencode 'end_dt="2023-12-27 18:00"' '?key=########&as=csv'

Alternatively you can also encode the quote marks ( " ) as '%22' and space ( ) as '%20' and add them directly to URL ex:
start_dt=%222023-12-27%2016:00%22&end_date=....

Sample CSV Output


event_date_time, ibc_id, track_number, full_track, reference, vendor_reference, station, event_code, event_description
2023-01-01 10:00, 111111, 1126464, AB1126464, , , MIA, _A, AAMS DATA RECEIVED
2023-01-01 10:00, 111112, 1126465, AB1126465, , , MIA, _A, AAMS DATA RECEIVED
        

Resources

Station to Time Zone Reference

StationLocationTime ZoneGmt OffsetDaylight
LAXLos Angeles CA, USPST-8-7
DFWDallas TX, USCST-6-5
ORDChicago IL, USCST-6-5
NYCNew York NY, USEST-5-4
MIAMiami FL, USEST-5-4
Daylight Savings Time Change

Local times change at 2:00 a.m. EST to 3:00 a.m. EDT on the second Sunday in March, and return from 2:00 a.m. EDT to 1:00 a.m. EST on the first Sunday in November