Create a shipping label for an order
curl --request POST \
--url https://api.salesive.com/api/v1/shipping/labels \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"orderId": "6640c1b2d4e5f60102030406"
}
'import requests
url = "https://api.salesive.com/api/v1/shipping/labels"
payload = { "orderId": "6640c1b2d4e5f60102030406" }
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({orderId: '6640c1b2d4e5f60102030406'})
};
fetch('https://api.salesive.com/api/v1/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.salesive.com/api/v1/shipping/labels",
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([
'orderId' => '6640c1b2d4e5f60102030406'
]),
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.salesive.com/api/v1/shipping/labels"
payload := strings.NewReader("{\n \"orderId\": \"6640c1b2d4e5f60102030406\"\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.salesive.com/api/v1/shipping/labels")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"orderId\": \"6640c1b2d4e5f60102030406\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.salesive.com/api/v1/shipping/labels")
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 \"orderId\": \"6640c1b2d4e5f60102030406\"\n}"
response = http.request(request)
puts response.read_body{
"status": 201,
"success": true,
"message": "Create a shipping label for an order",
"data": {
"_id": "6651b2c3d4e5f60102030405",
"orders": [
"6640c1b2d4e5f60102030406"
],
"carrier": "DHL Express",
"courier": {
"id": "dhl",
"name": "DHL Express",
"phone": "+2348000000000",
"email": "courier@example.com"
},
"trackingNumber": "SB12345678",
"trackingCode": "SB12345678",
"trackingUrl": "https://track.example.com/SB12345678",
"status": "confirmed",
"metadata": {
"label_details": {
"order_id": "SB12345678",
"status": "confirmed",
"tracking_url": "https://track.example.com/SB12345678"
}
},
"createdAt": "2026-06-28T09:00:00.000Z",
"updatedAt": "2026-06-28T09:05:00.000Z"
}
}{
"status": 401,
"success": false,
"message": "Authentication required",
"data": null
}{
"status": 403,
"success": false,
"message": "Insufficient scope",
"data": null
}Shipping
Create a shipping label for an order
Create a shipping label for an order. Requires the WRITE_SHIPPING scope.
POST
/
shipping
/
labels
Create a shipping label for an order
curl --request POST \
--url https://api.salesive.com/api/v1/shipping/labels \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"orderId": "6640c1b2d4e5f60102030406"
}
'import requests
url = "https://api.salesive.com/api/v1/shipping/labels"
payload = { "orderId": "6640c1b2d4e5f60102030406" }
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({orderId: '6640c1b2d4e5f60102030406'})
};
fetch('https://api.salesive.com/api/v1/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.salesive.com/api/v1/shipping/labels",
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([
'orderId' => '6640c1b2d4e5f60102030406'
]),
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.salesive.com/api/v1/shipping/labels"
payload := strings.NewReader("{\n \"orderId\": \"6640c1b2d4e5f60102030406\"\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.salesive.com/api/v1/shipping/labels")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"orderId\": \"6640c1b2d4e5f60102030406\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.salesive.com/api/v1/shipping/labels")
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 \"orderId\": \"6640c1b2d4e5f60102030406\"\n}"
response = http.request(request)
puts response.read_body{
"status": 201,
"success": true,
"message": "Create a shipping label for an order",
"data": {
"_id": "6651b2c3d4e5f60102030405",
"orders": [
"6640c1b2d4e5f60102030406"
],
"carrier": "DHL Express",
"courier": {
"id": "dhl",
"name": "DHL Express",
"phone": "+2348000000000",
"email": "courier@example.com"
},
"trackingNumber": "SB12345678",
"trackingCode": "SB12345678",
"trackingUrl": "https://track.example.com/SB12345678",
"status": "confirmed",
"metadata": {
"label_details": {
"order_id": "SB12345678",
"status": "confirmed",
"tracking_url": "https://track.example.com/SB12345678"
}
},
"createdAt": "2026-06-28T09:00:00.000Z",
"updatedAt": "2026-06-28T09:05:00.000Z"
}
}{
"status": 401,
"success": false,
"message": "Authentication required",
"data": null
}{
"status": 403,
"success": false,
"message": "Insufficient scope",
"data": null
}Generates a courier shipping label for an order’s automatic shipment via the carrier aggregator, then updates the shipment with the returned tracking number, tracking URL, courier contact details and status. Only valid for shipments whose shipping option is of type
auto; cached rates must still be valid. Requires the WRITE_SHIPPING scope.Authorizations
Installed-app access token (prefix app_), issued by the OAuth install flow. The store is bound to the token server-side — never send a shop id.
Body
application/json
ObjectId of the order whose automatic shipment should get a label.
Response
Create a shipping label for an order.
Standard Salesive response envelope. The operation-specific payload is carried in data.
HTTP status code, echoed in the body.
Whether the request succeeded.
Human-readable result message.
A shipment record. Shapes vary slightly by how the shipment was created (manual, automatic label, or ShipDay dispatch); only the most common fields are listed and extra properties may be present.
Show child attributes
Show child attributes
Was this page helpful?

