curl --request POST \
--url https://sandbox.api.leyyow.com/api/public/v1/shipping-quotes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"delivery_address": "12 Example Street",
"customer_name": "Ada Okafor",
"customer_email": "jsmith@example.com",
"customer_phone": "+2348012345678",
"items": [
{
"variant": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity": 2
}
],
"category": "<string>"
}
'import requests
url = "https://sandbox.api.leyyow.com/api/public/v1/shipping-quotes"
payload = {
"delivery_address": "12 Example Street",
"customer_name": "Ada Okafor",
"customer_email": "jsmith@example.com",
"customer_phone": "+2348012345678",
"items": [
{
"variant": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity": 2
}
],
"category": "<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({
delivery_address: '12 Example Street',
customer_name: 'Ada Okafor',
customer_email: 'jsmith@example.com',
customer_phone: '+2348012345678',
items: [{variant: '3c90c3cc-0d44-4b50-8888-8dd25736052a', quantity: 2}],
category: '<string>'
})
};
fetch('https://sandbox.api.leyyow.com/api/public/v1/shipping-quotes', 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://sandbox.api.leyyow.com/api/public/v1/shipping-quotes",
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([
'delivery_address' => '12 Example Street',
'customer_name' => 'Ada Okafor',
'customer_email' => 'jsmith@example.com',
'customer_phone' => '+2348012345678',
'items' => [
[
'variant' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'quantity' => 2
]
],
'category' => '<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://sandbox.api.leyyow.com/api/public/v1/shipping-quotes"
payload := strings.NewReader("{\n \"delivery_address\": \"12 Example Street\",\n \"customer_name\": \"Ada Okafor\",\n \"customer_email\": \"jsmith@example.com\",\n \"customer_phone\": \"+2348012345678\",\n \"items\": [\n {\n \"variant\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"quantity\": 2\n }\n ],\n \"category\": \"<string>\"\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://sandbox.api.leyyow.com/api/public/v1/shipping-quotes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"delivery_address\": \"12 Example Street\",\n \"customer_name\": \"Ada Okafor\",\n \"customer_email\": \"jsmith@example.com\",\n \"customer_phone\": \"+2348012345678\",\n \"items\": [\n {\n \"variant\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"quantity\": 2\n }\n ],\n \"category\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.api.leyyow.com/api/public/v1/shipping-quotes")
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 \"delivery_address\": \"12 Example Street\",\n \"customer_name\": \"Ada Okafor\",\n \"customer_email\": \"jsmith@example.com\",\n \"customer_phone\": \"+2348012345678\",\n \"items\": [\n {\n \"variant\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"quantity\": 2\n }\n ],\n \"category\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"error": null,
"message": "Request successful.",
"data": {
"request_token": "<string>",
"couriers": [
{
"courier_id": "<string>",
"courier_name": "GIG Logistics",
"courier_image": "<string>",
"service_code": "<string>",
"insurance": {
"code": "<string>",
"fee": 123
},
"discount": {
"percentage": 123,
"symbol": "<string>",
"discounted": 123
},
"service_type": "<string>",
"waybill": true,
"on_demand": true,
"is_cod_available": true,
"tracking_level": 123,
"ratings": 123,
"votes": 123,
"connected_account": true,
"rate_card_amount": 123,
"rate_card_currency": "<string>",
"pickup_eta": "<string>",
"pickup_eta_time": "<string>",
"dropoff_station": {
"name": "<string>",
"address": "<string>",
"country": "<string>",
"phone": "<string>"
},
"pickup_station": {
"name": "<string>",
"address": "<string>",
"country": "<string>",
"phone": "<string>"
},
"delivery_eta": "<string>",
"delivery_eta_time": "<string>",
"info": "<string>",
"currency": "<string>",
"vat": 123,
"total": 123,
"tracking": {
"bars": 123,
"label": "<string>"
},
"sub_total": 123,
"service_charge": 123,
"total_amount": 123
}
],
"fastest_courier": {
"courier_id": "<string>",
"courier_name": "GIG Logistics",
"courier_image": "<string>",
"service_code": "<string>",
"insurance": {
"code": "<string>",
"fee": 123
},
"discount": {
"percentage": 123,
"symbol": "<string>",
"discounted": 123
},
"service_type": "<string>",
"waybill": true,
"on_demand": true,
"is_cod_available": true,
"tracking_level": 123,
"ratings": 123,
"votes": 123,
"connected_account": true,
"rate_card_amount": 123,
"rate_card_currency": "<string>",
"pickup_eta": "<string>",
"pickup_eta_time": "<string>",
"dropoff_station": {
"name": "<string>",
"address": "<string>",
"country": "<string>",
"phone": "<string>"
},
"pickup_station": {
"name": "<string>",
"address": "<string>",
"country": "<string>",
"phone": "<string>"
},
"delivery_eta": "<string>",
"delivery_eta_time": "<string>",
"info": "<string>",
"currency": "<string>",
"vat": 123,
"total": 123,
"tracking": {
"bars": 123,
"label": "<string>"
},
"sub_total": 123,
"service_charge": 123,
"total_amount": 123
},
"cheapest_courier": {
"courier_id": "<string>",
"courier_name": "GIG Logistics",
"courier_image": "<string>",
"service_code": "<string>",
"insurance": {
"code": "<string>",
"fee": 123
},
"discount": {
"percentage": 123,
"symbol": "<string>",
"discounted": 123
},
"service_type": "<string>",
"waybill": true,
"on_demand": true,
"is_cod_available": true,
"tracking_level": 123,
"ratings": 123,
"votes": 123,
"connected_account": true,
"rate_card_amount": 123,
"rate_card_currency": "<string>",
"pickup_eta": "<string>",
"pickup_eta_time": "<string>",
"dropoff_station": {
"name": "<string>",
"address": "<string>",
"country": "<string>",
"phone": "<string>"
},
"pickup_station": {
"name": "<string>",
"address": "<string>",
"country": "<string>",
"phone": "<string>"
},
"delivery_eta": "<string>",
"delivery_eta_time": "<string>",
"info": "<string>",
"currency": "<string>",
"vat": 123,
"total": 123,
"tracking": {
"bars": 123,
"label": "<string>"
},
"sub_total": 123,
"service_charge": 123,
"total_amount": 123
},
"checkout_data": {
"ship_from": {
"name": "<string>",
"phone": "<string>",
"email": "jsmith@example.com",
"address": "<string>"
},
"ship_to": {
"name": "<string>",
"phone": "<string>",
"email": "jsmith@example.com",
"address": "<string>"
},
"currency": "NGN",
"package_amount": 123,
"package_weight": 123,
"pickup_date": "2023-12-25",
"is_invoice_required": true,
"cod_policy": "<string>"
}
}
}{
"error": "manual_delivery_option is required when delivery_method is manual.",
"message": "Order could not be created.",
"data": null
}{
"error": "Invalid or revoked API key.",
"message": "Authentication failed.",
"data": null
}{
"error": "Product not found.",
"message": "The requested resource does not exist.",
"data": null
}{
"error": "Rate limit exceeded.",
"message": "Too many requests.",
"data": null
}Request shipping quote
Prices Managed Delivery for a specific address and basket by querying ShipBubble couriers.
Returns a request_token alongside the available couriers. To use a
quote, pass that token as rate and the full chosen Courier object as
courier when creating the order.
Tokens are short-lived and bound to the store, address, items, and rates
that produced them. An expired or mismatched token fails order creation
with 410.
This endpoint calls a third party on every request and is rate limited more tightly than catalog reads.
curl --request POST \
--url https://sandbox.api.leyyow.com/api/public/v1/shipping-quotes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"delivery_address": "12 Example Street",
"customer_name": "Ada Okafor",
"customer_email": "jsmith@example.com",
"customer_phone": "+2348012345678",
"items": [
{
"variant": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity": 2
}
],
"category": "<string>"
}
'import requests
url = "https://sandbox.api.leyyow.com/api/public/v1/shipping-quotes"
payload = {
"delivery_address": "12 Example Street",
"customer_name": "Ada Okafor",
"customer_email": "jsmith@example.com",
"customer_phone": "+2348012345678",
"items": [
{
"variant": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity": 2
}
],
"category": "<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({
delivery_address: '12 Example Street',
customer_name: 'Ada Okafor',
customer_email: 'jsmith@example.com',
customer_phone: '+2348012345678',
items: [{variant: '3c90c3cc-0d44-4b50-8888-8dd25736052a', quantity: 2}],
category: '<string>'
})
};
fetch('https://sandbox.api.leyyow.com/api/public/v1/shipping-quotes', 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://sandbox.api.leyyow.com/api/public/v1/shipping-quotes",
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([
'delivery_address' => '12 Example Street',
'customer_name' => 'Ada Okafor',
'customer_email' => 'jsmith@example.com',
'customer_phone' => '+2348012345678',
'items' => [
[
'variant' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'quantity' => 2
]
],
'category' => '<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://sandbox.api.leyyow.com/api/public/v1/shipping-quotes"
payload := strings.NewReader("{\n \"delivery_address\": \"12 Example Street\",\n \"customer_name\": \"Ada Okafor\",\n \"customer_email\": \"jsmith@example.com\",\n \"customer_phone\": \"+2348012345678\",\n \"items\": [\n {\n \"variant\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"quantity\": 2\n }\n ],\n \"category\": \"<string>\"\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://sandbox.api.leyyow.com/api/public/v1/shipping-quotes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"delivery_address\": \"12 Example Street\",\n \"customer_name\": \"Ada Okafor\",\n \"customer_email\": \"jsmith@example.com\",\n \"customer_phone\": \"+2348012345678\",\n \"items\": [\n {\n \"variant\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"quantity\": 2\n }\n ],\n \"category\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.api.leyyow.com/api/public/v1/shipping-quotes")
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 \"delivery_address\": \"12 Example Street\",\n \"customer_name\": \"Ada Okafor\",\n \"customer_email\": \"jsmith@example.com\",\n \"customer_phone\": \"+2348012345678\",\n \"items\": [\n {\n \"variant\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"quantity\": 2\n }\n ],\n \"category\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"error": null,
"message": "Request successful.",
"data": {
"request_token": "<string>",
"couriers": [
{
"courier_id": "<string>",
"courier_name": "GIG Logistics",
"courier_image": "<string>",
"service_code": "<string>",
"insurance": {
"code": "<string>",
"fee": 123
},
"discount": {
"percentage": 123,
"symbol": "<string>",
"discounted": 123
},
"service_type": "<string>",
"waybill": true,
"on_demand": true,
"is_cod_available": true,
"tracking_level": 123,
"ratings": 123,
"votes": 123,
"connected_account": true,
"rate_card_amount": 123,
"rate_card_currency": "<string>",
"pickup_eta": "<string>",
"pickup_eta_time": "<string>",
"dropoff_station": {
"name": "<string>",
"address": "<string>",
"country": "<string>",
"phone": "<string>"
},
"pickup_station": {
"name": "<string>",
"address": "<string>",
"country": "<string>",
"phone": "<string>"
},
"delivery_eta": "<string>",
"delivery_eta_time": "<string>",
"info": "<string>",
"currency": "<string>",
"vat": 123,
"total": 123,
"tracking": {
"bars": 123,
"label": "<string>"
},
"sub_total": 123,
"service_charge": 123,
"total_amount": 123
}
],
"fastest_courier": {
"courier_id": "<string>",
"courier_name": "GIG Logistics",
"courier_image": "<string>",
"service_code": "<string>",
"insurance": {
"code": "<string>",
"fee": 123
},
"discount": {
"percentage": 123,
"symbol": "<string>",
"discounted": 123
},
"service_type": "<string>",
"waybill": true,
"on_demand": true,
"is_cod_available": true,
"tracking_level": 123,
"ratings": 123,
"votes": 123,
"connected_account": true,
"rate_card_amount": 123,
"rate_card_currency": "<string>",
"pickup_eta": "<string>",
"pickup_eta_time": "<string>",
"dropoff_station": {
"name": "<string>",
"address": "<string>",
"country": "<string>",
"phone": "<string>"
},
"pickup_station": {
"name": "<string>",
"address": "<string>",
"country": "<string>",
"phone": "<string>"
},
"delivery_eta": "<string>",
"delivery_eta_time": "<string>",
"info": "<string>",
"currency": "<string>",
"vat": 123,
"total": 123,
"tracking": {
"bars": 123,
"label": "<string>"
},
"sub_total": 123,
"service_charge": 123,
"total_amount": 123
},
"cheapest_courier": {
"courier_id": "<string>",
"courier_name": "GIG Logistics",
"courier_image": "<string>",
"service_code": "<string>",
"insurance": {
"code": "<string>",
"fee": 123
},
"discount": {
"percentage": 123,
"symbol": "<string>",
"discounted": 123
},
"service_type": "<string>",
"waybill": true,
"on_demand": true,
"is_cod_available": true,
"tracking_level": 123,
"ratings": 123,
"votes": 123,
"connected_account": true,
"rate_card_amount": 123,
"rate_card_currency": "<string>",
"pickup_eta": "<string>",
"pickup_eta_time": "<string>",
"dropoff_station": {
"name": "<string>",
"address": "<string>",
"country": "<string>",
"phone": "<string>"
},
"pickup_station": {
"name": "<string>",
"address": "<string>",
"country": "<string>",
"phone": "<string>"
},
"delivery_eta": "<string>",
"delivery_eta_time": "<string>",
"info": "<string>",
"currency": "<string>",
"vat": 123,
"total": 123,
"tracking": {
"bars": 123,
"label": "<string>"
},
"sub_total": 123,
"service_charge": 123,
"total_amount": 123
},
"checkout_data": {
"ship_from": {
"name": "<string>",
"phone": "<string>",
"email": "jsmith@example.com",
"address": "<string>"
},
"ship_to": {
"name": "<string>",
"phone": "<string>",
"email": "jsmith@example.com",
"address": "<string>"
},
"currency": "NGN",
"package_amount": 123,
"package_weight": 123,
"pickup_date": "2023-12-25",
"is_invoice_required": true,
"cod_policy": "<string>"
}
}
}{
"error": "manual_delivery_option is required when delivery_method is manual.",
"message": "Order could not be created.",
"data": null
}{
"error": "Invalid or revoked API key.",
"message": "Authentication failed.",
"data": null
}{
"error": "Product not found.",
"message": "The requested resource does not exist.",
"data": null
}{
"error": "Rate limit exceeded.",
"message": "Too many requests.",
"data": null
}Authorizations
Store API key created in the Leyyow suite under Settings → Public API.
Sent as Authorization: Bearer <key>.
Body
"12 Example Street"
"Lagos"
"Ada Okafor"
"+2348012345678"
1Show child attributes
Show child attributes
ShipBubble package category. Send null to use the default.