Pickup Request

R+L Carriers's Pickup Request API is simple to implement on your end and critical to managing your pickup requests. We provide the pickup options you need to get your shipments moving.
Create a Pickup Request
HTTP Method: POST
URL: /PickupRequest
Request Parameters
Name Type Cardinality Required Description
Pickup object One Required The pickup request object to be created
Properties
Shipper object One Required Shipper Information
Properties
CompanyName string One Required The shipper's company name.
AddressLine1 string One Required Shipper address line one
AddressLine2 string Zero or One Optional Shipper address line two
City string One Required Shipper city
StateOrProvince string One Required Shipper state
ZipOrPostalCode string One Required Shipper zip code
CountryCode string One Required Shipper ISO3 country code.
PhoneNumber string One Required Shipper phone number
PhoneExtension string Zero or One Optional Shipper phone extension
ContactName string Zero or One Optional Shipper contact name
EmailAddress string Zero or One Optional Shipper contact email address. A pickup confirmation email will be sent to this address if passed in.
PickupReferenceNumber string Zero or One Optional Required if needed to identify pickup with shipper.
Contact object Zero or One Optional Contact information.
Fill this out if the contact is different than the Shipper. Requester will be set to Third Party.
Properties
Name string One Required Contact name
CompanyName string One Required Company name
PhoneNumber string One Required Contact phone number
PhoneExtension string Zero or One Optional Contact phone extension
EmailAddress string Zero or One Optional Contact email address. A pickup confirmation email will be sent to this address if passed in.
Destinations array One Required Destination information
Properties
Destination object One or More (up to 8) Required Destination
Properties
Weight integer One Required Weight going to that destination
Pieces integer One Required Number of pieces going to that destination
PackageType string Zero or One Optional 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
City string One Required Destination city
StateOrProvince string Zero or One Required Destination state. Optional if country does not have states.
ZipOrPostalCode string Zero or One Required Destination zip code. Optional if the destination country does not have zip codes.
CountryCode string One Required Destination ISO3 Country Code
AdditionalInstructions string One Optional
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. Accepted format: hh:mm tt
ServiceLevel string Zero or One Optional Valid Values: Expedited, Guaranteed, GuaranteedByNoon, GuaranteedHourlyWindow, Standard
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 One Optional Only pass in if ServiceLevel is Expedited.
AdditionalServices array Zero or One Optional
Properties
AdditionalService string Zero or More Optional Valid Values: LiftGate, NoRollup, LimitedAccessPickup, InsidePickup
LoadAttributes array Zero or One Optional
Properties
LoadAttribute string Zero or More Optional Valid values: Food, Freezable, Hazmat, Poison
SendEmailConfirmation boolean One Optional The default value is true.
Response Parameters
Name Type Cardinality Description
PickupRequestId integer One Newly created pickup request Id
Code integer One HTTP status code
Errors array One Returned errors
Properties
Error object Zero or More
Properties
Property string One
ErrorMessage string One
ExceptionMessage string One
Messages array One Returned informational messages
Properties
Message string One or More

require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('{baseurl}/PickupRequest');
$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 "Pickup": {
\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 "Destinations": [
\n {
\n "Weight": 200,
\n "Pieces": 1,
\n "PackageType": "SKD",
\n "City": "Wilmington",
\n "StateOrProvince": "OH",
\n "ZipOrPostalCode": "45177",
\n "CountryCode": "USA"
\n }
\n ],
\n "PickupDate": "08/14/2020",
\n "ReadyTime": "08:00 AM",
\n "CloseTime": "05:00 PM",
\n "ServiceLevel": "Standard"
\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.PickupRequest;
using CallAPI.DataContracts.PickupRequest.Request;
using CallAPI.DataContracts.PickupRequest.Response;
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;

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

public CreatePickupResponse CreatePickup()
{
var request = new CreatePickupRequest()
{
Pickup = PopulateCreatePickupData()
};

var response = new CreatePickupResponse();

var url = "{baseurl}/PickupRequest/";

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 AddPickup PopulateCreatePickupData()
{
var destination = new Destination()
{
CountryCode = "USA",
ZipOrPostalCode = "45177",
City = "Wilmington",
StateOrProvince = "OH",
Weight = 200,
Pieces = 1,
PackageType = "SKD"
};

var shipper = new Shipper()
{
CompanyName = "Shipper Test",
AddressLine1 = "123 ship test",
CountryCode = "USA",
ZipOrPostalCode = "34471",
City = "Ocala",
StateOrProvince = "FL",
PhoneNumber = "6145558888"
};

List destinations = new List();
destinations.Add(destination);

AddPickup addPickup = new AddPickup()
{
Shipper = shipper,
PickupDate = DateTime.Now.ToShortDateString(),
ReadyTime = "08:00 AM",
CloseTime = "05:00 PM",
AdditionalInstructions = "",
Destinations = destinations,
ServiceLevel = "Standard"
};

return addPickup;
}
}
}
package Samples;

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

import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpEntityEnclosingRequestBase;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.client.methods.HttpPut;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.http.util.EntityUtils;

import com.fasterxml.jackson.databind.ObjectMapper;

import DataContracts.Pickup.AddPickup;
import DataContracts.Pickup.Contact;
import DataContracts.Pickup.Destination;
import DataContracts.Pickup.Pickup;
import DataContracts.Pickup.Shipper;
import DataContracts.Pickup.Request.CancelPickupRequest;
import DataContracts.Pickup.Request.CreatePickupRequest;
import DataContracts.Pickup.Request.UpdatePickupRequest;
import DataContracts.Pickup.Response.CancelPickupResponse;
import DataContracts.Pickup.Response.CreatePickupResponse;
import DataContracts.Pickup.Response.GetPickupResponse;

public class PickupSample {

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

public CreatePickupResponse CreatePickup() throws Exception{
CreatePickupResponse response = new CreatePickupResponse();

CreatePickupRequest request = new CreatePickupRequest();
request.Pickup = PopulatePickupData();
String requestJSON = mapper.writeValueAsString(request);

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

return response;
}

private AddPickup PopulateCreatePickupData()
{
Contact contact = null;

Destination destination = new Destination();
destination.CountryCode = "USA";
destination.ZipOrPostalCode = "45177";
destination.City = "Wilmington";
destination.StateOrProvince = "OH";
destination.Weight = 200;
destination.Pieces = 1;
destination.PackageType = "SKD";

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

List destinations = new ArrayList();
destinations.add(destination);

AddPickup addPickup = new AddPickup();
addPickup.Shipper = shipper;
addPickup.PickupDate = LocalDate.now().format(DateTimeFormatter.ofPattern("MM/dd/yyyy"));
addPickup.ReadyTime = "08:00 AM";
addPickup.CloseTime = "05:00 PM";
addPickup.AdditionalInstructions = "";
addPickup.LoadAttributes = new ArrayList();
addPickup.Contact = contact;
addPickup.Destinations = destinations;
addPickup.ServiceLevel = "Standard";
addPickup.HourlyWindow = null;
addPickup.ExpeditedQuoteNumber = "";

return addPickup;
}
}
Get a previous Pickup Request
HTTP Method: GET
URL: /PickupRequest
Request Parameters
Name Type Cardinality Required Description
PickupRequestId integer One Required The R+L Pickup Request Id
Response Parameters
Name Type Cardinality Description
Pickup object One Returned pickup object
Properties
Shipper object One Shipper information
Properties
CompanyName string One Shipper name
AddressLine1 string One Shipper address line one
AddressLine2 string One Shipper address line two
City string One Shipper city
StateOrProvince string One Shipper state
ZipOrPostalCode string One Shipper zip code
CountryCode string One Shipper country code
PhoneNumber string One Shipper phone number
PhoneExtension string Zero or One Shipper phone extension
EmailAddress string Zero or One Shipper email address
ContactName string Zero or One
PickupReferenceNumber string Zero or One
Contact object One Contact information if supplied.
Properties
Name string One Contact name
CompanyName string One Company name
PhoneNumber string One Contact phone number
PhoneExtension string Zero or One Contact phone extension
EmailAddress string One Contact email address
Destinations array One Array of destinations
Properties
Destination object One or More Destination object
Properties
Weight integer One Item weight
Pieces integer One Item pieces
PackageType string One Item package type
City string One Destination City
StateOrProvince string One Destination State
ZipOrPostalCode string One Destination Zip Code
CountryCode string One Destination ISO3 Country Code
AdditionalInstructions string One
PickupDate string One
ReadyTime string One
CloseTime string One
ServiceLevel string One
HourlyWindow object Zero or One
Properties
Start string One
End string One
ExpeditedQuoteNumber string Zero or One
AdditionalServices array One List of additional services
Properties
AdditionalService string One or More
LoadAttributes array One
Properties
LoadAttribute string Zero or More
PickupRequestId integer One Returned pickup object Id
Code integer One HTTP status code
Errors array One Returned errors
Properties
Error object Zero or More
Properties
Property string
ErrorMessage string
ExceptionMessage string
Messages array One Returned informational messages
Properties
Message string Zero or More
Example Request

require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('{baseurl}/PickupRequest?PickupRequestId=1111111');
$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.Pickup;
using CallAPI.DataContracts.Pickup.Request;
using CallAPI.DataContracts.Pickup.Response;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;

namespace CallAPI.Samples
{
class PickupSample
{
string apiKey = "Your API Key";

//GET
public GetPickupResponse GetPickup()
{
var pickupRequestID = 1111111;

var url = string.Format("{baseurl}/PickupRequest?PickupRequestId={0}", pickupRequestID);

var response = new GetPickupResponse();
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.net.URI;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.List;

import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpEntityEnclosingRequestBase;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.client.methods.HttpPut;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.http.util.EntityUtils;

import com.fasterxml.jackson.databind.ObjectMapper;

import DataContracts.Pickup.AddPickup;
import DataContracts.Pickup.Contact;
import DataContracts.Pickup.Destination;
import DataContracts.Pickup.Pickup;
import DataContracts.Pickup.PickupBase;
import DataContracts.Pickup.Shipper;
import DataContracts.Pickup.Request.CancelPickupRequest;
import DataContracts.Pickup.Request.CreatePickupFromBOL;
import DataContracts.Pickup.Request.CreatePickupRequest;
import DataContracts.Pickup.Request.UpdatePickupRequest;
import DataContracts.Pickup.Response.CancelPickupResponse;
import DataContracts.Pickup.Response.CreatePickupResponse;
import DataContracts.Pickup.Response.GetPickupResponse;

public class PickupSample {

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

public GetPickupResponse GetPickup() throws Exception {
GetPickupResponse response = new GetPickupResponse();

String url = "{baseurl}/PickupRequest";

int pickupRequestID = 1111111;

url += "?PickupRequestId=" + pickupRequestID;

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

return response;
}
}
Update a Pickup Request
HTTP Method: PUT
URL: /PickupRequest
Request Parameters
Name Type Cardinality Required Description
PickupRequestId integer One Required The pickup request Id to be updated
Pickup object One Required The pickup request object to be inserted
Properties
Contact object One Required Contact information
Properties
Name string Required Contact name
CompanyName string Required Company name
PhoneNumber string Required Contact phone number
PhoneExtension string Optional Contact phone extension
EmailAddress string Required Contact email address
Destinations array One Required List of Destinations
Properties
Destination object One or More (up to 8)
Properties
Weight integer One Required
Pieces integer One Required
PackageType string Zero or One Optional
City string One Required
StateOrProvince string One Required
ZipOrPostalCode string One Required
CountryCode string One Required
AdditionalInstructions string Zero or One Optional
PickupDate string One Required Format: MM/dd/yyyy.
ReadyTime string One Required
CloseTime string One Required
ServiceLevel string One Optional
HourlyWindow object Zero or One Optional
Properties
Start string One Required Hourly window start time
End string One Required Hourly window end time
ExpeditedQuoteNumber string One Optional
AdditionalServices array Zero or One Optional
Properties
AdditionalService string Zero or More Optional Valid Values: LiftGate, NoRollup, LimitedAccessPickup, InsidePickup
LoadAttributes array Zero or One Optional
Properties
LoadAttribute string Zero or More Optional
Response Parameters
Name Type Cardinality Description
PickupRequestId integer One Newly created pickup request Id
Code integer One HTTP status code
Errors array One Returned errors
Properties
Error object Zero or More
Properties
Property string One
ErrorMessage string One
ExceptionMessage string One
Messages array One Returned informational messages
Properties
Message string Zero or More
Example Request

require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('{baseurl}/PickupRequest');
$request->setMethod(HTTP_Request2::METHOD_PUT);
$request->setConfig(array(
'follow_redirects' => TRUE
));
$request->setHeader(array(
'apiKey' => 'Your API Key',
'Content-Type' => 'application/json'
));
$request->setBody('{
\n "PickupRequestId": 1111111,
\n "Pickup": {
\n "Destinations": [
\n {
\n "Weight": 200,
\n "Pieces": 1,
\n "PackageType": "BAG",
\n "City": "Melvin",
\n "StateOrProvince": "OH",
\n "ZipOrPostalCode": "45177",
\n "CountryCode": "USA"
\n }
\n ],
\n "PickupDate": "08/18/2020",
\n "ReadyTime": "08:00 AM",
\n "CloseTime": "05:00 PM",
\n "ServiceLevel": "Standard"
\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.Pickup;
using CallAPI.DataContracts.Pickup.Request;
using CallAPI.DataContracts.Pickup.Response;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;

namespace CallAPI.Samples
{
class PickupSample
{
string apiKey = "Your API Key";

//PUT
public CreatePickupResponse UpdatePickup()
{
var request = new UpdatePickupRequest()
{
PickupRequestId = 1111111,
Pickup = PopulateUpdatePickupData()
};

var response = new CreatePickupResponse();

var url = "{baseurl}/PickupRequest/";

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

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

return response;
}

private Pickup PopulateUpdatePickupData()
{
var destination = new Destination()
{
CountryCode = "USA",
ZipOrPostalCode = "45177",
City = "Melvin",
StateOrProvince = "OH",
Weight = 200,
Pieces = 1,
PackageType = "BAG"
};

List destinations = new List();
destinations.Add(destination);

Pickup addPickup = new Pickup()
{
PickupDate = DateTime.Now.AddDays(4).ToShortDateString(),
ReadyTime = "08:00 AM",
CloseTime = "05:00 PM",
AdditionalInstructions = "",
Destinations = destinations,
ServiceLevel = "Standard"
};

return addPickup;
}
}
}
package Samples;

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

import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpEntityEnclosingRequestBase;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.client.methods.HttpPut;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.http.util.EntityUtils;

import com.fasterxml.jackson.databind.ObjectMapper;

import DataContracts.Pickup.AddPickup;
import DataContracts.Pickup.Contact;
import DataContracts.Pickup.Destination;
import DataContracts.Pickup.Pickup;
import DataContracts.Pickup.Shipper;
import DataContracts.Pickup.Request.CancelPickupRequest;
import DataContracts.Pickup.Request.CreatePickupRequest;
import DataContracts.Pickup.Request.UpdatePickupRequest;
import DataContracts.Pickup.Response.CancelPickupResponse;
import DataContracts.Pickup.Response.CreatePickupResponse;
import DataContracts.Pickup.Response.GetPickupResponse;

public class PickupSample {

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

public CreatePickupResponse UpdatePickup() throws Exception{
CreatePickupResponse response = new CreatePickupResponse();

UpdatePickupRequest request = new UpdatePickupRequest();
request.Pickup = PopulateUpdatePickupData();
request.PickupRequestId = 1111111;
String requestJSON = mapper.writeValueAsString(request);

String url = "{baseurl}/PickupRequest";
HttpClient httpClient = HttpClientBuilder.create().build();
HttpPut httpRequest = new HttpPut(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(), CreatePickupResponse.class);

return response;
}

private Pickup PopulateUpdatePickupData()
{
Contact contact = null;

Destination destination = new Destination();
destination.CountryCode = "USA";
destination.ZipOrPostalCode = "45177";
destination.City = "Melvin";
destination.StateOrProvince = "OH";
destination.Weight = 200;
destination.Pieces = 1;
destination.PackageType = "BAG";

List destinations = new ArrayList();
destinations.add(destination);

Pickup pickup = new Pickup();
pickup.PickupDate = LocalDate.now().plusDays(4).format(DateTimeFormatter.ofPattern("MM/dd/yyyy"));
pickup.ReadyTime = "08:00 AM";
pickup.CloseTime = "05:00 PM";
pickup.AdditionalInstructions = "";
pickup.LoadAttributes = new ArrayList();
pickup.Contact = contact;
pickup.Destinations = destinations;
pickup.ServiceLevel = "Standard";
pickup.HourlyWindow = null;
pickup.ExpeditedQuoteNumber = "";

return pickup;
}
}
Cancel a Pickup Request
HTTP Method: DELETE
URL: /PickupRequest
Request Parameters
Name Type Cardinality Required Description
PickupRequestId integer One Required The unique identifier for the pickup request being canceled
Reason string One Required Reason for canceling the pickup request
Response Parameters
Name Type Cardinality Description
Code integer One HTTP status code
Errors array One Returned errors
Properties
Error object Zero or More
Properties
Property string One
ErrorMessage string One
ExceptionMessage string One
Messages array One Returned informational messages
Properties
Message string Zero or More
Example Request

require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('{baseurl}/PickupRequest');
$request->setMethod(HTTP_Request2::METHOD_DELETE);
$request->setConfig(array(
'follow_redirects' => TRUE
));
$request->setHeader(array(
'apiKey' => 'Your API Key',
'Content-Type' => 'application/json'
));
$request->setBody('{
\n "PickupRequestId": 1111111,
\n "Reason": "Freight not ready"
\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.PickupRequest.Request;
using CallAPI.DataContracts.PickupRequest.Response;
using Newtonsoft.Json;
using System;
using System.Net.Http;
using System.Text;

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

public CancelPickupResponse CancelPickup()
{
var request = new CancelPickupRequest()
{
PickupRequestId = 1111111,
Reason = "Freight not ready"
};

var requestJSON = JsonConvert.SerializeObject(request);

HttpRequestMessage httpRequest = new HttpRequestMessage
{
Content = new StringContent(requestJSON, Encoding.UTF8, "application/json"),
Method = HttpMethod.Delete,
RequestUri = new Uri("{baseurl}/PickupRequest")
};

var response = new CancelPickupResponse();
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Add("apiKey", apiKey);
var apiResponse = client.SendAsync(httpRequest).Result;
response = apiResponse.Content.ReadAsAsync().Result;
}

return response;
}
}
}
package Samples;

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

import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpEntityEnclosingRequestBase;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.http.util.EntityUtils;

import com.fasterxml.jackson.databind.ObjectMapper;

import DataContracts.Pickup.Contact;
import DataContracts.Pickup.Destination;
import DataContracts.Pickup.Pickup;
import DataContracts.Pickup.PickupInformation;
import DataContracts.Pickup.Shipper;
import DataContracts.Pickup.Request.CancelPickupRequest;
import DataContracts.Pickup.Response.CancelPickupResponse;

public class PickupSample {

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

public CancelPickupResponse CancelPickup() throws Exception{
CancelPickupResponse response = new CancelPickupResponse();

CancelPickupRequest request = new CancelPickupRequest();
request.PickupRequestId = 1111111;
request.Reason = "Freight not ready";
String requestJSON = mapper.writeValueAsString(request);

String url = "{baseurl}/PickupRequest";

HttpClient httpClient = HttpClientBuilder.create().build();
HttpDeleteWithBody httpDelete = new HttpDeleteWithBody(url);
StringEntity params =new StringEntity(requestJSON);
httpDelete.addHeader("content-type", "application/json");
httpDelete.addHeader("apiKey", apiKey);
httpDelete.setEntity(params);
HttpResponse httpResponse = httpClient.execute(httpDelete);

HttpEntity entity = httpResponse.getEntity();
String responseString = EntityUtils.toString(entity);

response = mapper.readValue(responseString, CancelPickupResponse.class);

return response;
}
}


class HttpDeleteWithBody extends HttpEntityEnclosingRequestBase {
public static final String METHOD_NAME = "DELETE";

public String getMethod() {
return METHOD_NAME;
}

public HttpDeleteWithBody(final String uri) {
super();
setURI(URI.create(uri));
}

public HttpDeleteWithBody(final URI uri) {
super();
setURI(uri);
}

public HttpDeleteWithBody() {
super();
}
}
Create a Pickup Request from a BOL
HTTP Method: POST
URL: /PickupRequest/FromBOL
Request Parameters
Name Type Cardinality Required Description
ProNumber string One Required The Pro Number for the R+L BOL you want to tie to this pickup request.
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. Accepted format: hh:mm tt
AdditionalInstructions string Zero or One Optional
LoadAttributes array Zero or One Optional
Properties
LoadAttribute string Zero or More Optional Valid values: Food, Freezable, Hazmat, Poison
Contact object Zero or One Optional Contact information.
Fill this out if the contact is different than the Shipper. Requester will be set to Third Party.
Properties
Name string Zero or One Optional
CompanyName string Zero or One Optional
PhoneNumber string Zero or One Optional
PhoneExtension string Zero or One Optional
EmailAddress string Zero or One Optional Contact email address. A pickup confirmation email will be sent to this address if passed in.
SendEmailConfirmation boolean One Optional The default value is true.
Response Parameters
Name Type Cardinality Description
PickupRequestId integer One Newly created pickup request Id
Code integer One HTTP status code
Errors array One Returned errors
Properties
Error object Zero or More
Properties
Property string One
ErrorMessage string One
ExceptionMessage string One
Messages array One Returned informational messages
Properties
Message string One or More
Example Request

require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('{baseurl}/PickupRequest/FromBOL');
$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 "ProNumber": "111111111",
\n "PickupInformation": {
\n "PickupDate": "08/18/2020",
\n "ReadyTime": "08:00 AM",
\n "CloseTime": "05:00 PM",
\n "AdditionalInstructions": ""
\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.PickupRequest;
using CallAPI.DataContracts.PickupRequest.Request;
using CallAPI.DataContracts.PickupRequest.Response;
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;

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

public CreatePickupResponse CreatePickupFromBOL()
{
var request = PopulateCreatePickupFromBOLData();

var response = new CreatePickupResponse();

var url = "{baseurl}/PickupRequest/FromBOL";

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 CreatePickupFromBOL PopulateCreatePickupFromBOLData()
{
var pickupInformation = new PickupBase()
{
PickupDate = DateTime.Now.AddDays(4).ToShortDateString(),
ReadyTime = "08:00 AM",
CloseTime = "05:00 PM",
AdditionalInstructions = ""
};

var request = new CreatePickupFromBOL
{
ProNumber = "111111111",
PickupInformation = pickupInformation,
Contact = null
};

return request;
}
}
}
package Samples;

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

import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpEntityEnclosingRequestBase;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.client.methods.HttpPut;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.http.util.EntityUtils;

import com.fasterxml.jackson.databind.ObjectMapper;

import DataContracts.Pickup.AddPickup;
import DataContracts.Pickup.Contact;
import DataContracts.Pickup.Destination;
import DataContracts.Pickup.Pickup;
import DataContracts.Pickup.PickupBase;
import DataContracts.Pickup.Shipper;
import DataContracts.Pickup.Request.CancelPickupRequest;
import DataContracts.Pickup.Request.CreatePickupFromBOL;
import DataContracts.Pickup.Request.CreatePickupRequest;
import DataContracts.Pickup.Request.UpdatePickupRequest;
import DataContracts.Pickup.Response.CancelPickupResponse;
import DataContracts.Pickup.Response.CreatePickupResponse;
import DataContracts.Pickup.Response.GetPickupResponse;

public class PickupSample {

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

public CreatePickupResponse CreatePickupFromBOL() throws Exception{
CreatePickupResponse response = new CreatePickupResponse();

CreatePickupFromBOL request = PopulateCreatePickupFromBOLData();
String requestJSON = mapper.writeValueAsString(request);

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

return response;
}

private CreatePickupFromBOL PopulateCreatePickupFromBOLData()
{
PickupBase pickupInformation = new PickupBase();
pickupInformation.PickupDate = LocalDate.now().plusDays(4).format(DateTimeFormatter.ofPattern("MM/dd/yyyy"));
pickupInformation.ReadyTime = "08:00 AM";
pickupInformation.CloseTime = "05:00 PM";
pickupInformation.AdditionalInstructions = "";

CreatePickupFromBOL request = new CreatePickupFromBOL();
request.ProNumber = "111111111";
request.PickupInformation = pickupInformation;
request.Contact = null;

return request;
}
}