Operation Page Breadcrumb

Developer APIs TrackIt API

TrackIt API

Get Shipment

Fetches a shipment according to the trackable identifier.

Try it

Request

Request URL

Request parameters

  • string

    Trackable identifier used to retrieve trackable.

Request headers

  • string
    Subscription key which provides access to this API. Found in your Profile.
  • string
    OAuth 2.0 access token obtained from JB Hunt OAuth 2.0 Provider. Supported grant types: Authorization code.

Request body

Responses

200 OK

The specified shipment that was found.

Representations

{
  "trackableId": "0d2bf85aeb1c47dcaec200e1ffee37b6",
  "referenceIdentifiers": [
    {
      "type": "billTo",
      "value": "CUSTXYZ"
    }
  ],
  "segments": [
    {
      "transitMode": "Truck",
      "transitStatus": "InTransit",
      "carrierSCAC": "HJBT",
      "carrierName": "JB Hunt",
      "sequenceNumber": 1.0,
      "referenceIdentifiers": [
        {
          "type": "billTo",
          "value": "CUSTXYZ"
        }
      ],
      "stops": [
        {
          "id": "S12345",
          "sequenceNumber": 1.0,
          "type": "PICKUP",
          "progress": "Complete",
          "location": {
            "name": "RAIL YARD XYZ",
            "type": "RAIL",
            "address": {
              "streetAddress": "615 J B Hunt Corporate Dr",
              "adminArea1": "AR",
              "locality": "Lowell",
              "postalCode": "72745",
              "countryCode": "USA"
            },
            "coordinates": {
              "longitude": -94.136986,
              "latitude": 36.246883
            }
          },
          "appointmentWindowStartDateTime": {},
          "appointmentWindowEndDateTime": {},
          "estimatedArrivalDateTime": {},
          "estimatedDepartureDateTime": {},
          "arrivalDateTime": {},
          "departureDateTime": {},
          "arrivalStatus": "ON_TIME",
          "referenceIdentifiers": [
            {
              "type": "billTo",
              "value": "CUSTXYZ"
            }
          ]
        }
      ],
      "transitExceptions": [
        {
          "type": "RailServiceInterruption",
          "description": "Rail Service Interruption",
          "exceptionStartDateTime": "2020-01-01T06:23:45Z",
          "exceptionEndDateTime": "2020-01-02T02:23:45Z"
        }
      ],
      "trailer": {
        "prefix": "PREF",
        "id": "T55555"
      }
    }
  ],
  "latestTelemetry": {
    "coordinates": {
      "longitude": -94.136986,
      "latitude": 36.246883,
      "lastUpdated": {},
      "sourceType": "GPS",
      "accuracy": 98.65,
      "quality": "EXCELLENT"
    },
    "sensors": [
      {
        "units": "FAHRENHEIT",
        "value": "string",
        "minimum": "string",
        "maximum": "string",
        "target": "string",
        "type": "Temperature",
        "lastUpdated": {},
        "sourceType": "THERMOSTAT"
      }
    ],
    "trailerStatus": "LOADED",
    "address": {
      "streetAddress": "615 J B Hunt Corporate Dr",
      "adminArea1": "AR",
      "locality": "Lowell",
      "postalCode": "72745",
      "countryCode": "USA"
    }
  },
  "latestLocation": {
    "location": {
      "name": "RAIL YARD XYZ",
      "type": "RAIL",
      "address": {
        "streetAddress": "615 J B Hunt Corporate Dr",
        "adminArea1": "AR",
        "locality": "Lowell",
        "postalCode": "72745",
        "countryCode": "USA"
      },
      "coordinates": {
        "longitude": -94.136986,
        "latitude": 36.246883
      }
    },
    "timestamp": {},
    "sourceType": "Orbcomm"
  },
  "status": "InTransit",
  "shipmentDetails": {
    "deliveryStopId": "S12345",
    "commodityCode": "MOSAIC REC",
    "itemPackageType": "Pieces",
    "itemPackageQuantity": 1.0,
    "weight": {
      "value": 56.54,
      "units": "Pounds"
    }
  }
}
{
  "title": "Shipment",
  "allOf": [
    {
      "title": "Trackable",
      "type": "object",
      "properties": {
        "trackableId": {
          "type": "string",
          "description": "The unique tracking id of the trackable.",
          "example": "0d2bf85aeb1c47dcaec200e1ffee37b6"
        },
        "referenceIdentifiers": {
          "type": "array",
          "items": {
            "title": "Reference Identifier",
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "description": "The type of reference identifier.",
                "example": "billTo"
              },
              "value": {
                "type": "string",
                "description": "Reference identifier",
                "example": "CUSTXYZ"
              }
            },
            "description": "Identifier that can be tied to a movement.\n"
          },
          "description": "Reference identifiers associated with the trackable."
        },
        "segments": {
          "type": "array",
          "items": {
            "title": "Segment",
            "type": "object",
            "properties": {
              "transitMode": {
                "enum": [
                  "Truck",
                  "Rail"
                ],
                "type": "string",
                "description": "Describes the mode of transit for the leg (Truck, Rail).",
                "example": "Truck"
              },
              "transitStatus": {
                "enum": [
                  "Planned",
                  "InTransit",
                  "Complete"
                ],
                "type": "string",
                "description": "Describes the current transit status of the leg (Planned, InTransit, Complete).",
                "example": "InTransit"
              },
              "carrierSCAC": {
                "type": "string",
                "description": "SCAC of carrier responsible for the leg of the movement.",
                "example": "HJBT"
              },
              "carrierName": {
                "type": "string",
                "description": "Name of carrier responsible for the leg of the movement.",
                "example": "JB Hunt"
              },
              "sequenceNumber": {
                "type": "number",
                "description": "Sequenced order for legs within a movement.",
                "example": 1.0
              },
              "referenceIdentifiers": {
                "type": "array",
                "items": {
                  "title": "Reference Identifier",
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "description": "The type of reference identifier.",
                      "example": "billTo"
                    },
                    "value": {
                      "type": "string",
                      "description": "Reference identifier",
                      "example": "CUSTXYZ"
                    }
                  },
                  "description": "Identifier that can be tied to a movement.\n"
                },
                "description": "List of reference identifiers for the leg."
              },
              "stops": {
                "type": "array",
                "items": {
                  "title": "Stop",
                  "type": "object",
                  "properties": {
                    "id": {
                      "title": "Stop Identifier",
                      "type": "string",
                      "description": "Identifier for the stop.",
                      "example": "S12345"
                    },
                    "sequenceNumber": {
                      "type": "number",
                      "description": "Sequenced order for stops within a leg.",
                      "example": 1.0
                    },
                    "type": {
                      "type": "string",
                      "description": "Describes the type of stop (pickup or dropoff)",
                      "example": "PICKUP"
                    },
                    "progress": {
                      "enum": [
                        "AtStop",
                        "Complete",
                        "Planned"
                      ],
                      "type": "string",
                      "description": "Progress of work being done at the stop.",
                      "example": "Complete"
                    },
                    "location": {
                      "title": "Location",
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The name of location where stop activity occurs.",
                          "example": "RAIL YARD XYZ"
                        },
                        "type": {
                          "type": "string",
                          "description": "Describes the type of location (useful for determining rail yards).",
                          "example": "RAIL"
                        },
                        "address": {
                          "title": "Address",
                          "required": [
                            "adminArea1",
                            "locality",
                            "postalCode",
                            "countryCode"
                          ],
                          "type": "object",
                          "properties": {
                            "streetAddress": {
                              "type": "string",
                              "description": "Address (eg. number, street, etc.)."
                            },
                            "adminArea1": {
                              "type": "string",
                              "description": "Province, state, or [ISO-3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision."
                            },
                            "adminArea2": {
                              "type": "string",
                              "description": "Subdivision smaller than `adminArea1`. In the United States, this refers to county."
                            },
                            "locality": {
                              "type": "string",
                              "description": "City or town."
                            },
                            "neighborhood": {
                              "type": "string",
                              "description": "Neighborhood"
                            },
                            "postalCode": {
                              "type": "string",
                              "description": "ZIP, postcode, or postal code."
                            },
                            "countryCode": {
                              "maxLength": 3,
                              "minLength": 3,
                              "pattern": "^[A-Z]{3}$",
                              "type": "string",
                              "description": "[ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) country code."
                            }
                          },
                          "description": "Postal address for a location.\n",
                          "example": {
                            "streetAddress": "615 J B Hunt Corporate Dr",
                            "adminArea1": "AR",
                            "locality": "Lowell",
                            "postalCode": "72745",
                            "countryCode": "USA"
                          }
                        },
                        "coordinates": {
                          "title": "Coordinates",
                          "type": "object",
                          "properties": {
                            "longitude": {
                              "maximum": 180.0,
                              "minimum": -180.0,
                              "type": "number",
                              "description": "The arc or portion of the earth's equator intersected between the meridian of a given place and the prime meridian and expressed either in degrees or in time",
                              "format": "double",
                              "example": -94.136986
                            },
                            "latitude": {
                              "maximum": 90.0,
                              "minimum": -90.0,
                              "type": "number",
                              "description": "Angular distance north or south from the earth's equator measured through 90 degrees",
                              "format": "double",
                              "example": 36.246883
                            }
                          },
                          "description": "Longitude and latitude for a location along with metadata about the source data.\n"
                        }
                      },
                      "description": "Information about the stop, including the name, address, and coordinates.\n"
                    },
                    "appointmentWindowStartDateTime": {
                      "allOf": [
                        {
                          "title": "Date Time",
                          "type": "string",
                          "description": "As defined by `date-time` in [Section 5.6 of RFC 3339](https://tools.ietf.org/html/rfc3339#section-5.6)",
                          "format": "date-time"
                        }
                      ],
                      "description": "Start of the appointment window.\nAppointment window start date time is populated as follows:\nActual appointment window - If it is any non-ramp stop.\nPlanned cutoff time - If it is the origin ramp on a rail segment.\n"
                    },
                    "appointmentWindowEndDateTime": {
                      "allOf": [
                        {
                          "title": "Date Time",
                          "type": "string",
                          "description": "As defined by `date-time` in [Section 5.6 of RFC 3339](https://tools.ietf.org/html/rfc3339#section-5.6)",
                          "format": "date-time"
                        }
                      ],
                      "description": "End of the appointment window.\nAppointment window end date time is populated as follows:\nActual appointment window - If it is any non-ramp stop.\nPlanned cutoff time - If it is the origin ramp on a rail segment.\n"
                    },
                    "estimatedArrivalDateTime": {
                      "allOf": [
                        {
                          "title": "Date Time",
                          "type": "string",
                          "description": "As defined by `date-time` in [Section 5.6 of RFC 3339](https://tools.ietf.org/html/rfc3339#section-5.6)",
                          "format": "date-time"
                        }
                      ],
                      "description": "When the equipment carrying the load is estimated to arrive at the stop."
                    },
                    "estimatedDepartureDateTime": {
                      "allOf": [
                        {
                          "title": "Date Time",
                          "type": "string",
                          "description": "As defined by `date-time` in [Section 5.6 of RFC 3339](https://tools.ietf.org/html/rfc3339#section-5.6)",
                          "format": "date-time"
                        }
                      ],
                      "description": "When the equipment carrying the load is estimated to leave the stop."
                    },
                    "arrivalDateTime": {
                      "allOf": [
                        {
                          "title": "Date Time",
                          "type": "string",
                          "description": "As defined by `date-time` in [Section 5.6 of RFC 3339](https://tools.ietf.org/html/rfc3339#section-5.6)",
                          "format": "date-time"
                        }
                      ],
                      "description": "When the equipment carrying the load arrived at the stop.\nArrival timestamp is populated as follows:\nTruck Arrival - If it is any non-ramp stop.\nIngate\n  - If it is the ramp stop on a truck segment prior to a rail segment.\n  - If it is the origin ramp on a rail segment.\nTrain Arrival - If it is the destination ramp on a rail segment.\nDeramp - If it is the first stop of truck segment directly after a rail segment.\n"
                    },
                    "departureDateTime": {
                      "allOf": [
                        {
                          "title": "Date Time",
                          "type": "string",
                          "description": "As defined by `date-time` in [Section 5.6 of RFC 3339](https://tools.ietf.org/html/rfc3339#section-5.6)",
                          "format": "date-time"
                        }
                      ],
                      "description": "When the equipment carrying the load left the stop.\nDeparture timestamp is populated as follows:\nTruck Departure - If it is any non-ramp stop.\nIngate - If it is the ramp stop on a truck segment prior to a rail segment.\nTrain Departure - If it is the origin ramp on a rail segment.\nDeramp - If it is the destination ramp on a rail segment.\n"
                    },
                    "arrivalStatus": {
                      "enum": [
                        "ON_TIME",
                        "EARLY",
                        "LATE",
                        "NONE"
                      ],
                      "type": "string",
                      "description": "The status of an arrival at the customer",
                      "example": "ON_TIME"
                    },
                    "referenceIdentifiers": {
                      "type": "array",
                      "items": {
                        "title": "Reference Identifier",
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "description": "The type of reference identifier.",
                            "example": "billTo"
                          },
                          "value": {
                            "type": "string",
                            "description": "Reference identifier",
                            "example": "CUSTXYZ"
                          }
                        },
                        "description": "Identifier that can be tied to a movement.\n"
                      },
                      "description": "Reference identifiers related to the stop."
                    }
                  },
                  "description": "Tracks destinations and activities at different stops for the current leg.\n"
                },
                "description": "List of stops for a leg"
              },
              "transitExceptions": {
                "type": "array",
                "items": {
                  "title": "Transit Exception",
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "description": "The type of transit exception."
                    },
                    "description": {
                      "type": "string",
                      "description": "Describes the type of transit exception that has occurred."
                    },
                    "exceptionStartDateTime": {
                      "allOf": [
                        {
                          "title": "Date Time",
                          "type": "string",
                          "description": "As defined by `date-time` in [Section 5.6 of RFC 3339](https://tools.ietf.org/html/rfc3339#section-5.6)",
                          "format": "date-time"
                        }
                      ],
                      "description": "Date and time of when the transit exception occurred."
                    },
                    "exceptionEndDateTime": {
                      "allOf": [
                        {
                          "title": "Date Time",
                          "type": "string",
                          "description": "As defined by `date-time` in [Section 5.6 of RFC 3339](https://tools.ietf.org/html/rfc3339#section-5.6)",
                          "format": "date-time"
                        }
                      ],
                      "description": "Date and time of when the transit exception was resolved."
                    }
                  },
                  "description": "Transit exception that may occur on a segment.",
                  "example": {
                    "type": "RailServiceInterruption",
                    "description": "Rail Service Interruption",
                    "exceptionStartDateTime": "2020-01-01T06:23:45Z",
                    "exceptionEndDateTime": "2020-01-02T02:23:45Z"
                  }
                },
                "description": "List of transit exceptions that have occurred on a leg."
              },
              "trailer": {
                "title": "Trailer",
                "type": "object",
                "properties": {
                  "prefix": {
                    "type": "string",
                    "description": "Trailer prefix"
                  },
                  "id": {
                    "type": "string",
                    "description": "Trailer id"
                  }
                },
                "description": "The identifier details for a trailer\n",
                "example": {
                  "prefix": "PREF",
                  "id": "T55555"
                }
              }
            },
            "description": "A segment of the movement carried out by a truck or train.\n"
          },
          "description": "Segments of a move completed by a trailer, truck, or other mode of transportation."
        },
        "latestTelemetry": {
          "title": "Latest Telemetry",
          "type": "object",
          "properties": {
            "coordinates": {
              "title": "Telemetry Coordinates",
              "allOf": [
                {
                  "title": "Coordinates",
                  "type": "object",
                  "properties": {
                    "longitude": {
                      "maximum": 180.0,
                      "minimum": -180.0,
                      "type": "number",
                      "description": "The arc or portion of the earth's equator intersected between the meridian of a given place and the prime meridian and expressed either in degrees or in time",
                      "format": "double",
                      "example": -94.136986
                    },
                    "latitude": {
                      "maximum": 90.0,
                      "minimum": -90.0,
                      "type": "number",
                      "description": "Angular distance north or south from the earth's equator measured through 90 degrees",
                      "format": "double",
                      "example": 36.246883
                    }
                  },
                  "description": "Longitude and latitude for a location along with metadata about the source data.\n"
                },
                {
                  "required": [
                    "longitude",
                    "latitude",
                    "lastUpdated",
                    "sourceType"
                  ],
                  "type": "object",
                  "properties": {
                    "lastUpdated": {
                      "allOf": [
                        {
                          "title": "Date Time",
                          "type": "string",
                          "description": "As defined by `date-time` in [Section 5.6 of RFC 3339](https://tools.ietf.org/html/rfc3339#section-5.6)",
                          "format": "date-time"
                        }
                      ],
                      "description": "The date and time the GPS data was created."
                    },
                    "sourceType": {
                      "type": "string",
                      "description": "The type of device used to get the GPS location.",
                      "example": "GPS"
                    },
                    "accuracy": {
                      "type": "number",
                      "description": "The accuracy rating of the GPS location.",
                      "example": 98.65
                    },
                    "quality": {
                      "type": "string",
                      "description": "The quality of the GPS location.",
                      "example": "EXCELLENT"
                    }
                  }
                }
              ],
              "description": "Longitude and latitude for a location along with metadata about the source data.\n"
            },
            "sensors": {
              "type": "array",
              "items": {
                "title": "Sensor Measurement",
                "required": [
                  "units",
                  "value"
                ],
                "type": "object",
                "properties": {
                  "units": {
                    "type": "string",
                    "description": "A single quantity regarded as a whole in calculation.",
                    "example": "FAHRENHEIT"
                  },
                  "value": {
                    "type": "string",
                    "description": "A numerical quantity that is assigned or is determined by calculation or measurement."
                  },
                  "minimum": {
                    "type": "string",
                    "description": "The least quantity admissible."
                  },
                  "maximum": {
                    "type": "string",
                    "description": "The upper limit allowed."
                  },
                  "target": {
                    "type": "string",
                    "description": "Desired value"
                  },
                  "type": {
                    "type": "string",
                    "description": "Type of value",
                    "example": "Temperature"
                  },
                  "lastUpdated": {
                    "allOf": [
                      {
                        "title": "Date Time",
                        "type": "string",
                        "description": "As defined by `date-time` in [Section 5.6 of RFC 3339](https://tools.ietf.org/html/rfc3339#section-5.6)",
                        "format": "date-time"
                      }
                    ],
                    "description": "The date and time of when the sensor data was created."
                  },
                  "sourceType": {
                    "type": "string",
                    "description": "The source that performed the measurement",
                    "example": "THERMOSTAT"
                  }
                },
                "description": "Information from sensors on the asset, such as temperature readings for refrigerated units.\n"
              },
              "description": "List of sensor measurements for the movement."
            },
            "trailerStatus": {
              "enum": [
                "LOADED",
                "EMPTY"
              ],
              "type": "string",
              "description": "Describes whether the current trailer is Loaded or unloaded.",
              "example": "LOADED"
            },
            "address": {
              "title": "Address",
              "required": [
                "adminArea1",
                "locality",
                "postalCode",
                "countryCode"
              ],
              "type": "object",
              "properties": {
                "streetAddress": {
                  "type": "string",
                  "description": "Address (eg. number, street, etc.)."
                },
                "adminArea1": {
                  "type": "string",
                  "description": "Province, state, or [ISO-3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision."
                },
                "adminArea2": {
                  "type": "string",
                  "description": "Subdivision smaller than `adminArea1`. In the United States, this refers to county."
                },
                "locality": {
                  "type": "string",
                  "description": "City or town."
                },
                "neighborhood": {
                  "type": "string",
                  "description": "Neighborhood"
                },
                "postalCode": {
                  "type": "string",
                  "description": "ZIP, postcode, or postal code."
                },
                "countryCode": {
                  "maxLength": 3,
                  "minLength": 3,
                  "pattern": "^[A-Z]{3}$",
                  "type": "string",
                  "description": "[ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) country code."
                }
              },
              "description": "Postal address for a location.\n",
              "example": {
                "streetAddress": "615 J B Hunt Corporate Dr",
                "adminArea1": "AR",
                "locality": "Lowell",
                "postalCode": "72745",
                "countryCode": "USA"
              }
            }
          },
          "description": "Contains data from sensors and onboard computers about the current state of the in-transit leg or most recently completed leg.\n"
        },
        "latestLocation": {
          "title": "Latest Location",
          "type": "object",
          "properties": {
            "location": {
              "title": "Location",
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "The name of location where stop activity occurs.",
                  "example": "RAIL YARD XYZ"
                },
                "type": {
                  "type": "string",
                  "description": "Describes the type of location (useful for determining rail yards).",
                  "example": "RAIL"
                },
                "address": {
                  "title": "Address",
                  "required": [
                    "adminArea1",
                    "locality",
                    "postalCode",
                    "countryCode"
                  ],
                  "type": "object",
                  "properties": {
                    "streetAddress": {
                      "type": "string",
                      "description": "Address (eg. number, street, etc.)."
                    },
                    "adminArea1": {
                      "type": "string",
                      "description": "Province, state, or [ISO-3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision."
                    },
                    "adminArea2": {
                      "type": "string",
                      "description": "Subdivision smaller than `adminArea1`. In the United States, this refers to county."
                    },
                    "locality": {
                      "type": "string",
                      "description": "City or town."
                    },
                    "neighborhood": {
                      "type": "string",
                      "description": "Neighborhood"
                    },
                    "postalCode": {
                      "type": "string",
                      "description": "ZIP, postcode, or postal code."
                    },
                    "countryCode": {
                      "maxLength": 3,
                      "minLength": 3,
                      "pattern": "^[A-Z]{3}$",
                      "type": "string",
                      "description": "[ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) country code."
                    }
                  },
                  "description": "Postal address for a location.\n",
                  "example": {
                    "streetAddress": "615 J B Hunt Corporate Dr",
                    "adminArea1": "AR",
                    "locality": "Lowell",
                    "postalCode": "72745",
                    "countryCode": "USA"
                  }
                },
                "coordinates": {
                  "title": "Coordinates",
                  "type": "object",
                  "properties": {
                    "longitude": {
                      "maximum": 180.0,
                      "minimum": -180.0,
                      "type": "number",
                      "description": "The arc or portion of the earth's equator intersected between the meridian of a given place and the prime meridian and expressed either in degrees or in time",
                      "format": "double",
                      "example": -94.136986
                    },
                    "latitude": {
                      "maximum": 90.0,
                      "minimum": -90.0,
                      "type": "number",
                      "description": "Angular distance north or south from the earth's equator measured through 90 degrees",
                      "format": "double",
                      "example": 36.246883
                    }
                  },
                  "description": "Longitude and latitude for a location along with metadata about the source data.\n"
                }
              },
              "description": "Information about the stop, including the name, address, and coordinates.\n"
            },
            "timestamp": {
              "allOf": [
                {
                  "title": "Date Time",
                  "type": "string",
                  "description": "As defined by `date-time` in [Section 5.6 of RFC 3339](https://tools.ietf.org/html/rfc3339#section-5.6)",
                  "format": "date-time"
                }
              ],
              "description": "The date and time of when the location data was updated."
            },
            "sourceType": {
              "type": "string",
              "description": "The source of the location data, such as \"Orbcomm\" or \"Shipper Location\".",
              "example": "Orbcomm"
            }
          },
          "description": "Contains the most up-to-date location available from many sources, such as on-board GPS devices or operational check calls. If no location data is available  from any sources, it will simply be the location of the first stop.\n"
        },
        "status": {
          "title": "Status",
          "enum": [
            "Planned",
            "InTransit",
            "Complete",
            "Cancelled"
          ],
          "type": "string",
          "description": "Shows the overall transit status for the trackable (Planned, InTransit, Complete, Cancelled).",
          "example": "InTransit"
        }
      },
      "description": "Shared properties for trackables."
    },
    {
      "properties": {
        "shipmentDetails": {
          "title": "Shipment Details",
          "type": "object",
          "properties": {
            "deliveryStopId": {
              "title": "Stop Identifier",
              "type": "string",
              "description": "Identifier for the stop.",
              "example": "S12345"
            },
            "commodityCode": {
              "type": "string",
              "description": "Commodity code",
              "example": "MOSAIC REC"
            },
            "itemPackageType": {
              "type": "string",
              "description": "Packaging for item(s)",
              "example": "Pieces"
            },
            "itemPackageQuantity": {
              "type": "number",
              "description": "Quantity of items being shipped.",
              "example": 1.0
            },
            "weight": {
              "allOf": [
                {
                  "title": "Simple Measurement",
                  "required": [
                    "units",
                    "value"
                  ],
                  "type": "object",
                  "properties": {
                    "units": {
                      "pattern": "^[A-Z][a-zA-Z]+$",
                      "type": "string",
                      "description": "Plural, PascalCase unit of measure (e.g., Kilograms, Miles, CubicFeet)."
                    },
                    "value": {
                      "type": "number",
                      "description": "value"
                    }
                  },
                  "description": "A numeric value with units.\n"
                }
              ],
              "description": "Weight of item(s) being shipped.",
              "example": {
                "value": 56.54,
                "units": "Pounds"
              }
            }
          },
          "description": "Describes what is being shipped.\n"
        }
      }
    }
  ],
  "description": "Shipment - The overall journey from beginning to final delivery.\n"
}

400 Bad Request

Cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). See RFC 7231, Section 6.5.1.

Representations

{
  "type": "about:blank",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "dateTime": {},
  "issues": [
    {
      "description": "string",
      "field": {},
      "location": "body",
      "value": {}
    }
  ]
}
{
  "title": "Problem Details",
  "allOf": [
    {
      "title": "Core Problem Details",
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "description": "A [URI reference](https://tools.ietf.org/html/rfc3986#section-4.1) that identifies the problem type. This specification encourages that, when dereferenced, it provide human-readable documentation for the problem type (e.g., using [HTML](https://www.w3.org/TR/2014/REC-html5-20141028)). When this member is not present, its value is assumed to be `\"about:blank\"`.",
          "default": "about:blank"
        },
        "title": {
          "type": "string",
          "description": "A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive [content negotiation](https://tools.ietf.org/html/rfc7231#section-3.4))."
        },
        "status": {
          "maximum": 600.0,
          "exclusiveMaximum": true,
          "minimum": 100.0,
          "type": "integer",
          "description": "The [HTTP status code](https://tools.ietf.org/html/rfc7231#section-6) generated by the origin server for this occurrence of the problem."
        },
        "detail": {
          "type": "string",
          "description": "A human-readable explanation specific to this occurrence of the problem."
        },
        "instance": {
          "type": "string",
          "description": "A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced."
        }
      },
      "description": "The core problem details object. See [Section 3.1 of RFC 7807](https://tools.ietf.org/html/rfc7807#section-3.1)."
    },
    {
      "title": "Problem Details Extensions",
      "type": "object",
      "properties": {
        "dateTime": {
          "allOf": [
            {
              "title": "Date Time",
              "type": "string",
              "description": "As defined by `date-time` in [Section 5.6 of RFC 3339](https://tools.ietf.org/html/rfc3339#section-5.6)",
              "format": "date-time"
            }
          ],
          "description": "The date and time that the problem occurred."
        },
        "issues": {
          "type": "array",
          "items": {
            "title": "Issue",
            "required": [
              "description",
              "field",
              "location"
            ],
            "type": "object",
            "properties": {
              "description": {
                "type": "string",
                "description": "A human-readable explanation of the specific issue."
              },
              "field": {
                "anyOf": [
                  {
                    "title": "JSON Pointer",
                    "pattern": "^(\\/([^/~]|~[01])*)*$",
                    "type": "string",
                    "description": "A string representing a JSON Pointer as defined by [RFC 6901](https://tools.ietf.org/html/rfc6901)."
                  },
                  {
                    "type": "string"
                  }
                ],
                "description": "The name of the field in error. If `location` is `body`, then this MUST be either a [JSON pointer](https://tools.ietf.org/html/rfc6901) or an [XPath expression](https://www.w3.org/TR/1999/REC-xpath-19991116) referring to the field of the body."
              },
              "location": {
                "enum": [
                  "body",
                  "header",
                  "path",
                  "query"
                ],
                "type": "string",
                "description": "The location of the issue.",
                "default": "body"
              },
              "value": {
                "allOf": [
                  {
                    "title": "Any?",
                    "allOf": [
                      {
                        "title": "Any",
                        "oneOf": [
                          {
                            "title": "Any Primitive",
                            "oneOf": [
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "string"
                              }
                            ],
                            "description": "Any non-nullable primitive JSON value"
                          },
                          {
                            "title": "Any Structured Value",
                            "oneOf": [
                              {
                                "type": "array"
                              },
                              {
                                "type": "object"
                              }
                            ],
                            "description": "Any non-nullable structured JSON value"
                          }
                        ],
                        "description": "Any non-nullable JSON value"
                      }
                    ],
                    "description": "Any nullable JSON value",
                    "nullable": true
                  }
                ],
                "description": "The value of the field in error."
              }
            },
            "description": "An object describing the issue of a particular field in an HTTP request message."
          },
          "description": "An array of issues related to specific fields in the HTTP request message."
        }
      },
      "description": "Custom J.B. Hunt extensions to the problems details format"
    }
  ],
  "description": "The [Problem Details for HTTP APIs](https://tools.ietf.org/html/rfc7807) format with extensions."
}

401 Unauthorized

The request has not been applied because it lacks valid authentication credentials for the target resource. See RFC 7235, Section 3.1.

Representations

{
  "status": 401,
  "title": "Missing or Invalid API Key",
  "details": "Access denied due to missing API key. Make sure to include API key when making requests to an API.\n",
  "instance": "urn:uuid:d7ec3301-412c-4903-a00c-524c3efc0eba"
}
{
  "title": "Problem Details",
  "allOf": [
    {
      "title": "Core Problem Details",
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "description": "A [URI reference](https://tools.ietf.org/html/rfc3986#section-4.1) that identifies the problem type. This specification encourages that, when dereferenced, it provide human-readable documentation for the problem type (e.g., using [HTML](https://www.w3.org/TR/2014/REC-html5-20141028)). When this member is not present, its value is assumed to be `\"about:blank\"`.",
          "default": "about:blank"
        },
        "title": {
          "type": "string",
          "description": "A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive [content negotiation](https://tools.ietf.org/html/rfc7231#section-3.4))."
        },
        "status": {
          "maximum": 600.0,
          "exclusiveMaximum": true,
          "minimum": 100.0,
          "type": "integer",
          "description": "The [HTTP status code](https://tools.ietf.org/html/rfc7231#section-6) generated by the origin server for this occurrence of the problem."
        },
        "detail": {
          "type": "string",
          "description": "A human-readable explanation specific to this occurrence of the problem."
        },
        "instance": {
          "type": "string",
          "description": "A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced."
        }
      },
      "description": "The core problem details object. See [Section 3.1 of RFC 7807](https://tools.ietf.org/html/rfc7807#section-3.1)."
    },
    {
      "title": "Problem Details Extensions",
      "type": "object",
      "properties": {
        "dateTime": {
          "allOf": [
            {
              "title": "Date Time",
              "type": "string",
              "description": "As defined by `date-time` in [Section 5.6 of RFC 3339](https://tools.ietf.org/html/rfc3339#section-5.6)",
              "format": "date-time"
            }
          ],
          "description": "The date and time that the problem occurred."
        },
        "issues": {
          "type": "array",
          "items": {
            "title": "Issue",
            "required": [
              "description",
              "field",
              "location"
            ],
            "type": "object",
            "properties": {
              "description": {
                "type": "string",
                "description": "A human-readable explanation of the specific issue."
              },
              "field": {
                "anyOf": [
                  {
                    "title": "JSON Pointer",
                    "pattern": "^(\\/([^/~]|~[01])*)*$",
                    "type": "string",
                    "description": "A string representing a JSON Pointer as defined by [RFC 6901](https://tools.ietf.org/html/rfc6901)."
                  },
                  {
                    "type": "string"
                  }
                ],
                "description": "The name of the field in error. If `location` is `body`, then this MUST be either a [JSON pointer](https://tools.ietf.org/html/rfc6901) or an [XPath expression](https://www.w3.org/TR/1999/REC-xpath-19991116) referring to the field of the body."
              },
              "location": {
                "enum": [
                  "body",
                  "header",
                  "path",
                  "query"
                ],
                "type": "string",
                "description": "The location of the issue.",
                "default": "body"
              },
              "value": {
                "allOf": [
                  {
                    "title": "Any?",
                    "allOf": [
                      {
                        "title": "Any",
                        "oneOf": [
                          {
                            "title": "Any Primitive",
                            "oneOf": [
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "string"
                              }
                            ],
                            "description": "Any non-nullable primitive JSON value"
                          },
                          {
                            "title": "Any Structured Value",
                            "oneOf": [
                              {
                                "type": "array"
                              },
                              {
                                "type": "object"
                              }
                            ],
                            "description": "Any non-nullable structured JSON value"
                          }
                        ],
                        "description": "Any non-nullable JSON value"
                      }
                    ],
                    "description": "Any nullable JSON value",
                    "nullable": true
                  }
                ],
                "description": "The value of the field in error."
              }
            },
            "description": "An object describing the issue of a particular field in an HTTP request message."
          },
          "description": "An array of issues related to specific fields in the HTTP request message."
        }
      },
      "description": "Custom J.B. Hunt extensions to the problems details format"
    }
  ],
  "description": "The [Problem Details for HTTP APIs](https://tools.ietf.org/html/rfc7807) format with extensions."
}

404 Not Found

Could not find a current representation for the target resource or is not willing to disclose that one exists. See RFC 7231, Section 6.5.5.

Representations

{
  "type": "about:blank",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "dateTime": {},
  "issues": [
    {
      "description": "string",
      "field": {},
      "location": "body",
      "value": {}
    }
  ]
}
{
  "title": "Problem Details",
  "allOf": [
    {
      "title": "Core Problem Details",
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "description": "A [URI reference](https://tools.ietf.org/html/rfc3986#section-4.1) that identifies the problem type. This specification encourages that, when dereferenced, it provide human-readable documentation for the problem type (e.g., using [HTML](https://www.w3.org/TR/2014/REC-html5-20141028)). When this member is not present, its value is assumed to be `\"about:blank\"`.",
          "default": "about:blank"
        },
        "title": {
          "type": "string",
          "description": "A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive [content negotiation](https://tools.ietf.org/html/rfc7231#section-3.4))."
        },
        "status": {
          "maximum": 600.0,
          "exclusiveMaximum": true,
          "minimum": 100.0,
          "type": "integer",
          "description": "The [HTTP status code](https://tools.ietf.org/html/rfc7231#section-6) generated by the origin server for this occurrence of the problem."
        },
        "detail": {
          "type": "string",
          "description": "A human-readable explanation specific to this occurrence of the problem."
        },
        "instance": {
          "type": "string",
          "description": "A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced."
        }
      },
      "description": "The core problem details object. See [Section 3.1 of RFC 7807](https://tools.ietf.org/html/rfc7807#section-3.1)."
    },
    {
      "title": "Problem Details Extensions",
      "type": "object",
      "properties": {
        "dateTime": {
          "allOf": [
            {
              "title": "Date Time",
              "type": "string",
              "description": "As defined by `date-time` in [Section 5.6 of RFC 3339](https://tools.ietf.org/html/rfc3339#section-5.6)",
              "format": "date-time"
            }
          ],
          "description": "The date and time that the problem occurred."
        },
        "issues": {
          "type": "array",
          "items": {
            "title": "Issue",
            "required": [
              "description",
              "field",
              "location"
            ],
            "type": "object",
            "properties": {
              "description": {
                "type": "string",
                "description": "A human-readable explanation of the specific issue."
              },
              "field": {
                "anyOf": [
                  {
                    "title": "JSON Pointer",
                    "pattern": "^(\\/([^/~]|~[01])*)*$",
                    "type": "string",
                    "description": "A string representing a JSON Pointer as defined by [RFC 6901](https://tools.ietf.org/html/rfc6901)."
                  },
                  {
                    "type": "string"
                  }
                ],
                "description": "The name of the field in error. If `location` is `body`, then this MUST be either a [JSON pointer](https://tools.ietf.org/html/rfc6901) or an [XPath expression](https://www.w3.org/TR/1999/REC-xpath-19991116) referring to the field of the body."
              },
              "location": {
                "enum": [
                  "body",
                  "header",
                  "path",
                  "query"
                ],
                "type": "string",
                "description": "The location of the issue.",
                "default": "body"
              },
              "value": {
                "allOf": [
                  {
                    "title": "Any?",
                    "allOf": [
                      {
                        "title": "Any",
                        "oneOf": [
                          {
                            "title": "Any Primitive",
                            "oneOf": [
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "string"
                              }
                            ],
                            "description": "Any non-nullable primitive JSON value"
                          },
                          {
                            "title": "Any Structured Value",
                            "oneOf": [
                              {
                                "type": "array"
                              },
                              {
                                "type": "object"
                              }
                            ],
                            "description": "Any non-nullable structured JSON value"
                          }
                        ],
                        "description": "Any non-nullable JSON value"
                      }
                    ],
                    "description": "Any nullable JSON value",
                    "nullable": true
                  }
                ],
                "description": "The value of the field in error."
              }
            },
            "description": "An object describing the issue of a particular field in an HTTP request message."
          },
          "description": "An array of issues related to specific fields in the HTTP request message."
        }
      },
      "description": "Custom J.B. Hunt extensions to the problems details format"
    }
  ],
  "description": "The [Problem Details for HTTP APIs](https://tools.ietf.org/html/rfc7807) format with extensions."
}

500 Internal Server Error

The server encountered an unexpected condition that prevented it from fulfilling the request. See RFC 7231, Section 6.6.1.

Representations

{
  "type": "about:blank",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "dateTime": {},
  "issues": [
    {
      "description": "string",
      "field": {},
      "location": "body",
      "value": {}
    }
  ]
}
{
  "title": "Problem Details",
  "allOf": [
    {
      "title": "Core Problem Details",
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "description": "A [URI reference](https://tools.ietf.org/html/rfc3986#section-4.1) that identifies the problem type. This specification encourages that, when dereferenced, it provide human-readable documentation for the problem type (e.g., using [HTML](https://www.w3.org/TR/2014/REC-html5-20141028)). When this member is not present, its value is assumed to be `\"about:blank\"`.",
          "default": "about:blank"
        },
        "title": {
          "type": "string",
          "description": "A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive [content negotiation](https://tools.ietf.org/html/rfc7231#section-3.4))."
        },
        "status": {
          "maximum": 600.0,
          "exclusiveMaximum": true,
          "minimum": 100.0,
          "type": "integer",
          "description": "The [HTTP status code](https://tools.ietf.org/html/rfc7231#section-6) generated by the origin server for this occurrence of the problem."
        },
        "detail": {
          "type": "string",
          "description": "A human-readable explanation specific to this occurrence of the problem."
        },
        "instance": {
          "type": "string",
          "description": "A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced."
        }
      },
      "description": "The core problem details object. See [Section 3.1 of RFC 7807](https://tools.ietf.org/html/rfc7807#section-3.1)."
    },
    {
      "title": "Problem Details Extensions",
      "type": "object",
      "properties": {
        "dateTime": {
          "allOf": [
            {
              "title": "Date Time",
              "type": "string",
              "description": "As defined by `date-time` in [Section 5.6 of RFC 3339](https://tools.ietf.org/html/rfc3339#section-5.6)",
              "format": "date-time"
            }
          ],
          "description": "The date and time that the problem occurred."
        },
        "issues": {
          "type": "array",
          "items": {
            "title": "Issue",
            "required": [
              "description",
              "field",
              "location"
            ],
            "type": "object",
            "properties": {
              "description": {
                "type": "string",
                "description": "A human-readable explanation of the specific issue."
              },
              "field": {
                "anyOf": [
                  {
                    "title": "JSON Pointer",
                    "pattern": "^(\\/([^/~]|~[01])*)*$",
                    "type": "string",
                    "description": "A string representing a JSON Pointer as defined by [RFC 6901](https://tools.ietf.org/html/rfc6901)."
                  },
                  {
                    "type": "string"
                  }
                ],
                "description": "The name of the field in error. If `location` is `body`, then this MUST be either a [JSON pointer](https://tools.ietf.org/html/rfc6901) or an [XPath expression](https://www.w3.org/TR/1999/REC-xpath-19991116) referring to the field of the body."
              },
              "location": {
                "enum": [
                  "body",
                  "header",
                  "path",
                  "query"
                ],
                "type": "string",
                "description": "The location of the issue.",
                "default": "body"
              },
              "value": {
                "allOf": [
                  {
                    "title": "Any?",
                    "allOf": [
                      {
                        "title": "Any",
                        "oneOf": [
                          {
                            "title": "Any Primitive",
                            "oneOf": [
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "string"
                              }
                            ],
                            "description": "Any non-nullable primitive JSON value"
                          },
                          {
                            "title": "Any Structured Value",
                            "oneOf": [
                              {
                                "type": "array"
                              },
                              {
                                "type": "object"
                              }
                            ],
                            "description": "Any non-nullable structured JSON value"
                          }
                        ],
                        "description": "Any non-nullable JSON value"
                      }
                    ],
                    "description": "Any nullable JSON value",
                    "nullable": true
                  }
                ],
                "description": "The value of the field in error."
              }
            },
            "description": "An object describing the issue of a particular field in an HTTP request message."
          },
          "description": "An array of issues related to specific fields in the HTTP request message."
        }
      },
      "description": "Custom J.B. Hunt extensions to the problems details format"
    }
  ],
  "description": "The [Problem Details for HTTP APIs](https://tools.ietf.org/html/rfc7807) format with extensions."
}

Code samples

@ECHO OFF

curl -v -X GET "https://api.jbhunt.com/tracking/shipments/{trackableId}"
-H "Api-Key: {subscription key}"
-H "Authorization: {access token}"

--data-ascii "{body}" 
using System;
using System.Net.Http.Headers;
using System.Text;
using System.Net.Http;
using System.Web;

namespace CSHttpClientSample
{
    static class Program
    {
        static void Main()
        {
            MakeRequest();
            Console.WriteLine("Hit ENTER to exit...");
            Console.ReadLine();
        }
        
        static async void MakeRequest()
        {
            var client = new HttpClient();
            var queryString = HttpUtility.ParseQueryString(string.Empty);

            // Request headers
            client.DefaultRequestHeaders.Add("Api-Key", "{subscription key}");
            client.DefaultRequestHeaders.Add("Authorization", "{access token}");

            var uri = "https://api.jbhunt.com/tracking/shipments/{trackableId}?" + queryString;

            var response = await client.GetAsync(uri);
        }
    }
}	
// // This sample uses the Apache HTTP client from HTTP Components (http://hc.apache.org/httpcomponents-client-ga/)
import java.net.URI;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.utils.URIBuilder;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;

public class JavaSample 
{
    public static void main(String[] args) 
    {
        HttpClient httpclient = HttpClients.createDefault();

        try
        {
            URIBuilder builder = new URIBuilder("https://api.jbhunt.com/tracking/shipments/{trackableId}");


            URI uri = builder.build();
            HttpGet request = new HttpGet(uri);
            request.setHeader("Api-Key", "{subscription key}");
            request.setHeader("Authorization", "{access token}");


            // Request body
            StringEntity reqEntity = new StringEntity("{body}");
            request.setEntity(reqEntity);

            HttpResponse response = httpclient.execute(request);
            HttpEntity entity = response.getEntity();

            if (entity != null) 
            {
                System.out.println(EntityUtils.toString(entity));
            }
        }
        catch (Exception e)
        {
            System.out.println(e.getMessage());
        }
    }
}

<!DOCTYPE html>
<html>
<head>
    <title>JSSample</title>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
</head>
<body>

<script type="text/javascript">
    $(function() {
        var params = {
            // Request parameters
        };
      
        $.ajax({
            url: "https://api.jbhunt.com/tracking/shipments/{trackableId}?" + $.param(params),
            beforeSend: function(xhrObj){
                // Request headers
                xhrObj.setRequestHeader("Api-Key","{subscription key}");
                xhrObj.setRequestHeader("Authorization","{access token}");
            },
            type: "GET",
            // Request body
            data: "{body}",
        })
        .done(function(data) {
            alert("success");
        })
        .fail(function() {
            alert("error");
        });
    });
</script>
</body>
</html>
#import <Foundation/Foundation.h>

int main(int argc, const char * argv[])
{
    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
    
    NSString* path = @"https://api.jbhunt.com/tracking/shipments/{trackableId}";
    NSArray* array = @[
                         // Request parameters
                         @"entities=true",
                      ];
    
    NSString* string = [array componentsJoinedByString:@"&"];
    path = [path stringByAppendingFormat:@"?%@", string];

    NSLog(@"%@", path);

    NSMutableURLRequest* _request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:path]];
    [_request setHTTPMethod:@"GET"];
    // Request headers
    [_request setValue:@"{subscription key}" forHTTPHeaderField:@"Api-Key"];
    [_request setValue:@"{access token}" forHTTPHeaderField:@"Authorization"];
    // Request body
    [_request setHTTPBody:[@"{body}" dataUsingEncoding:NSUTF8StringEncoding]];
    
    NSURLResponse *response = nil;
    NSError *error = nil;
    NSData* _connectionData = [NSURLConnection sendSynchronousRequest:_request returningResponse:&response error:&error];

    if (nil != error)
    {
        NSLog(@"Error: %@", error);
    }
    else
    {
        NSError* error = nil;
        NSMutableDictionary* json = nil;
        NSString* dataString = [[NSString alloc] initWithData:_connectionData encoding:NSUTF8StringEncoding];
        NSLog(@"%@", dataString);
        
        if (nil != _connectionData)
        {
            json = [NSJSONSerialization JSONObjectWithData:_connectionData options:NSJSONReadingMutableContainers error:&error];
        }
        
        if (error || !json)
        {
            NSLog(@"Could not parse loaded json with error:%@", error);
        }
        
        NSLog(@"%@", json);
        _connectionData = nil;
    }
    
    [pool drain];

    return 0;
}
<?php
// This sample uses the Apache HTTP client from HTTP Components (http://hc.apache.org/httpcomponents-client-ga/)
require_once 'HTTP/Request2.php';

$request = new Http_Request2('https://api.jbhunt.com/tracking/shipments/{trackableId}');
$url = $request->getUrl();

$headers = array(
    // Request headers
    'Api-Key' => '{subscription key}',
    'Authorization' => '{access token}',
);

$request->setHeader($headers);

$parameters = array(
    // Request parameters
);

$url->setQueryVariables($parameters);

$request->setMethod(HTTP_Request2::METHOD_GET);

// Request body
$request->setBody("{body}");

try
{
    $response = $request->send();
    echo $response->getBody();
}
catch (HttpException $ex)
{
    echo $ex;
}

?>
########### Python 2.7 #############
import httplib, urllib, base64

headers = {
    # Request headers
    'Api-Key': '{subscription key}',
    'Authorization': '{access token}',
}

params = urllib.urlencode({
})

try:
    conn = httplib.HTTPSConnection('api.jbhunt.com')
    conn.request("GET", "/tracking/shipments/{trackableId}?%s" % params, "{body}", headers)
    response = conn.getresponse()
    data = response.read()
    print(data)
    conn.close()
except Exception as e:
    print("[Errno {0}] {1}".format(e.errno, e.strerror))

####################################

########### Python 3.2 #############
import http.client, urllib.request, urllib.parse, urllib.error, base64

headers = {
    # Request headers
    'Api-Key': '{subscription key}',
    'Authorization': '{access token}',
}

params = urllib.parse.urlencode({
})

try:
    conn = http.client.HTTPSConnection('api.jbhunt.com')
    conn.request("GET", "/tracking/shipments/{trackableId}?%s" % params, "{body}", headers)
    response = conn.getresponse()
    data = response.read()
    print(data)
    conn.close()
except Exception as e:
    print("[Errno {0}] {1}".format(e.errno, e.strerror))

####################################
require 'net/http'

uri = URI('https://api.jbhunt.com/tracking/shipments/{trackableId}')


request = Net::HTTP::Get.new(uri.request_uri)
# Request headers
request['Api-Key'] = '{subscription key}'
# Request headers
request['Authorization'] = '{access token}'
# Request body
request.body = "{body}"

response = Net::HTTP.start(uri.host, uri.port, :use_ssl => uri.scheme == 'https') do |http|
    http.request(request)
end

puts response.body