Operation Page Breadcrumb

Developer APIs Dynamic Quote API v2

Dynamic Quote API v2

Request Dynamic Quote

This operation returns a quote for the transport of a full-truckload shipment. Quotes can be obtained for pickups 1 to 14 days in the future, and are valid until the date of pickup. The API returns a spotPriceId that can be passed as a reference in the load tender. Rates are dynamic, based on current market conditions. Quotes are available for full-truckload shipments via 53' dryvan, refrigerated and flatbed equipment types. Modes considered are TRUCK and RAIL. For LTL rates, see the RateIt API. J.B. Hunt reserves the right to re-rate the shipment if the tendered details differ from those used to obtain the quote.

Try it

Request

Request URL

Request headers

  • (optional)
    string
    Media type of the body sent to the API.
  • 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

{
  "origin": {
    "postalCode": "72745",
    "countryCode": "USA"
  },
  "destination": {
    "postalCode": "60632",
    "countryCode": "USA"
  },
  "pickupDateTime": "2020-05-29T12:00:00+00:00",
  "shipmentId": "BOL2119221"
}
{
  "required": [
    "origin",
    "destination",
    "pickupDateTime"
  ],
  "type": "object",
  "properties": {
    "origin": {
      "required": [
        "postalCode",
        "countryCode"
      ],
      "type": "object",
      "properties": {
        "addressLine1": {
          "type": "string",
          "description": "Line 1 of the address (eg. number, street, etc.).",
          "example": "615 J.B. Hunt Drive"
        },
        "addressLine2": {
          "type": "string",
          "description": "Line 2 of the address (eg. suite, apartment \\#, etc.).",
          "example": "Suite 1"
        },
        "adminArea1": {
          "type": "string",
          "description": "Highest level sub-division of a country. Usually corresponds to province, state, or [ISO-3166-2 subdivision](https://en.wikipedia.org/wiki/ISO_3166-2).",
          "example": "AR"
        },
        "adminArea2": {
          "type": "string",
          "description": "City, municipality, town, or village (i.e., smaller than adminArea1).",
          "example": "Lowell"
        },
        "adminArea3": {
          "type": "string",
          "description": "Sub-locality, suburb, neighborhood (e.g., colonia), or district (i.e., smaller than adminArea2)."
        },
        "postalCode": {
          "type": "string",
          "description": "Corresponds to ZIP, postcode, and postal code.",
          "example": "72745"
        },
        "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.",
          "example": "USA"
        }
      },
      "description": "Portable international postal address with medium-grained fields (adapted from [PayPal's portable address](https://github.com/paypal/api-standards/blob/master/v1/schema/json/draft-04/address_portable.json))"
    },
    "destination": {
      "required": [
        "postalCode",
        "countryCode"
      ],
      "type": "object",
      "properties": {
        "addressLine1": {
          "type": "string",
          "description": "Line 1 of the address (eg. number, street, etc.).",
          "example": "615 J.B. Hunt Drive"
        },
        "addressLine2": {
          "type": "string",
          "description": "Line 2 of the address (eg. suite, apartment \\#, etc.).",
          "example": "Suite 1"
        },
        "adminArea1": {
          "type": "string",
          "description": "Highest level sub-division of a country. Usually corresponds to province, state, or [ISO-3166-2 subdivision](https://en.wikipedia.org/wiki/ISO_3166-2).",
          "example": "AR"
        },
        "adminArea2": {
          "type": "string",
          "description": "City, municipality, town, or village (i.e., smaller than adminArea1).",
          "example": "Lowell"
        },
        "adminArea3": {
          "type": "string",
          "description": "Sub-locality, suburb, neighborhood (e.g., colonia), or district (i.e., smaller than adminArea2)."
        },
        "postalCode": {
          "type": "string",
          "description": "Corresponds to ZIP, postcode, and postal code.",
          "example": "72745"
        },
        "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.",
          "example": "USA"
        }
      },
      "description": "Portable international postal address with medium-grained fields (adapted from [PayPal's portable address](https://github.com/paypal/api-standards/blob/master/v1/schema/json/draft-04/address_portable.json))"
    },
    "pickupDateTime": {
      "type": "string",
      "description": "[RFC 3339](https://tools.ietf.org/html/rfc3339#section-5.6) date-time specifying the day and time the shipment is to be picked up. If no time is available, we advise setting the time to 12:00pm on the pickup date. Quotes are available for pickup dates up to 14 days in the future. Quotes for same-day pickups are currently not available online.",
      "format": "date-time"
    },
    "deliveryDateTime": {
      "type": "string",
      "description": "[RFC 3339](https://tools.ietf.org/html/rfc3339#section-5.6) date-time specifying the delivery day and time.",
      "format": "date-time"
    },
    "shipmentId": {
      "type": "string",
      "description": "The client's unique identifier for their shipment. If this shipment is tendered to J.B. Hunt, this identifier should be included to connect the quote and tender in the event of a dispute. Not required, but highly encouraged."
    },
    "intermediateStops": {
      "type": "array",
      "items": {
        "title": "Intermediate Stop",
        "required": [
          "type",
          "address"
        ],
        "type": "object",
        "properties": {
          "number": {
            "type": "number",
            "description": "The intermediate stop sequence number, ranging from stop number 2..n-1",
            "example": 1.0
          },
          "type": {
            "enum": [
              "PICKUP",
              "DELIVERY"
            ],
            "type": "string",
            "description": "The type of stop",
            "example": "DELIVERY"
          },
          "address": {
            "required": [
              "postalCode",
              "countryCode"
            ],
            "type": "object",
            "properties": {
              "addressLine1": {
                "type": "string",
                "description": "Line 1 of the address (eg. number, street, etc.).",
                "example": "615 J.B. Hunt Drive"
              },
              "addressLine2": {
                "type": "string",
                "description": "Line 2 of the address (eg. suite, apartment \\#, etc.).",
                "example": "Suite 1"
              },
              "adminArea1": {
                "type": "string",
                "description": "Highest level sub-division of a country. Usually corresponds to province, state, or [ISO-3166-2 subdivision](https://en.wikipedia.org/wiki/ISO_3166-2).",
                "example": "AR"
              },
              "adminArea2": {
                "type": "string",
                "description": "City, municipality, town, or village (i.e., smaller than adminArea1).",
                "example": "Lowell"
              },
              "adminArea3": {
                "type": "string",
                "description": "Sub-locality, suburb, neighborhood (e.g., colonia), or district (i.e., smaller than adminArea2)."
              },
              "postalCode": {
                "type": "string",
                "description": "Corresponds to ZIP, postcode, and postal code.",
                "example": "72745"
              },
              "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.",
                "example": "USA"
              }
            },
            "description": "Portable international postal address with medium-grained fields (adapted from [PayPal's portable address](https://github.com/paypal/api-standards/blob/master/v1/schema/json/draft-04/address_portable.json))"
          }
        },
        "description": "Object containing an intermediate stop for shipment."
      },
      "description": "List containing any stops between the first pickup and the final delivery."
    },
    "options": {
      "type": "object",
      "properties": {
        "totalWeightInPounds": {
          "type": "number",
          "description": "Total Weight in Pounds for the shipment. If not provided, we will assume the shipment weighs less than 45,500 lbs.",
          "default": 40000.0,
          "example": 39000.0
        },
        "containsHazardousMaterial": {
          "type": "boolean",
          "description": "Indicates whether the shipment contains hazardous materials. If not provided, will default to false. Currently, dynamic quotes are not available for Hazmat shipments.",
          "default": false,
          "example": false
        },
        "equipmentType": {
          "enum": [
            "DRYVAN",
            "REEFER",
            "FLATBED"
          ],
          "type": "string",
          "description": "The equipment type requested for the shipment. If not provided, will default to DRYVAN.",
          "default": "DRYVAN",
          "example": "DRYVAN"
        },
        "hasFlexibleDays": {
          "type": "boolean",
          "description": "Indicates whether the pickup and delivery dates are flexible. Flexible days will search for cheapest rate within a 3-day window of the pickup date. If not provided, will default to false.",
          "default": false,
          "example": false
        },
        "isLiveLoad": {
          "type": "boolean",
          "description": "True if the load will be loaded/unloaded while a driver is present. Select false if the trailer will be preloaded, or dropped at the receiver. If not provided, defaults to true. Currently, dynamic quotes are only provided for liveload shipments",
          "default": true,
          "example": true
        },
        "isOversized": {
          "type": "boolean",
          "description": "Is the shipment oversized. If not provided, defaults to false.",
          "default": false,
          "example": false
        },
        "commodities": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "freightClass": {
                "type": "string",
                "description": "Standard Freight Class (FAK Class) required for the dynamic quote request",
                "example": "50"
              },
              "weightInPounds": {
                "type": "number",
                "description": "Weight in Pounds for the commodity",
                "example": 2000.0
              },
              "palletCount": {
                "type": "number",
                "description": "Pallet count for the commodity",
                "example": 10.0
              }
            },
            "description": "The type of goods being transported."
          },
          "description": "List of commodities to be transported."
        }
      },
      "description": "Additional options related to the shipment.",
      "example": {
        "totalWeightInPounds": 39000.0,
        "containsHazardousMaterial": false,
        "equipmentType": "DRYVAN",
        "hasFlexibleDays": false,
        "isLiveLoad": true,
        "isOversized": false,
        "commodities": [
          {
            "items": null,
            "freightClass": "50",
            "weightInPounds": 4000,
            "palletCount": 5
          }
        ]
      }
    },
    "billToCode": {
      "type": "string",
      "description": "The J.B. Hunt identifier for the customer. This is not required for userIds that are associated with a Shipper360 account, but required for internal J.B. Hunt users.",
      "example": "MYBTC1"
    }
  },
  "description": "an object containing all information on the shipment to be quoted.",
  "example": {
    "origin": {
      "postalCode": "72745",
      "countryCode": "USA"
    },
    "destination": {
      "postalCode": "60632",
      "countryCode": "USA"
    },
    "pickupDateTime": "2020-05-29T12:00:00Z",
    "shipmentId": "BOL2119221"
  }
}

Responses

200 OK

Successfully found a dynamic quote.

Representations

{
  "rateFound": true,
  "lineHaulCharge": {
    "value": 2000,
    "currencyCode": "USD"
  },
  "totalCharge": {
    "value": 2200,
    "currencyCode": "USD"
  },
  "pickupDateTime": "2020-06-25T12:00:00+00:00",
  "deliveryDateTime": "2020-06-26T12:00:00+00:00",
  "accessorials": [
    {
      "name": "Fuel",
      "cost": {
        "value": 200,
        "currencyCode": "USD"
      }
    }
  ],
  "transportationMode": "TRUCK",
  "spotPriceId": "1922923",
  "scacCode": "JBHZ",
  "totalMiles": 159.1,
  "validThroughDateTime": "2020-06-25T12:00:00+00:00"
}
{
  "required": [
    "rateFound"
  ],
  "type": "object",
  "oneOf": [
    {
      "properties": {
        "rateFound": {
          "enum": [
            true
          ],
          "type": "boolean",
          "description": "Indicates whether a rate was returned for the requested shipment."
        },
        "lineHaulCharge": {
          "type": "object",
          "properties": {
            "currencyCode": {
              "maxLength": 3,
              "minLength": 3,
              "type": "string",
              "description": "Three-letter [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) alphabetical currency code.",
              "example": "USD"
            },
            "value": {
              "maxLength": 32,
              "type": "number",
              "description": "The value, which can be anything from:\n* An integer. For currencies that are not typically fractional, such as `JPY`.\n* A three-place decimal fraction. For currencies that are subdivided into thousandths, such as `TND`.\n* An eight-place decimal fraction. For currencies such as Bitcoin.\n* For the required number of decimal places for a currency code, see ISO 4217.\n",
              "format": "double",
              "example": 2199.99
            }
          },
          "description": "object containing the quote to be returned."
        },
        "totalCharge": {
          "type": "object",
          "properties": {
            "currencyCode": {
              "maxLength": 3,
              "minLength": 3,
              "type": "string",
              "description": "Three-letter [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) alphabetical currency code.",
              "example": "USD"
            },
            "value": {
              "maxLength": 32,
              "type": "number",
              "description": "The value, which can be anything from:\n* An integer. For currencies that are not typically fractional, such as `JPY`.\n* A three-place decimal fraction. For currencies that are subdivided into thousandths, such as `TND`.\n* An eight-place decimal fraction. For currencies such as Bitcoin.\n* For the required number of decimal places for a currency code, see ISO 4217.\n",
              "format": "double",
              "example": 2199.99
            }
          },
          "description": "object containing the quote to be returned."
        },
        "pickupDateTime": {
          "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": "[RFC 3339](https://tools.ietf.org/html/rfc3339#section-5.6) date-time specifying the day and time the shipment is to be picked up. If no time is available, we advise setting the time to 12:00pm on the pickup date. Quotes are available with pickup dates up to 14 days in the future. Quotes for same-day pickups are currently not available online."
        },
        "deliveryDateTime": {
          "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": "[RFC 3339](https://tools.ietf.org/html/rfc3339#section-5.6) date-time specifying the day and time the shipment is to be delivered. If no time is available, we advise setting the time to 12:00pm on the delivery date. If the delivery date is provided, it may be used to select the cheapest shipping option that can deliver on time. If not provided, the quote will assume any shipping option is feasible and return the cheapest."
        },
        "accessorials": {
          "type": "array",
          "items": {
            "properties": {
              "name": {
                "type": "string",
                "description": "Name of the accessorial."
              },
              "cost": {
                "type": "object",
                "properties": {
                  "currencyCode": {
                    "maxLength": 3,
                    "minLength": 3,
                    "type": "string",
                    "description": "Three-letter [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) alphabetical currency code.",
                    "example": "USD"
                  },
                  "value": {
                    "maxLength": 32,
                    "type": "number",
                    "description": "The value, which can be anything from:\n* An integer. For currencies that are not typically fractional, such as `JPY`.\n* A three-place decimal fraction. For currencies that are subdivided into thousandths, such as `TND`.\n* An eight-place decimal fraction. For currencies such as Bitcoin.\n* For the required number of decimal places for a currency code, see ISO 4217.\n",
                    "format": "double",
                    "example": 2199.99
                  }
                },
                "description": "object containing the quote to be returned."
              }
            }
          },
          "description": "List of additional charges associated with the load."
        },
        "transportationMode": {
          "enum": [
            "TRUCK",
            "TRAIN"
          ],
          "type": "string",
          "description": "Transportation mode of the quote.",
          "example": "TRUCK"
        },
        "spotPriceId": {
          "type": "string",
          "description": "Identifier of the quote. Can be passed with the load tender to reference the quote.",
          "example": "1922923"
        },
        "scacCode": {
          "type": "string",
          "description": "Standard Carrier Alpha Code.",
          "example": "JBHZ"
        },
        "totalMiles": {
          "allOf": [
            {
              "title": "Non-Negative Double",
              "allOf": [
                {
                  "title": "Double",
                  "type": "number",
                  "format": "double"
                },
                {
                  "minimum": 0.0
                }
              ]
            }
          ],
          "description": "Mileage returned from Rate Service.",
          "example": 159.1
        },
        "validThroughDateTime": {
          "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": "[RFC 3339](https://tools.ietf.org/html/rfc3339#section-5.6) date-time specifying when the rate is no longer valid. Load tenders received after this date and time are subject to receive a different rate.\n"
        }
      }
    },
    {
      "properties": {
        "rateFound": {
          "enum": [
            false
          ],
          "type": "boolean",
          "description": "Indicates whether a rate was returned for requested load. Due to capacity and other limitations, spot quotes may not be provided for all requests. If false, indicates the request was formed correctly, but no rates were available.",
          "example": false
        },
        "message": {
          "type": "string",
          "description": "Additional information to describe the response."
        }
      }
    }
  ],
  "description": "Object containing either the requested quote, or a message describing why no rate could be returned.",
  "example": {
    "rateFound": true,
    "lineHaulCharge": {
      "value": 2000,
      "currencyCode": "USD"
    },
    "totalCharge": {
      "value": 2200,
      "currencyCode": "USD"
    },
    "pickupDateTime": "2020-06-25T12:00:00Z",
    "deliveryDateTime": "2020-06-26T12:00:00Z",
    "accessorials": [
      {
        "name": "Fuel",
        "cost": {
          "value": 200,
          "currencyCode": "USD"
        }
      }
    ],
    "transportationMode": "TRUCK",
    "spotPriceId": "1922923",
    "scacCode": "JBHZ",
    "totalMiles": 159.1,
    "validThroughDateTime": "2020-06-25T12:00:00Z"
  }
}

400 Bad Request

Invalid Request Body.

Representations

{
  "id": "1d0d6179-d8b1-472a-8f8f-e316ac954312",
  "errors": [
    {
      "title": "Validation Error",
      "description": "Certain fields have failed Validation",
      "dateTime": "2019-04-16T04:11:13.419+00:00",
      "details": [
        {
          "field": "pickupDateTime",
          "value": "2018-04-16T12:00:00+00:00",
          "issue": "must be in the future",
          "location": "Body"
        }
      ]
    }
  ]
}
{
  "title": "API Errors",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "UUID to be logged for correlation purposes."
    },
    "errors": {
      "type": "array",
      "items": {
        "title": "API Error",
        "required": [
          "title",
          "description",
          "dateTime"
        ],
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "Unique, human-readable name of the error."
          },
          "description": {
            "type": "string",
            "description": "Human-readable message describing the error."
          },
          "dateTime": {
            "type": "string",
            "description": "When the error occurred.",
            "format": "date-time"
          },
          "details": {
            "type": "array",
            "items": {
              "title": "API Error Detail",
              "required": [
                "field",
                "issue",
                "location"
              ],
              "type": "object",
              "properties": {
                "field": {
                  "type": "string",
                  "description": "If the error is in the body, contains a JSON pointer to the field in error; otherwise, contains the name of the path or query parameter in error."
                },
                "value": {
                  "oneOf": [
                    {
                      "type": "boolean"
                    },
                    {
                      "type": "integer"
                    },
                    {
                      "type": "number"
                    },
                    {
                      "type": "string"
                    },
                    {
                      "type": "array"
                    },
                    {
                      "type": "object"
                    }
                  ],
                  "description": "Value of the field in error."
                },
                "issue": {
                  "type": "string",
                  "description": "Reason for the error."
                },
                "location": {
                  "enum": [
                    "Query",
                    "Path",
                    "Body"
                  ],
                  "type": "string",
                  "description": "Location of the field in error.",
                  "default": "Body"
                }
              },
              "description": "Detailed description of an individual API error."
            },
            "description": "Details of individual errors."
          }
        },
        "description": "Information about an API error."
      },
      "description": "List of errors that occurred."
    }
  },
  "description": "Object containing any errors and their descriptions to be returned.",
  "example": {
    "id": "1d0d6179-d8b1-472a-8f8f-e316ac954312",
    "errors": [
      {
        "title": "Validation Error",
        "description": "Certain fields have failed Validation",
        "dateTime": "2019-04-16T04:11:13.419Z",
        "details": [
          {
            "field": "pickupDateTime",
            "value": "2018-04-16T12:00:00Z",
            "issue": "must be in the future",
            "location": "Body"
          }
        ]
      }
    ]
  }
}

Code samples

@ECHO OFF

curl -v -X POST "https://api.jbhunt.com/pricing/quoting/v2/dynamic-quote"
-H "Content-Type: application/json"
-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/pricing/quoting/v2/dynamic-quote?" + queryString;

            HttpResponseMessage response;

            // Request body
            byte[] byteData = Encoding.UTF8.GetBytes("{body}");

            using (var content = new ByteArrayContent(byteData))
            {
               content.Headers.ContentType = new MediaTypeHeaderValue("< your content type, i.e. application/json >");
               response = await client.PostAsync(uri, content);
            }

        }
    }
}	
// // 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/pricing/quoting/v2/dynamic-quote");


            URI uri = builder.build();
            HttpPost request = new HttpPost(uri);
            request.setHeader("Content-Type", "application/json");
            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/pricing/quoting/v2/dynamic-quote?" + $.param(params),
            beforeSend: function(xhrObj){
                // Request headers
                xhrObj.setRequestHeader("Content-Type","application/json");
                xhrObj.setRequestHeader("Api-Key","{subscription key}");
                xhrObj.setRequestHeader("Authorization","{access token}");
            },
            type: "POST",
            // 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/pricing/quoting/v2/dynamic-quote";
    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:@"POST"];
    // Request headers
    [_request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
    [_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/pricing/quoting/v2/dynamic-quote');
$url = $request->getUrl();

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

$request->setHeader($headers);

$parameters = array(
    // Request parameters
);

$url->setQueryVariables($parameters);

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

// 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
    'Content-Type': 'application/json',
    'Api-Key': '{subscription key}',
    'Authorization': '{access token}',
}

params = urllib.urlencode({
})

try:
    conn = httplib.HTTPSConnection('api.jbhunt.com')
    conn.request("POST", "/pricing/quoting/v2/dynamic-quote?%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
    'Content-Type': 'application/json',
    'Api-Key': '{subscription key}',
    'Authorization': '{access token}',
}

params = urllib.parse.urlencode({
})

try:
    conn = http.client.HTTPSConnection('api.jbhunt.com')
    conn.request("POST", "/pricing/quoting/v2/dynamic-quote?%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/pricing/quoting/v2/dynamic-quote')


request = Net::HTTP::Post.new(uri.request_uri)
# Request headers
request['Content-Type'] = 'application/json'
# 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