Stream LTL rates (SSE)
curl --request POST \
--url https://api.shippeek.dev/rates/ltl/stream \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"originPostalCode": "<string>",
"destPostalCode": "<string>",
"items": [
{
"weight": 123,
"length": 123,
"width": 123,
"height": 123,
"quantity": 1,
"description": "<string>",
"package": "<string>",
"hazardous": false,
"nmfc": "<string>"
}
]
}
'import requests
url = "https://api.shippeek.dev/rates/ltl/stream"
payload = {
"originPostalCode": "<string>",
"destPostalCode": "<string>",
"items": [
{
"weight": 123,
"length": 123,
"width": 123,
"height": 123,
"quantity": 1,
"description": "<string>",
"package": "<string>",
"hazardous": False,
"nmfc": "<string>"
}
]
}
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({
originPostalCode: '<string>',
destPostalCode: '<string>',
items: [
{
weight: 123,
length: 123,
width: 123,
height: 123,
quantity: 1,
description: '<string>',
package: '<string>',
hazardous: false,
nmfc: '<string>'
}
]
})
};
fetch('https://api.shippeek.dev/rates/ltl/stream', 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.shippeek.dev/rates/ltl/stream",
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([
'originPostalCode' => '<string>',
'destPostalCode' => '<string>',
'items' => [
[
'weight' => 123,
'length' => 123,
'width' => 123,
'height' => 123,
'quantity' => 1,
'description' => '<string>',
'package' => '<string>',
'hazardous' => false,
'nmfc' => '<string>'
]
]
]),
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.shippeek.dev/rates/ltl/stream"
payload := strings.NewReader("{\n \"originPostalCode\": \"<string>\",\n \"destPostalCode\": \"<string>\",\n \"items\": [\n {\n \"weight\": 123,\n \"length\": 123,\n \"width\": 123,\n \"height\": 123,\n \"quantity\": 1,\n \"description\": \"<string>\",\n \"package\": \"<string>\",\n \"hazardous\": false,\n \"nmfc\": \"<string>\"\n }\n ]\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.shippeek.dev/rates/ltl/stream")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"originPostalCode\": \"<string>\",\n \"destPostalCode\": \"<string>\",\n \"items\": [\n {\n \"weight\": 123,\n \"length\": 123,\n \"width\": 123,\n \"height\": 123,\n \"quantity\": 1,\n \"description\": \"<string>\",\n \"package\": \"<string>\",\n \"hazardous\": false,\n \"nmfc\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.shippeek.dev/rates/ltl/stream")
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 \"originPostalCode\": \"<string>\",\n \"destPostalCode\": \"<string>\",\n \"items\": [\n {\n \"weight\": 123,\n \"length\": 123,\n \"width\": 123,\n \"height\": 123,\n \"quantity\": 1,\n \"description\": \"<string>\",\n \"package\": \"<string>\",\n \"hazardous\": false,\n \"nmfc\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body"<string>"Rates
Stream LTL rates (SSE)
Stream LTL rates via Server-Sent Events. Rates arrive as they are returned from each carrier, rather than waiting for all carriers to respond. The request body is the same as POST /rates.
POST
/
rates
/
ltl
/
stream
Stream LTL rates (SSE)
curl --request POST \
--url https://api.shippeek.dev/rates/ltl/stream \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"originPostalCode": "<string>",
"destPostalCode": "<string>",
"items": [
{
"weight": 123,
"length": 123,
"width": 123,
"height": 123,
"quantity": 1,
"description": "<string>",
"package": "<string>",
"hazardous": false,
"nmfc": "<string>"
}
]
}
'import requests
url = "https://api.shippeek.dev/rates/ltl/stream"
payload = {
"originPostalCode": "<string>",
"destPostalCode": "<string>",
"items": [
{
"weight": 123,
"length": 123,
"width": 123,
"height": 123,
"quantity": 1,
"description": "<string>",
"package": "<string>",
"hazardous": False,
"nmfc": "<string>"
}
]
}
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({
originPostalCode: '<string>',
destPostalCode: '<string>',
items: [
{
weight: 123,
length: 123,
width: 123,
height: 123,
quantity: 1,
description: '<string>',
package: '<string>',
hazardous: false,
nmfc: '<string>'
}
]
})
};
fetch('https://api.shippeek.dev/rates/ltl/stream', 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.shippeek.dev/rates/ltl/stream",
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([
'originPostalCode' => '<string>',
'destPostalCode' => '<string>',
'items' => [
[
'weight' => 123,
'length' => 123,
'width' => 123,
'height' => 123,
'quantity' => 1,
'description' => '<string>',
'package' => '<string>',
'hazardous' => false,
'nmfc' => '<string>'
]
]
]),
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.shippeek.dev/rates/ltl/stream"
payload := strings.NewReader("{\n \"originPostalCode\": \"<string>\",\n \"destPostalCode\": \"<string>\",\n \"items\": [\n {\n \"weight\": 123,\n \"length\": 123,\n \"width\": 123,\n \"height\": 123,\n \"quantity\": 1,\n \"description\": \"<string>\",\n \"package\": \"<string>\",\n \"hazardous\": false,\n \"nmfc\": \"<string>\"\n }\n ]\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.shippeek.dev/rates/ltl/stream")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"originPostalCode\": \"<string>\",\n \"destPostalCode\": \"<string>\",\n \"items\": [\n {\n \"weight\": 123,\n \"length\": 123,\n \"width\": 123,\n \"height\": 123,\n \"quantity\": 1,\n \"description\": \"<string>\",\n \"package\": \"<string>\",\n \"hazardous\": false,\n \"nmfc\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.shippeek.dev/rates/ltl/stream")
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 \"originPostalCode\": \"<string>\",\n \"destPostalCode\": \"<string>\",\n \"items\": [\n {\n \"weight\": 123,\n \"length\": 123,\n \"width\": 123,\n \"height\": 123,\n \"quantity\": 1,\n \"description\": \"<string>\",\n \"package\": \"<string>\",\n \"hazardous\": false,\n \"nmfc\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body"<string>"Authorizations
Your ShipPeek API token in the format client_id.client_secret.
Body
application/json
Response
200 - text/event-stream
SSE stream of rate events
Each event is a JSON-encoded rate object
⌘I