List an order's shipping labels
curl --request GET \
--url https://api.cubbo.com/v1/orders/{order_id}/shipping-labels \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.cubbo.com/v1/orders/{order_id}/shipping-labels"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.cubbo.com/v1/orders/{order_id}/shipping-labels', 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.cubbo.com/v1/orders/{order_id}/shipping-labels",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.cubbo.com/v1/orders/{order_id}/shipping-labels"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.cubbo.com/v1/orders/{order_id}/shipping-labels")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cubbo.com/v1/orders/{order_id}/shipping-labels")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"id": 4401,
"order_id": 987654,
"shipping_number": "TRK000000001",
"label_type": "Shipping",
"tracking_url": "https://carrier.example.com/track/TRK000000001",
"cubbo_tracking_url": "https://tracking.example.com/orders/abc123",
"billing_file": null,
"label_file": {
"path": "/rails/active_storage/blobs/redirect/example/label.pdf",
"url": "https://api.cubbo.com/rails/active_storage/blobs/redirect/example/label.pdf",
"filename": "label.pdf",
"byte_size": 48213,
"content_type": "application/pdf"
}
}
]Shipping labels
List an order's shipping labels
Returns the valid shipping labels (carrier guides) generated for an order, including the label PDF, the tracking number and tracking URLs. Use it to print labels or to look up tracking numbers after the order has been packed.
- Only labels that are still valid are returned; labels that were cancelled or replaced are excluded.
- The prepaid return label that travels inside the package is never included. Other return-type
labels (
Return,Return By Carrier) are included when they exist. - Returns an empty array when the order has no labels yet (for example before packing).
label_fileis{}(an empty object) when the label PDF is not available;billing_fileisnull.
GET
/
orders
/
{order_id}
/
shipping-labels
List an order's shipping labels
curl --request GET \
--url https://api.cubbo.com/v1/orders/{order_id}/shipping-labels \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.cubbo.com/v1/orders/{order_id}/shipping-labels"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.cubbo.com/v1/orders/{order_id}/shipping-labels', 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.cubbo.com/v1/orders/{order_id}/shipping-labels",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.cubbo.com/v1/orders/{order_id}/shipping-labels"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.cubbo.com/v1/orders/{order_id}/shipping-labels")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cubbo.com/v1/orders/{order_id}/shipping-labels")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"id": 4401,
"order_id": 987654,
"shipping_number": "TRK000000001",
"label_type": "Shipping",
"tracking_url": "https://carrier.example.com/track/TRK000000001",
"cubbo_tracking_url": "https://tracking.example.com/orders/abc123",
"billing_file": null,
"label_file": {
"path": "/rails/active_storage/blobs/redirect/example/label.pdf",
"url": "https://api.cubbo.com/rails/active_storage/blobs/redirect/example/label.pdf",
"filename": "label.pdf",
"byte_size": 48213,
"content_type": "application/pdf"
}
}
]Authorizations
Path Parameters
Response
Shipping labels of the order.