Attach BOL to an order
curl --request POST \
--url https://api.retailreadyai.com/api/documents/bol/{order_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"file_content": "JVBERi0xL...",
"file_name": "bol.pdf",
"bill_of_lading_number": "12345689",
"pro_number": "123-4567890",
"carrier": "UPS FREIGHT",
"carrier_alpha_code": "EXLA",
"scheduled_delivery_date": "2024-10-19 07:00:00",
"external_load_number": "LOAD-1234"
}
'import requests
url = "https://api.retailreadyai.com/api/documents/bol/{order_id}"
payload = {
"file_content": "JVBERi0xL...",
"file_name": "bol.pdf",
"bill_of_lading_number": "12345689",
"pro_number": "123-4567890",
"carrier": "UPS FREIGHT",
"carrier_alpha_code": "EXLA",
"scheduled_delivery_date": "2024-10-19 07:00:00",
"external_load_number": "LOAD-1234"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
file_content: 'JVBERi0xL...',
file_name: 'bol.pdf',
bill_of_lading_number: '12345689',
pro_number: '123-4567890',
carrier: 'UPS FREIGHT',
carrier_alpha_code: 'EXLA',
scheduled_delivery_date: '2024-10-19 07:00:00',
external_load_number: 'LOAD-1234'
})
};
fetch('https://api.retailreadyai.com/api/documents/bol/{order_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.retailreadyai.com/api/documents/bol/{order_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'file_content' => 'JVBERi0xL...',
'file_name' => 'bol.pdf',
'bill_of_lading_number' => '12345689',
'pro_number' => '123-4567890',
'carrier' => 'UPS FREIGHT',
'carrier_alpha_code' => 'EXLA',
'scheduled_delivery_date' => '2024-10-19 07:00:00',
'external_load_number' => 'LOAD-1234'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.retailreadyai.com/api/documents/bol/{order_id}"
payload := strings.NewReader("{\n \"file_content\": \"JVBERi0xL...\",\n \"file_name\": \"bol.pdf\",\n \"bill_of_lading_number\": \"12345689\",\n \"pro_number\": \"123-4567890\",\n \"carrier\": \"UPS FREIGHT\",\n \"carrier_alpha_code\": \"EXLA\",\n \"scheduled_delivery_date\": \"2024-10-19 07:00:00\",\n \"external_load_number\": \"LOAD-1234\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.retailreadyai.com/api/documents/bol/{order_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"file_content\": \"JVBERi0xL...\",\n \"file_name\": \"bol.pdf\",\n \"bill_of_lading_number\": \"12345689\",\n \"pro_number\": \"123-4567890\",\n \"carrier\": \"UPS FREIGHT\",\n \"carrier_alpha_code\": \"EXLA\",\n \"scheduled_delivery_date\": \"2024-10-19 07:00:00\",\n \"external_load_number\": \"LOAD-1234\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.retailreadyai.com/api/documents/bol/{order_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"file_content\": \"JVBERi0xL...\",\n \"file_name\": \"bol.pdf\",\n \"bill_of_lading_number\": \"12345689\",\n \"pro_number\": \"123-4567890\",\n \"carrier\": \"UPS FREIGHT\",\n \"carrier_alpha_code\": \"EXLA\",\n \"scheduled_delivery_date\": \"2024-10-19 07:00:00\",\n \"external_load_number\": \"LOAD-1234\"\n}"
response = http.request(request)
puts response.read_body{
"message": "BOL uploaded successfully"
}{
"message": "Invalid Request - Missing required fields",
"error": {
"code": "INVALID_REQUEST"
}
}{
"message": "Failed to upload BOL",
"error": {
"code": "INTERNAL_SERVER_ERROR"
}
}Documents
Attach BOL to an order
Send a base 64 encoded PDF and attach it to an existing order
POST
/
api
/
documents
/
bol
/
{order_id}
Attach BOL to an order
curl --request POST \
--url https://api.retailreadyai.com/api/documents/bol/{order_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"file_content": "JVBERi0xL...",
"file_name": "bol.pdf",
"bill_of_lading_number": "12345689",
"pro_number": "123-4567890",
"carrier": "UPS FREIGHT",
"carrier_alpha_code": "EXLA",
"scheduled_delivery_date": "2024-10-19 07:00:00",
"external_load_number": "LOAD-1234"
}
'import requests
url = "https://api.retailreadyai.com/api/documents/bol/{order_id}"
payload = {
"file_content": "JVBERi0xL...",
"file_name": "bol.pdf",
"bill_of_lading_number": "12345689",
"pro_number": "123-4567890",
"carrier": "UPS FREIGHT",
"carrier_alpha_code": "EXLA",
"scheduled_delivery_date": "2024-10-19 07:00:00",
"external_load_number": "LOAD-1234"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
file_content: 'JVBERi0xL...',
file_name: 'bol.pdf',
bill_of_lading_number: '12345689',
pro_number: '123-4567890',
carrier: 'UPS FREIGHT',
carrier_alpha_code: 'EXLA',
scheduled_delivery_date: '2024-10-19 07:00:00',
external_load_number: 'LOAD-1234'
})
};
fetch('https://api.retailreadyai.com/api/documents/bol/{order_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.retailreadyai.com/api/documents/bol/{order_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'file_content' => 'JVBERi0xL...',
'file_name' => 'bol.pdf',
'bill_of_lading_number' => '12345689',
'pro_number' => '123-4567890',
'carrier' => 'UPS FREIGHT',
'carrier_alpha_code' => 'EXLA',
'scheduled_delivery_date' => '2024-10-19 07:00:00',
'external_load_number' => 'LOAD-1234'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.retailreadyai.com/api/documents/bol/{order_id}"
payload := strings.NewReader("{\n \"file_content\": \"JVBERi0xL...\",\n \"file_name\": \"bol.pdf\",\n \"bill_of_lading_number\": \"12345689\",\n \"pro_number\": \"123-4567890\",\n \"carrier\": \"UPS FREIGHT\",\n \"carrier_alpha_code\": \"EXLA\",\n \"scheduled_delivery_date\": \"2024-10-19 07:00:00\",\n \"external_load_number\": \"LOAD-1234\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.retailreadyai.com/api/documents/bol/{order_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"file_content\": \"JVBERi0xL...\",\n \"file_name\": \"bol.pdf\",\n \"bill_of_lading_number\": \"12345689\",\n \"pro_number\": \"123-4567890\",\n \"carrier\": \"UPS FREIGHT\",\n \"carrier_alpha_code\": \"EXLA\",\n \"scheduled_delivery_date\": \"2024-10-19 07:00:00\",\n \"external_load_number\": \"LOAD-1234\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.retailreadyai.com/api/documents/bol/{order_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"file_content\": \"JVBERi0xL...\",\n \"file_name\": \"bol.pdf\",\n \"bill_of_lading_number\": \"12345689\",\n \"pro_number\": \"123-4567890\",\n \"carrier\": \"UPS FREIGHT\",\n \"carrier_alpha_code\": \"EXLA\",\n \"scheduled_delivery_date\": \"2024-10-19 07:00:00\",\n \"external_load_number\": \"LOAD-1234\"\n}"
response = http.request(request)
puts response.read_body{
"message": "BOL uploaded successfully"
}{
"message": "Invalid Request - Missing required fields",
"error": {
"code": "INVALID_REQUEST"
}
}{
"message": "Failed to upload BOL",
"error": {
"code": "INTERNAL_SERVER_ERROR"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The ID of the order to attach the BOL to
Body
application/json
Base 64 encoded PDF
Example:
"JVBERi0xL..."
Name of the file
Example:
"bol.pdf"
Bill of Lading number
Example:
"12345689"
Pro Number
Example:
"123-4567890"
Carrier
Example:
"UPS FREIGHT"
Carrier Alpha Code
Example:
"EXLA"
Scheduled delivery date in format: YYYY-MM-DD HH:mm:ss
Pattern:
^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$Example:
"2024-10-19 07:00:00"
External Load ID
Example:
"LOAD-1234"
Response
Successfully uploaded BOL
Success message
⌘I

