Rate Quote

Use the R+L Carrier's Rate Quote API to get customer specific LTL rate quotes. We provide all the options you need to get a rate quote instantly and accurately.
Get Rate Quote
HTTP Method: POST
URL: /RateQuote
Request Parameters
Name Type Cardinality Required Description
RateQuote object One Required The rate quote request object to be inserted
Properties
PickupDate string One Optional Will default to today's date if not passed in.
Origin object One Required Origin information
Properties
City string Zero or One Optional Origin city
StateOrProvince string Zero or One Optional Origin state or province
ZipOrPostalCode string One Required Origin zip or postal code.
Should be empty string if origin does not have a zipcode.
CountryCode string One Required Origin ISO3 country code
Example: USA
Destination object One Required Destination information
Properties
City string Zero or One Optional Destination city
StateOrProvince string Zero or One Optional Destination state or province
ZipOrPostalCode string One Required Destination zip or postal code.
Should be empty string if destination does not have a zipcode.
CountryCode string One Required Destination ISO3 country code
Example: USA
CODAmount decimal One Optional The cash on delivery amount
Min: 0.00
Max: 100000.00
COD Fee will be charged if supplied.
Items array One Required Items to be shipped
Properties
Item object One or More (up to 8) Required Item to be shipped
Properties
Class string One Required Accepted class values:
50.0
55.0
60.0
65.0
70.0
77.5
85.0
92.5
100.0
110.0
125.0
150.0
175.0
200.0
250.0
300.0
400.0
500.0
Weight integer One Required Item weight
Min: 1
Max: 19999
Width float Zero or One N – domestic USA & CAN Y – for everything else Item length
Min:?
Max:?
It changes based on origin/destination
Height float Zero or One N – domestic USA & CAN Y – for everything else Item length
Min:?
Max:?
It changes based on origin/destination
Length float Zero or One N – domestic USA & CAN Y – for everything else Item length
Min:?
Max:?
It changes based on origin/destination
DeclaredValue decimal One N – domestic USA & CAN Y – for everything else Declared value of the shipment
Min: 0.00
Max:
AdditionalServices array One Optional Additional charges for supplemental services provided to a customer charges for specialized services beyond the handling of the freight
Properties
AdditionalService string Zero or More Optional See Accessorial Documentation. It changes based on origin/destination
OverDimensions array One N – not over overdimension Y – if overdimension Overdimension list. Items with different over dimension lengths should be separate nodes.
Properties
OverDimension object Zero or More (up to 5) N – not over overdimension Y – if overdimension
Properties
Pieces integer One Required Number of over dimension pieces
Inches integer One Required Length of over dimension pieces
Pallets array One Optional Fill this out to get Pallet rates. Only customers with pallet rating will get pallet rates.
Properties
Pallet object Zero or More Optional
Properties
Code string One Required 4 digit Pallet code.
Weight integer One Required Pallet weight. See tariff for restrictions.
Quantity integer One Required The number of pallets. See tariff for restrictions.
Response Parameters
Name Type Cardinality Description
RateQuote object One Returned rate quote object
Properties
Origin object One Rate quote origin
Properties
City string One Origin city
StateOrProvince string One Origin state or province
ZipOrPostalCode string One Origin zip or postal code
CountryCode string One Origin country code
Destination object One Rate quote destination(s)
Properties
City string One Destination city
StateOrProvince string One Destination state or province
ZipOrPostalCode string One Destination zip or postal code
CountryCode string One Destination country code
OriginServiceCenter object One Rate quote origin service center
Properties
Code string One Origin service center code
Location string One Origin service center City, State
ZipCode string One Origin service center zip code
Phone string One Origin service center phone number
Address1 string One Origin service center address line 1
Address2 string One Origin service center address line 2
City string One Origin service center city
State string One Origin service center state
DestinationServiceCenter object One Rate quote destination service center
Properties
Code string One Destination service center code
Location string One Destination service center City, State
ZipCode string One Destination service center zip code
Phone string One Destination service center phone number
Address1 string One Destination service center address line 1
Address2 string One Destination service center address line 2
City string One Destination service center city
State string One Destination service center state
CustomerDiscounts string One Discount amount granted to the customer
Charges array One A variety of different charge items that could be returned with a quote.
Properties
Charge object One or More Rate quote charges
Properties
Type string Charge type
Title string Charge title
Weight string Weight of the item (if the title is the class).
Total weight if Type == "GROSS"
Rate string Charge rate
Amount string Charge amount
Ocean object Zero or One Only present for Offshore rate quotes.
Properties
OceanCategorizedMessages object One Ocean additional information
Properties
GeneralMessages array One Ocean general messages
Properties
Message string Zero or More
TransitMessages array One Ocean messages involving service days or service area.
Properties
Message string Zero or More
RatesMessages array One Ocean messages involving extra charges.
Properties
Message string Zero or More
CategorizedMessages object One Rate quote additional information
Properties
GeneralMessages array One Rate quote general messages
Properties
Message string Zero or More
TransitMessages array One
Properties
Message string Zero or More
RatesMessages array One
Properties
Message string Zero or More
ServiceLevels array One A variety of different service levels that could be returned with a quote.
Properties
ServiceLevel object One or More Rate quote service level(s)
Properties
Title string Service level title
Code string Service level code
QuoteNumber string Rate quote number for this service level
ServiceDays integer Number of service days for this service level
Charge string If ServiceLevel.Code = "STD" then this is the gross charge for the rate quote.
For all others, this is the difference between the Net Charge for the current Service Level and the NET Charge for the Standard Service level.
NetCharge string Rate quote net charge for this service level.
HourlyWindow object Service level hourly window information. Only present for GSHW service level.
Properties
Start string Hourly window start time
End string Hourly window end time
Code integer One
Errors array One
Properties
Error object Zero or More
Properties
Property string One
ErrorMessage string One
ExceptionMessage string One
Messages array One
Properties
Message string Zero or More
Example Code

require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('{baseurl}/RateQuote');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
'follow_redirects' => TRUE
));
$request->setHeader(array(
'apiKey' => 'Your API Key',
'Content-Type' => 'application/json',
));
$request->setBody('{
\n "RateQuote": {
\n "Origin": {
\n "City": "Ocala",
\n "StateOrProvince": "FL",
\n "ZipOrPostalCode": "34471",
\n "CountryCode": "USA"
\n },
\n "Destination": {
\n "City": "Wilmington",
\n "StateOrProvince": "OH",
\n "ZipOrPostalCode": "45177",
\n "CountryCode": "USA"
\n },
\n "Items": [
\n {
\n "Width": 0,
\n "Height": 0,
\n "Length": 0,
\n "Class": "65",
\n "Weight": 115
\n }
\n ]
\n }
\n}');
try {
$response = $request->send();
if ($response->getStatus() == 200) {
echo $response->getBody();
}
else {
echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
$response->getReasonPhrase();
}
}
catch(HTTP_Request2_Exception $e) {
echo 'Error: ' . $e->getMessage();
}
using CallAPI.DataContracts;
using CallAPI.DataContracts.RateQuote;
using CallAPI.DataContracts.RateQuote.Request;
using CallAPI.DataContracts.RateQuote.Response;
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
namespace CallAPI
{
class RateQuoteSample
{
string apiKey = "Your API Key";

//Post
public PostRateQuoteResponse PostRateQuote()
{
var request = new PostRateQuoteRequest()
{
RateQuote = PopulateRateQuote()
};

var response = new PostRateQuoteResponse();

var url = "[baseurl}/RateQuote";

using (HttpClient client = new HttpClient())
{
client.BaseAddress = new Uri(url);
client.DefaultRequestHeaders.Add("apiKey", apiKey);
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
var apiResponse = client.PostAsJsonAsync(url, request).Result;

response = apiResponse.Content.ReadAsAsync().Result;
}

return response;
}

private RateQuote PopulateRateQuote()
{
var origin = new Origin()
{
City = "Wilmington",
StateOrProvince = "OH",
ZipOrPostalCode = "45177",
CountryCode = "USA"
};

var destination = new Destination()
{
City = "Ocala",
StateOrProvince = "FL",
ZipOrPostalCode = "34471",
CountryCode = "USA"
};

var item = new Item()
{
Class = "60",
Weight = 300
};

var rateQuote = new RateQuote()
{
Origin = origin,
Destination = destination,
Items = new List() { item }
};

return rateQuote;
}
}
}
package Samples;

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.List;

import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.HttpClientBuilder;

import com.fasterxml.jackson.databind.ObjectMapper;

import DataContracts.Item;
import DataContracts.ServicePoint;
import RateQuote.RateQuote;
import RateQuote.Request.PostRateQuoteRequest;
import RateQuote.Response.PostRateQuoteResponse;

public class RateQuoteSample {
String apiKey = "Your API Key";
ObjectMapper mapper = new ObjectMapper();

public PostRateQuoteResponse PostRateQuote() throws Exception{
PostRateQuoteResponse response = new PostRateQuoteResponse();

PostRateQuoteRequest request = new PostRateQuoteRequest();
request.RateQuote = PopulateRateQuoteData();
String requestJSON = mapper.writeValueAsString(request);

String url = "{baseurl}/RateQuote/";
HttpClient httpClient = HttpClientBuilder.create().build();
HttpPost httpRequest = new HttpPost(url);
StringEntity params =new StringEntity(requestJSON);
httpRequest.addHeader("content-type", "application/json");
httpRequest.addHeader("apiKey", apiKey);
httpRequest.setEntity(params);
HttpResponse httpResponse = httpClient.execute(httpRequest);

BufferedReader rd = new BufferedReader(new InputStreamReader(httpResponse.getEntity().getContent()));

StringBuffer result = new StringBuffer();
String line = "";
while ((line = rd.readLine()) != null) {
result.append(line);
}

response = mapper.readValue(result.toString(), PostRateQuoteResponse.class);

return response;
}

private RateQuote PopulateRateQuoteData() {
ServicePoint origin = new ServicePoint();
origin.CountryCode = "USA";
origin.ZipOrPostalCode = "34471";
origin.City = "Ocala";
origin.StateOrProvince = "FL";

ServicePoint destination = new ServicePoint();
destination.CountryCode = "USA";
destination.ZipOrPostalCode = "45177";
destination.City = "Wilmington";
destination.StateOrProvince = "OH";

Item item = new Item();
item.Class = "60";
item.Weight = 100;
List items = new ArrayList();
items.add(item);

RateQuote rateQuote = new RateQuote();
rateQuote.Origin = origin;
rateQuote.Destination = destination;
rateQuote.Items = items;
rateQuote.PickupDate = LocalDate.now().format(DateTimeFormatter.ofPattern("MM/dd/yyyy"));

return rateQuote;
}
}
Retrieve Previous Rate Quote
HTTP Method: GET
URL: /RateQuote
Request Parameters
Name Type Cardinality Required Description
QuoteNumber string One Required The standard service quote number
Response Parameters
Name Type Cardinality Description
RateQuote object One Returned rate quote object
Properties
Origin object One Rate quote origin
Properties
City string One Origin city
StateOrProvince string One Origin state or province
ZipOrPostalCode string One Origin zip or postal code
CountryCode string One Origin country code
Destination object One Rate quote destination(s)
Properties
City string One Destination city
StateOrProvince string One Destination state or province
ZipOrPostalCode string One Destination zip or postal code
CountryCode string One Destination country code
OriginServiceCenter object One Origin service center code
Properties
Code string One
Location string One Origin service center city state
Phone string One Origin service center phone number
Address1 string One Origin service center address line 1
Address2 string One Origin service center address line 2
City string One Origin service center city
State string One Origin service center state
ZipCode string One Origin service center zip code
DestinationServiceCenter object One Destination service center code
Properties
Code string One
Location string One Destination service center location
Phone string One Destination service center phone number
Address1 string One Destination service center address line 1
Address2 string One Destination service center address line 2
City string One Destination service center city
State string One Destination service center state
ZipCode string One Destination service center zip code
Charges array One A variety of different charge items that could be returned with a quote.
Charge object One Rate quote charges
Properties
Type string One Charge type
Title string One Charge title
Weight string One Charge weight
Rate string One Charge rate
Amount string One Charge amount
Ocean object One
Properties
CategorizedMessages object One Ocean additional information
Properties
GeneralMessages array Ocean general messages
Properties
Message string
TransitMessages array One Message title
Properties
Message string Zero or More Message text
RatesMessages array One
Properties
Message string Zero or More
CategorizedMessages object One
Properties
GeneralMessages array One
Properties
Message string Zero or More
TransitMessages string
Properties
Message string Zero or More
RatesMessages array One
Properties
Message string Zero or More
ServiceLevels array One
Properties
ServiceLevel object One or More Message title
Properties
Title string One
Code string One
QuoteNumber string One
ServiceDays integer One
Charge string One
NetCharge string One
HourlyWindow object Zero or One
Properties
Start string One
End string One
Code string One HTTP Status Code
Errors array One
Properties
Error object Zero or More
Properties
Property string One
ErrorMessage string One
ExceptionMessage string One
Messages array One
Properties
Message string Zero or More

require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('{baseurl}/RateQuote?QuoteNumber=19422062');
$request->setMethod(HTTP_Request2::METHOD_GET);
$request->setConfig(array(
'follow_redirects' => TRUE
));
$request->setHeader(array(
'apiKey' => 'Your API Key',
));
try {
$response = $request->send();
if ($response->getStatus() == 200) {
echo $response->getBody();
}
else {
echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
$response->getReasonPhrase();
}
}
catch(HTTP_Request2_Exception $e) {
echo 'Error: ' . $e->getMessage();
}
using CallAPI.DataContracts;
using CallAPI.DataContracts.RateQuote;
using CallAPI.DataContracts.RateQuote.Response;
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
namespace CallAPI
{
class RateQuoteSample
{
string apiKey = "Your API Key";

//GET
public GetRateQuoteResponse GetRateQuote()
{
var response = new GetRateQuoteResponse();
var quoteNumber = "11111111";

var url = string.Format("{baseurl}/RateQuote?QuoteNumber={0}", quoteNumber);

using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Add("apiKey", apiKey);
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));

var apiResponse = client.GetAsync(url).Result;
response = apiResponse.Content.ReadAsAsync().Result;
}

return response;
}
}
}
package Samples;

import java.io.BufferedReader;
import java.io.InputStreamReader;

import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.HttpClientBuilder;

import com.fasterxml.jackson.databind.ObjectMapper;

import DataContracts.RateQuote.Response.GetRateQuoteResponse;

public class RateQuoteSample {

String apiKey = "Your API Key";
ObjectMapper mapper = new ObjectMapper();

//GET
public GetRateQuoteResponse GetRateQuote() throws Exception {
GetRateQuoteResponse response = new GetRateQuoteResponse();

String url = "{baseurl}/RateQuote";

String quoteNumber = "11111111";

url += "?QuoteNumber=" + quoteNumber;

HttpClient httpClient = HttpClientBuilder.create().build();
HttpGet httprequest = new HttpGet(url);
httprequest.setHeader("apiKey", apiKey);

HttpResponse httpResponse = httpClient.execute(httprequest);

BufferedReader in = new BufferedReader(new InputStreamReader(httpResponse.getEntity().getContent()));

String inputLine;
StringBuffer result = new StringBuffer();

while ((inputLine = in.readLine()) != null) {
result.append(inputLine);
}
in.close();

response = mapper.readValue(result.toString(), GetRateQuoteResponse.class);

return response;
}
}
Get Pallet Types by Points Request
HTTP Method: GET
URL: /RateQuote/GetPalletTypesByPoints
Request Parameters
Name Type Cardinality Required Description
OriginCity string One Required The origin city
OriginZip string One Required The origin zip or postal code
DestinationCity string One Required The destination city
DestinationZip string One Required The destination zip or postal code
Response Parameters
Name Type Cardinality Description
Pallet Types array One Returned pallet type object
Properties
PalletType object Zero or More
Properties
Code string One Pallet type code
Description string One Pallet type description
Code integer One HTTP Status code
Errors array One List of Errors
Properties
Error string Zero or More Error Object
Properties
Property string One Property
ErrorMessage string One Error Message
ExceptionMessage string One Exception Message
Messages array One Returned informational messages
Properties
Message string Zero or More

require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('{baseurl}/RateQuote/GetPalletTypesByPoints?OriginCity=Wilmington&OriginZip=45177&DestinationCity=Ocala&DestinationZip=34471');
$request->setMethod(HTTP_Request2::METHOD_GET);
$request->setConfig(array(
'follow_redirects' => TRUE
));
$request->setHeader(array(
'apiKey' => 'Your API Key',
));
try {
$response = $request->send();
if ($response->getStatus() == 200) {
echo $response->getBody();
}
else {
echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
$response->getReasonPhrase();
}
}
catch(HTTP_Request2_Exception $e) {
echo 'Error: ' . $e->getMessage();
}
using CallAPI.DataContracts;
using CallAPI.DataContracts.RateQuote;
using CallAPI.DataContracts.RateQuote.Response;
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
namespace CallAPI
{
class RateQuoteSample
{
string apiKey = "Your API Key";

//GET
public GetPalletTypesResponse GetPalletTypesByPoints()
{
var response = new GetPalletTypesResponse();

var url = "{baseurl}/RateQuote/GetPalletTypesByPoints";

var originCity = "Wilmington";
var originZip = "45177";
var destinationCity = "Ocala";
var destinationZip = "34471";

url += "?OriginCity=" + originCity + "&OriginZip=" + originZip + "&DestinationCity=" + destinationCity + "&DestinationZip=" + destinationZip;
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Add("apiKey", apiKey);
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));

var apiResponse = client.GetAsync(url).Result;
response = apiResponse.Content.ReadAsAsync().Result;
}

return response;
}
}
}
package Samples;

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.List;

import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.HttpClientBuilder;

import com.fasterxml.jackson.databind.ObjectMapper;

import DataContracts.Item;
import DataContracts.ServicePoint;
import RateQuote.RateQuote;
import RateQuote.Request.PostRateQuoteRequest;
import RateQuote.Response.GetPalletTypesResponse;
import RateQuote.Response.GetRateQuoteResponse;
import RateQuote.Response.PostRateQuoteResponse;

public class RateQuoteSample {
String apiKey = "Your API Key";
ObjectMapper mapper = new ObjectMapper();

//GET
public GetPalletTypesResponse GetPalletTypesByPoints() throws Exception {
GetPalletTypesResponse response = new GetPalletTypesResponse();

String url = "{baseurl}/RateQuote/GetPalletTypesByPoints";

String originCity = "Wilmington";
String originZip = "45177";
String destinationCity = "Ocala";
String destinationZip = "34471";

url += "?OriginCity=" + originCity + "&OriginZip=" + originZip + "&DestinationCity=" + destinationCity + "&DestinationZip=" + destinationZip;

HttpClient httpClient = HttpClientBuilder.create().build();
HttpGet httprequest = new HttpGet(url);
httprequest.setHeader("apiKey", apiKey);

HttpResponse httpResponse = httpClient.execute(httprequest);

BufferedReader in = new BufferedReader(new InputStreamReader(httpResponse.getEntity().getContent()));

String inputLine;
StringBuffer result = new StringBuffer();

while ((inputLine = in.readLine()) != null) {
result.append(inputLine);
}
in.close();

response = mapper.readValue(result.toString(), GetPalletTypesResponse.class);

return response;
}
}
Get All Pallet Types
HTTP Method: GET
URL: /RateQuote/GetPalletTypes
Request Parameters
Name Type Cardinality Required Description
Response Parameters
Name Type Cardinality Description
PalletTypes array One
Properties
PalletType object Zero or More
Properties
Code string One Pallet type code
Description string One Pallet type description
Code integer One HTTP Status Code
Errors array One
Properties
Error object Zero or More
Properties
Property string One
ErrorMessage string One
ExceptionMessage string One
Messages array One
Properties
Message string Zero or More
Example Request

require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('{baseurl}/RateQuote/GetPalletTypes');
$request->setMethod(HTTP_Request2::METHOD_GET);
$request->setConfig(array(
'follow_redirects' => TRUE
));
$request->setHeader(array(
'apiKey' => 'Your API Key',
));
try {
$response = $request->send();
if ($response->getStatus() == 200) {
echo $response->getBody();
}
else {
echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
$response->getReasonPhrase();
}
}
catch(HTTP_Request2_Exception $e) {
echo 'Error: ' . $e->getMessage();
}
using CallAPI.DataContracts;
using CallAPI.DataContracts.RateQuote;
using CallAPI.DataContracts.RateQuote.Response;
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
namespace CallAPI
{
class RateQuoteSample
{
string apiKey = "Your API Key";

//GET
public GetPalletTypesResponse GetPalletTypes()
{
var response = new GetPalletTypesResponse();

var url = "{baseurl}/RateQuote/GetPalletTypes";

using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Add("apiKey", apiKey);
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));

var apiResponse = client.GetAsync(url).Result;
response = apiResponse.Content.ReadAsAsync().Result;
}

return response;
}
}
}
package Samples;

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.List;

import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.HttpClientBuilder;

import com.fasterxml.jackson.databind.ObjectMapper;

import DataContracts.Item;
import DataContracts.ServicePoint;
import RateQuote.RateQuote;
import RateQuote.Request.PostRateQuoteRequest;
import RateQuote.Response.GetPalletTypesResponse;
import RateQuote.Response.GetRateQuoteResponse;
import RateQuote.Response.PostRateQuoteResponse;

public class RateQuoteSample {
String apiKey = "Your API Key";
ObjectMapper mapper = new ObjectMapper();

//GET
public GetPalletTypesResponse GetPalletTypes() throws Exception {
GetPalletTypesResponse response = new GetPalletTypesResponse();

String url = "{baseurl}/RateQuote/GetPalletTypes";

HttpClient httpClient = HttpClientBuilder.create().build();
HttpGet httprequest = new HttpGet(url);
httprequest.setHeader("apiKey", apiKey);

HttpResponse httpResponse = httpClient.execute(httprequest);

BufferedReader in = new BufferedReader(new InputStreamReader(httpResponse.getEntity().getContent()));

String inputLine;
StringBuffer result = new StringBuffer();

while ((inputLine = in.readLine()) != null) {
result.append(inputLine);
}
in.close();

response = mapper.readValue(result.toString(), GetPalletTypesResponse.class);

return response;
}
}