Get a shipping label
curl --request GET \
--url https://api.cubbo.com/v1/shipping-labels/{shipping_label_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.cubbo.com/v1/shipping-labels/{shipping_label_id}"
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/shipping-labels/{shipping_label_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.cubbo.com/v1/shipping-labels/{shipping_label_id}",
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/shipping-labels/{shipping_label_id}"
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/shipping-labels/{shipping_label_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cubbo.com/v1/shipping-labels/{shipping_label_id}")
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": 98765,
"order_id": 55501,
"billing_file": null,
"shipping_number": "TRACK0000001",
"label_file": {
"path": "/rails/active_storage/blobs/redirect/<blob-key>/label.pdf",
"url": "https://api.cubbo.com/rails/active_storage/blobs/redirect/<blob-key>/label.pdf",
"filename": "label.pdf",
"byte_size": 48213,
"content_type": "application/pdf"
},
"label_type": "Shipping",
"tracking_url": "https://carrier.example.com/track/TRACK0000001",
"cubbo_tracking_url": "https://tracking.example.com/orders/<encoded-order-id>"
}
Shipping labels
Get a shipping label
Returns one shipping label of an order your credential can access, including the label file, the carrier tracking number and the tracking URLs. Return labels that travel inside the box for the recipient’s later use are not shipping labels of the order and are not served by this endpoint (the response is the same as for an unknown id).
GET
/
shipping-labels
/
{shipping_label_id}
Get a shipping label
curl --request GET \
--url https://api.cubbo.com/v1/shipping-labels/{shipping_label_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.cubbo.com/v1/shipping-labels/{shipping_label_id}"
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/shipping-labels/{shipping_label_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.cubbo.com/v1/shipping-labels/{shipping_label_id}",
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/shipping-labels/{shipping_label_id}"
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/shipping-labels/{shipping_label_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cubbo.com/v1/shipping-labels/{shipping_label_id}")
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": 98765,
"order_id": 55501,
"billing_file": null,
"shipping_number": "TRACK0000001",
"label_file": {
"path": "/rails/active_storage/blobs/redirect/<blob-key>/label.pdf",
"url": "https://api.cubbo.com/rails/active_storage/blobs/redirect/<blob-key>/label.pdf",
"filename": "label.pdf",
"byte_size": 48213,
"content_type": "application/pdf"
},
"label_type": "Shipping",
"tracking_url": "https://carrier.example.com/track/TRACK0000001",
"cubbo_tracking_url": "https://tracking.example.com/orders/<encoded-order-id>"
}
Authorizations
Path Parameters
Response
The shipping label
A carrier label (guide) generated for an order, as returned by GET /orders/{order_id}/shipping-labels.