IBC. Inc.

IBC eTrack Documentation

Introduction

This service allows you to retrieve track information for your shipments.

Your client must use GET HTTP method to successfully retrieve your shipment's JSON track structure.

The service URL is:
 https://api.pactrak.com/ibcairbill/track

You must pass as part of the URL your IBC track number. For example for track number 102030 the URL is:
 https://api.pactrak.com/ibcairbill/track/102030 

You can limit the result object by using your specific 4 digit IBC account number:
 https://api.pactrak.com/ibcairbill/track/102030?account=#### 

JSON Data Structures

After making a submission you should expect a return of one of the following JSON structures:

The successful JSON Structure response. Response code 200.

{ / * JSON response object with 2 main elements ( history and status ) */
/* JSON Array of database report objects. */
"history": [
{ "database": "", /* possible values: aams or pactrak */
"report": [ /* Shows the movement of the piece */
{    /* One of more objects could appear */
"code": "A", /* Add, Bag, Manifest, */
"timestamp": "2015-11-17 08:50" ,
"text": "" /* Normally will be a station code. */
} ],
"disp_code_history": [ /* Will show the history of all the disposition codes associated with the track number, if available */
{    /* One of more objects could appear */
"code": "OF", /* IBC Disposition Code */
"timestamp": "2015-11-18 08:50" ,
"text": "Out for Delivery" /* Should be the description of the disposition code*/
} ],
"aams_report": [ /* Will show the Customs codes received in the Air AMS database, if available.*/
{    /* One of more objects could appear */
"code": "FXC-21", /* Air AMS code received */
"timestamp": "2015-11-19 08:50:10" ,
"text": "" /* Description of message received. */
} ],
"aams_status": "", /* The last status reported about the status in the Air AMS system. */
"aams_service": "", /* The release service provided for this shipment. (EXPRESS, CARGO) */
"key": "" /* Reference key to match with the status object below */
} /* One of more objects could appear */
],
/* JSON Object used to represent the last disposition code received, POD information and service provider details.
Elements are only set when they are available. */
"status": [ { /* multiple entry's could be available. */
"ibc_code": " ",
"disp_code_time": "",
"disp_code_date": "",
"pod_date": "",
"pod_time": "",
"pod_name": "",
"service_provider": "",
"service_track": "",
"key": 1111 /* this is an number value */,
"vendor_trace":"", /* See below for definition. */
"account": "", /* Matches your IBC account. */
"type": "pactrak" /* default value */
} ]
}

/* The vendor_trace element is a JSON String. It needs to be parsed into a JSON object first. For example,
var jsonObject = JSON.parse( response.status.vendor_trace );
Elements in the vendor_trace objects are only set when they are available. */
"vendor_trace": "{
"service": {
"trackNumber": "",
"carrier_code":"",
"carrier_service":"",
"carrier_service_description":"",
"delivery_timestamp":"",
"delivery_signature":"",
"delivery_code":"",
"delivery_details":""
},
"events": [
{
"address": {
"city":"",
"state":"",
"zip":"",
"country":"",
"type":""
},
"timestamp": "2015-12-01 21:55:04",
"type":"",
"station":"",
"status_code":"",
"status_description":"",
"event_description":""
}
]
}"

Error Response JSON structure

{
/**
* The HTTP response code
* @type Integer.
*/
"code": 400,

/**
* Response message relevant to the action requested.
* @type String.
*/
"message":"",

/**
* Detailed Response message relevant to the action requested.
* @type String.
*/
"developerMessage":"",

/**
* On some exceptions the executed response could appear here. Usually when the vendor
* information service did not complete. This response structure is similar to the standard JSON response.
* It does need to be parsed into a JSON object, and it's "vendor_trace" property will contain the actual vendor
* service error. */
"profile": "",

/**
* A link to the resource.
* @type String.
*/
"href":"https://api.pactrak.com/ibcaribill/track"
}

On error responses the Developer message object will contain a validity report with details of the issues found with the input provided. It is formatted with end of line chars "\n" so that it will be readable in your browser's web console.

Developer Resources

Restful services are capable of receiving requests form web based or standalone applications. We have tested our services to comply with REST standards, returning appropriate HTTP codes to help developers using commonly used frameworks as JQuery or Prototype.

Additionally, there are many examples from many different programming languages such as C#, Java, PHP and C++.

If you desire to test or need Java sample code, the following project is an example of how to call an HTTP Rest service using HTTP Post protocol, IBCPost. There is also a sample HTML web page sample implementation available for your reference.