Bill Of Lading

The R+L Carrier's Bill of Lading API allows you to instantly create, print, or edit Bill of Ladings. Using this API will help you save time and costly errors.
Create Bill Of Lading
POST /BillOfLading
Request Parameters
Name Type Cardinality Required Description
BillOfLading object One Required Bill of lading object
Properties
BolDate string Zero or One Optional We will default to today's date if not passed in. Cannot be in the past. Format: MM/dd/yyyy.
Shipper object One Required Shipper Object
Properties
CompanyName string One Required Shipper company name
AddressLine1 string One Required Shipper Address line 1
AddressLine2 string Zero or One Optional Shipper Address line 2
City string One Required Shipper City
StateOrProvince string One Required Shipper state. Optional for countries without states.
ZipOrPostalCode string One Required Shipper Zip Code. Optional for countries without zipcodes.
CountryCode string One Required Shipper ISO3 Country Code.
PhoneNumber string One Required Shipper Phone Number.
PhoneExtension string Zero or One Optional Shipper Phone Extension.
EmailAddress string Zero or One Optional Shipper Email Address
Consignee object One Required Consignee Object
Properties
CompanyName string One Required Consignee company name
AddressLine1 string One Required Consignee Address Line 1
AddressLine2 string Zero or One Optional Consignee Address Line 2
City string One Required Consignee City
StateOrProvince string One Required Consignee State. Optional for countries that do not have states.
ZipOrPostalCode string One Required Consignee Zip Code . Optional for countries that do not have zip codes.
CountryCode string Consignee ISO3 Country Code
Attention string Zero or One Optional Consignee Attention
PhoneNumber string Zero or One Optional Consignee Phone Number
PhoneExtension string Zero or One Optional Consignee Phone Extension
EmailAddress string Zero or One Optional Consignee Email Address
BillTo object Zero or One Optional Bill To Object. (Who the shipment should be billed to).
Properties
CompanyName string One Required BillTo Company Name
AddressLine1 string One Required BillTo Address Line 1
AddressLine2 string Zero or One Optional BillTo Address Line 2
City string One Required BillTo City
StateOrProvince string One Required BillTo State. Optional for Countries without states.
ZipOrPostalCode string One Required BillTo Zip Code. Optional for countries without zip codes.
CountryCode string One Required BillTo ISO3 Country Code
PhoneNumber string Zero or One Optional BillTo Phone Number
PhoneExtension string Zero or One Optional BillTo Phone Extension
EmailAddress string Zero or One Optional BillTo Email Address
Broker object Zero or One Optional Broker Object
Properties
CompanyName string One Required Broker Company Name
AddressLine1 string One Required Broker Address Line 1
AddressLine2 string Zero or One Optional Broker Address Line 2
City string One Required Broker City
StateOrProvince string One Required Broker State. Optional for countries without states.
ZipOrPostalCode string One Required Broker Zip Code. Optional for countries without zip codes
CountryCode string One Required Broker ISO3 Country Code
PhoneNumber string Zero or One Optional Broker Phone Number
PhoneExtension string Zero or One Optional Broker Phone Extension
EmailAddress string Zero or One Optional Broker Email Address
RemitCOD object Zero or One Optional Remit COD object
Properties
CompanyName string One Required Remit COD Company Name
AddressLine1 string One Required Remit COD Address Line 1
AddressLine2 string Zero or One Optional Remit COD Address Line 2
City string One Required Remit COD City
StateOrProvince string One Required Remit COD State. Optional for countries without states.
ZipOrPostalCode string One Required Remit COD Zip Code. Optional for countries without zip codes.
CountryCode string One Required Remit COD ISO3 Country Code.
PhoneNumber string Zero or One Optional Remit COD Phone Number
PhoneExtension string Zero or One Optional Remit COD Phone Extension
EmailAddress string Zero or One Optional Remit COD Email Address
CODAmount decimal One Required Collect On Delivery Amount.
CheckType string One Required Company or Certified.
FeeType string One Required Prepaid or Collect.
AdditionalServices array Zero or One Optional List of additional services
Properties
AdditionalService string Zero or More Optional Valid Values: OriginLiftgate, DestinationLiftgate, InsidePickup, InsideDelivery, LimitedAccessPickup, LimitedAccessDelivery, Freezable, DeliveryAppointment
Items array One Required List of items
Properties
Item object One or More Required Item Object
Properties
IsHazmat boolean Zero or One Optional Indicates if an item is classified as hazardous.
Will default to false if not passed in.
Pieces integer One Required
PackageType string Zero or One Optional List of accepted values:
BAG, BAR, BIN, BNDL, BOX, BSKT, BULK, CARBOY, COIL, CPT, CRT, CTN, CYL, DAC, DRM, GAY, IBC, JER, LSE, MLBG, NSTD, PAIL, PIG, PLT, RACK, REEL, ROLL, SKD, STK, TL, TANK, TOTE, UNIT
NMFCItemNumber string Zero or One Optional NMFC Item Number
NMFCSubNumber string Zero or One Optional Required if NMFCItemNumber is passed.
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
Description string One Required Required if IsHazmat is TRUE.
HazmatInformation object Zero or One Optional Required if any items are HAZMAT
Properties
EmergencyPhoneNumber string One Required Hazmat Emergency Phone Number
EmergencyPhoneExtension string Zero or One Optional Hazmat Phone Extension
ContractNumber string Zero or One Optional Hazmat Contract Number
ContractHolder string Zero or One Optional Offerer / Contract Holder
DeclaredValue object Zero or One Optional By adding a declared value, the shipment will be subject to an additional charge if it exceeds our limitations of liability which is determined by freight class or NMFC item number. If you have questions, please call 800-535-1983
Properties
Amount decimal One Required
Per string One Required
SpecialInstructions string Zero or One Optional Special Instructions
ReferenceNumbers object Zero or One Optional Reference number object
Properties
ShipperNumber string Zero or One Optional Shipper Pickup / Reference Number
RateQuoteNumber string Zero or One Optional R+L Rate Quote Number
PONumber string Zero or One Optional Purchase Order Number
FreightChargePaymentMethod string One Required Prepaid or Collect.
If the BillTo object is not supplied: if Prepaid, we will bill the Shipper, if Collect, we will bill the Consignee.
ServiceLevel string Zero or One Optional Will default to standard service if not passed. Valid values: Standard, Guaranteed, GuaranteedByNoon, GuaranteedHourlyWindow, Expedited
HourlyWindow object Zero or One Optional Required if ServiceLevel is GuaranteedHourlyWindow.
Properties
Start string One Required Hourly window start time. Format: hh:mm tt
End string One Required Hourly window end time. Format: hh:mm tt
ExpeditedQuoteNumber string Zero or One Optional Required if ServiceLevel is Expedited.
PickupRequest object Zero or One Optional Fill this out if you would like to schedule a Pickup at the same time as creating the BOL.
Properties
PickupInformation object One Required
Properties
PickupDate string One Required The date of the pickup. Date cannot be in the past. We do not pickup on weekends or company holidays. We do not pickup Freezable shipments on Friday. Format: MM/dd/yyyy.
ReadyTime string One Required Time of day the pickup will be ready. Format: hh:mm tt
CloseTime string One Required The time of day the shipper business closes. Format: hh:mm tt
AdditionalInstructions string Zero or One Optional Additional Instructions
LoadAttributes array Zero or One Optional Load attributes for the pickup
Properties
LoadAttribute string Optional Accepted values: Food, Freezable, Hazmat, Poison
SendEmailConfirmation boolean One Optional Indicates whether you would like to receive the pickup confirmation email
GenerateUniversalPro boolean Zero or One Optional Pass in true to get a universal pro that will not be re-stickered by the driver on pickup (this requires you to sticker the freight). Pass in false to receive a web pro that the driver will sticker with a pro. Note: Web Pros will still work for shipment tracking and document retrieval.
Response Parameters
Name Type Cardinality Description
ProNumber string One Either the web pro or a pre-assigned pro for the BOL. Web Pros start with 'W'.
PickupRequestNumber string Zero or One Will be present if pickup request is scheduled with the creation of the BOL.
Example Request

require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('{baseurl}/BillOfLading');
$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 "BillOfLading": {
\n "BOLDate": "08/17/2020",
\n "Shipper": {
\n "CompanyName": "Shipper Test",
\n "AddressLine1": "123 ship test",
\n "PhoneNumber": "6145558888",
\n "City": "Ocala",
\n "StateOrProvince": "FL",
\n "ZipOrPostalCode": "34471",
\n "CountryCode": "USA"
\n },
\n "Consignee": {
\n "CompanyName": "Consignee Test",
\n "AddressLine1": "123 consignee test",
\n "City": "Wilmington",
\n "StateOrProvince": "OH",
\n "ZipOrPostalCode": "45177",
\n "CountryCode": "USA"
\n },
\n "Items": [
\n {
\n "Class": "70",
\n "Pieces": 1,
\n "Weight": 110,
\n "PackageType": "BAG",
\n "Description": "Test description"
\n }
\n ],
\n "SpecialInstructions": "Test special instructions",
\n "FreightChargePaymentMethod": "Prepaid",
\n "ServiceLevel": "Standard"
\n },
\n "GenerateUniversalPro": true
\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.BillOfLading;
using CallAPI.DataContracts.BillOfLading.Request;
using CallAPI.DataContracts.BillOfLading.Response;
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;

namespace CallAPI
{
class BillOfLadingSample
{
string apiKey = "Your API Key";

public BolResponse CreateBOL()
{
var request = PopulateBOLData();

var response = new BolResponse();

var url = "{baseurl}/BillOfLading";

using (HttpClient client = new HttpClient())
{
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 CreateBolRequest PopulateBOLData()
{
var shipper = new DataContracts.Party()
{
CompanyName = "Shipper Test",
AddressLine1 = "123 ship test",
ZipOrPostalCode = "34471",
City = "Ocala",
StateOrProvince = "FL",
CountryCode = "USA",
PhoneNumber = "6145558888"
};

var consignee = new Consignee()
{
CompanyName = "Consignee Test",
AddressLine1 = "123 consignee test",
ZipOrPostalCode = "45177",
City = "Wilmington",
StateOrProvince = "OH",
CountryCode = "USA"
};

var item = new Item()
{
Class = "70",
Pieces = 1,
Weight = 110,
PackageType = "BAG",
Description = "Test Description"
};

var bolInfo = new BillOfLading()
{
BOLDate = DateTime.Now.ToShortDateString(),
Shipper = shipper,
Consignee = consignee,
Items = new List() { item },
SpecialInstructions = "Test Special Instructions",
FreightChargePaymentMethod = "Prepaid",
ServiceLevel = "Standard"
};

var bolData = new CreateBolRequest()
{
BillOfLading = bolInfo,
PickupRequest = null,
GenerateUniversalPro = true
};

return bolData;
}
}
}
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.Party;
import DataContracts.BillOfLading.BillOfLading;
import DataContracts.BillOfLading.Consignee;
import DataContracts.BillOfLading.Item;
import DataContracts.BillOfLading.Request.CreateBolRequest;
import DataContracts.BillOfLading.Response.BolResponse;

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

public BolResponse CreateBOL() throws Exception{
BolResponse response = new BolResponse();

CreateBolRequest request = PopulateBOLData();
String requestJSON = mapper.writeValueAsString(request);

String url = "{baseurl}/BillOfLading";
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(), BolResponse.class);

return response;
}

private CreateBolRequest PopulateBOLData()
{
Party shipper = new Party();
shipper.CompanyName = "Shipper Test";
shipper.AddressLine1 = "123 ship test";
shipper.ZipOrPostalCode = "34471";
shipper.City = "Ocala";
shipper.StateOrProvince = "FL";
shipper.CountryCode = "USA";
shipper.PhoneNumber = "6145558888";

Consignee consignee = new Consignee();
consignee.CompanyName = "Consignee Test";
consignee.AddressLine1 = "123 consignee test";
consignee.ZipOrPostalCode = "45177";
consignee.City = "Wilmington";
consignee.StateOrProvince = "OH";
consignee.CountryCode = "USA";

Item item = new Item();
item.Class = "70";
item.Pieces = 1;
item.Weight = 110;
item.PackageType = "BAG";
item.Description = "Test Description";

List items = new ArrayList();
items.add(item);

BillOfLading bolInfo = new BillOfLading();
bolInfo.BOLDate = LocalDate.now().format(DateTimeFormatter.ofPattern("MM/dd/yyyy"));
bolInfo.Shipper = shipper;
bolInfo.Consignee = consignee;
bolInfo. Items = items;
bolInfo.SpecialInstructions = "Test Special Instructions";
bolInfo.FreightChargePaymentMethod = "Prepaid";
bolInfo.ServiceLevel = "Standard";

CreateBolRequest bolData = new CreateBolRequest();
bolData.BillOfLading = bolInfo;
bolData.PickupRequest = null;
bolData.GenerateUniversalPro = true;

return bolData;
}
}
Get Bill Of Lading
HTTP Method: GET
URL: /BillOfLading
Request Parameters
Name Type Cardinality Required Description
ProNumber string One Required ProNumber for the BOL you want to retrieve.
Response Parameters
Name Type Cardinality Description
ProNumber string One Pro Number
PickupRequestId string Zero or One This will be present if you scheduled a Pickup Request with your BOL.
BillOfLading object One
Properties
BolDate string One BOL Date
Shipper object One
Consignee object One
BillTo object Zero or One
Broker object Zero or One
RemitCOD object Zero or One
AdditionalServices array Zero or One
Items array One
HazmatInformation object Zero or One
DeclaredValue object One
SpecialInstructions string Zero or One
ReferenceNumbers string Zero or One
FreightChargePaymentMethod string One Prepaid or Collect.
ServiceLevel string One Standard, Guaranteed, GuaranteedByNoon, GuaranteedHourlyWindow, Expedited
HourlyWindow object Zero or One
ExpeditedQuoteNumber string Zero or One
Code integer One HTTP Status Code
Errors array One List of Errors
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}/BillOfLading?ProNumber=I111111111');
$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.BillOfLading;
using CallAPI.DataContracts.BillOfLading.Request;
using CallAPI.DataContracts.BillOfLading.Response;
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;

namespace CallAPI
{
class BillOfLadingSample
{
string apiKey = "Your API Key";

//GET
public GetBolResponse GetBOL()
{
var proNumber = "I111111111";

var url = string.Format("{baseurl}/BillOfLading?ProNumber={0}", proNumber);

var response = new GetBolResponse();
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.Party;
import DataContracts.BillOfLading.BillOfLading;
import DataContracts.BillOfLading.Consignee;
import DataContracts.BillOfLading.Item;
import DataContracts.BillOfLading.Request.CreateBolRequest;
import DataContracts.BillOfLading.Response.BolResponse;
import DataContracts.BillOfLading.Response.GetBolResponse;

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

public GetBolResponse GetBOL() throws Exception {
GetBolResponse response = new GetBolResponse();

String url = "{baseurl}/BillOfLading";

String proNumber = "I111111111";

url += "?ProNumber=" + proNumber;

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(), GetBolResponse.class);

return response;
}
}
Print BOL
HTTP Method: GET
URL: /BillOfLading/PrintBOL
Request Parameters
Name Type Cardinality Required Description
ProNumber string One Required The Pro Number for the BOL to retrieve a PDF image of.
Response Parameters
Name Type Cardinality Description
BolDocument string One Base64 encoded string of a pdf bol document
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}/BillOfLading/PrintBOL?ProNumber=I111111111');
$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.BillOfLading;
using CallAPI.DataContracts.BillOfLading.Request;
using CallAPI.DataContracts.BillOfLading.Response;
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;

namespace CallAPI
{
class BillOfLadingSample
{
string apiKey = "Your API Key";

//GET
public PrintBOLResponse PrintBOL()
{
var proNumber = "I111111111";

var url = string.Format("{baseurl}/BillOfLading/PrintBOL?ProNumber={0}", proNumber);

var response = new PrintBOLResponse();
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.Party;
import DataContracts.BillOfLading.BillOfLading;
import DataContracts.BillOfLading.Consignee;
import DataContracts.BillOfLading.Item;
import DataContracts.BillOfLading.Request.CreateBolRequest;
import DataContracts.BillOfLading.Response.BolResponse;
import DataContracts.BillOfLading.Response.GetBolResponse;
import DataContracts.BillOfLading.Response.PrintBOLResponse;
import DataContracts.BillOfLading.Response.PrintShippingLabelsResponse;

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

public PrintBOLResponse PrintBOL() throws Exception {
PrintBOLResponse response = new PrintBOLResponse();

String url = "{baseurl}/BillOfLading/PrintBOL";

String proNumber = "I111111111";

url += "?ProNumber=" + proNumber;

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(), PrintBOLResponse.class);

return response;
}
}
Print Shipping Labels
HTTP Method: GET
URL: /BillOfLading/PrintShippingLabels
Request Parameters
Name Type Cardinality Required Description
ProNumber string One Required The Pro Number for the Bol you want to get labels for.
Style integer One Required Between 1 and 13. See this document for descriptions of the different styles here.
StartPosition integer Zero or One Optional Will default to 1. Between 1 and 10.
NumberOfLabels integer One Required The number of labels to print. Between 1 and 100.
Response Parameters
Name Type Cardinality Description
ShippingLabelsFile string One Base64 encoded string of a pdf with your labels.
Code integer One HTTP Status Code
Errors array One
Properties
Error object Zero or More
Properties
Property string One
ErrorMessage string One
ExceptionMessage string
Messages array One
Properties
Message string Zero or More
Example Request

require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('{baseurl}/BillOfLading/PrintShippingLabels?ProNumber=I111111111&Style=1&StartPosition=1&NumberOfLabels=1');
$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.BillOfLading;
using CallAPI.DataContracts.BillOfLading.Request;
using CallAPI.DataContracts.BillOfLading.Response;
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;

namespace CallAPI
{
class BillOfLadingSample
{
string apiKey = "Your API Key";

//GET
public PrintShippingLabelsResponse PrintShippingLabels()
{
var proNumber = "I111111111";
var style = 1;
var startPosition = 1;
var numberOfLabels = 1;

var url = string.Format("{baseurl}/BillOfLading/PrintShippingLabels?ProNumber={0}&Style={1}&StartPosition={2}&NumberOfLabels={3}",
proNumber, style, startPosition, numberOfLabels);

var response = new PrintShippingLabelsResponse();
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.Party;
import DataContracts.BillOfLading.BillOfLading;
import DataContracts.BillOfLading.Consignee;
import DataContracts.BillOfLading.Item;
import DataContracts.BillOfLading.Request.CreateBolRequest;
import DataContracts.BillOfLading.Response.BolResponse;
import DataContracts.BillOfLading.Response.GetBolResponse;
import DataContracts.BillOfLading.Response.PrintBOLResponse;
import DataContracts.BillOfLading.Response.PrintShippingLabelsResponse;

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

public PrintShippingLabelsResponse PrintShippingLabels() throws Exception {
PrintShippingLabelsResponse response = new PrintShippingLabelsResponse();

String url = "{baseurl}/BillOfLading/PrintShippingLabels";

String proNumber = "I111111111";
int style = 1;
int startPosition = 1;
int numberOfLabels = 1;

url += "?ProNumber=" + proNumber + "&Style=" + style + "&StartPosition=" + startPosition + "&NumberOfLabels=" + numberOfLabels;

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(), PrintShippingLabelsResponse.class);

return response;
}
}
Get Hazmat Description
HTTP Method: GET
URL: /BillOfLading/GetHazmatDescription
Request Parameters
Name Type Cardinality Required Description
uNNANumber string One Required UNNA Number - supported format is UN1234
Response Parameters
Name Type Cardinality Description
UNNAList array
Properties
UnnaNumber string One UNNA Number
UnnaDescription string One Description of the UNNA number
IsNOS boolean One Indicates whether an UNNA Number is NOS (not otherwise specified)
Example Request

require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('{baseurl}/BillOfLading/GetHazmatDescription?request.uNNANumber=UN1971');
$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.BillOfLading;
using CallAPI.DataContracts.BillOfLading.Request;
using CallAPI.DataContracts.BillOfLading.Response;
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;

namespace CallAPI
{
class BillOfLadingSample
{
string apiKey = "Your API Key";

//GET
public GetHazmatDescriptionResponse GetHazmatDescription()
{
var uNNANumber= "UN1971";

var url = string.Format("{baseurl}/BillOfLading/GetHazmatDescription?uNNANumber={0}",
uNNANumber);

var response = new GetHazmatDescriptionResponse();
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.Party;
import DataContracts.BillOfLading.BillOfLading;
import DataContracts.BillOfLading.Consignee;
import DataContracts.BillOfLading.Item;
import DataContracts.BillOfLading.Request.CreateBolRequest;
import DataContracts.BillOfLading.Response.BolResponse;
import DataContracts.BillOfLading.Response.GetBolResponse;
import DataContracts.BillOfLading.Response.GetHazmatDescriptionResponse;

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

public GetHazmatDescriptionResponse GetHazmatDescriptionResponse() throws Exception {
GetHazmatDescriptionResponse response = new GetHazmatDescriptionResponse();

String url = "{baseurl}/BillOfLading/GetHazmatDescription";

String uNNANumber= "UN1971";


url += "?uNNANumber=" + uNNANumber;

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(), GetHazmatDescriptionResponse.class);

return response;
}
}