Skip to main content
POST
/
v1
/
website
/
{team}
/
shipments
/
labels
/
combine
Combine labels for multiple shipments
curl --request POST \
  --url 'https://app.smartsend.io/api/v1/website/{team}/shipments/labels/combine?api_token=' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "shipments": [
    {
      "shipment_id": "c5540f2b-3eea-45c4-957a-9d7b53f899e7"
    }
  ]
}
'
import requests

url = "https://app.smartsend.io/api/v1/website/{team}/shipments/labels/combine?api_token="

payload = { "shipments": [{ "shipment_id": "c5540f2b-3eea-45c4-957a-9d7b53f899e7" }] }
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({shipments: [{shipment_id: 'c5540f2b-3eea-45c4-957a-9d7b53f899e7'}]})
};

fetch('https://app.smartsend.io/api/v1/website/{team}/shipments/labels/combine?api_token=', 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://app.smartsend.io/api/v1/website/{team}/shipments/labels/combine?api_token=",
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([
'shipments' => [
[
'shipment_id' => 'c5540f2b-3eea-45c4-957a-9d7b53f899e7'
]
]
]),
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://app.smartsend.io/api/v1/website/{team}/shipments/labels/combine?api_token="

payload := strings.NewReader("{\n \"shipments\": [\n {\n \"shipment_id\": \"c5540f2b-3eea-45c4-957a-9d7b53f899e7\"\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://app.smartsend.io/api/v1/website/{team}/shipments/labels/combine?api_token=")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"shipments\": [\n {\n \"shipment_id\": \"c5540f2b-3eea-45c4-957a-9d7b53f899e7\"\n }\n ]\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://app.smartsend.io/api/v1/website/{team}/shipments/labels/combine?api_token=")

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 \"shipments\": [\n {\n \"shipment_id\": \"c5540f2b-3eea-45c4-957a-9d7b53f899e7\"\n }\n ]\n}"

response = http.request(request)
puts response.read_body
{
  "data": {
    "type": "combined_label",
    "shipments": [
      {
        "shipment_id": "c5540f2b-3eea-45c4-957a-9d7b53f899e7",
        "shipment_internal_id": "870006543",
        "shipment_internal_reference": "123",
        "carrier_code": "postnord",
        "carrier_name": "PostNord",
        "parcels": [
          {
            "parcel_id": "c5540f2b-3eea-45c4-957a-9d7b53f899e7",
            "parcel_internal_id": "88654389",
            "parcel_internal_reference": "223",
            "carrier_code": "postnord",
            "carrier_name": "PostNord",
            "tracking_code": "DK123456789",
            "tracking_link": "https://smartsend.io/tracking/DK123456789"
          }
        ]
      }
    ],
    "pdf": {
      "link": "https://example.com/labels/DK123456789.pdf",
      "base_64_encoded": "<base64-encoded-pdf-here>"
    }
  }
}
{
"message": "Description of the error will be inserted here.",
"code": "ValidationException",
"id": "",
"errors": {},
"links": {}
}
{
"message": "Description of the error will be inserted here.",
"code": "ValidationException",
"id": "",
"errors": {},
"links": {}
}
{
"message": "Description of the error will be inserted here.",
"code": "ValidationException",
"id": "",
"errors": {},
"links": {}
}
{
"message": "Description of the error will be inserted here."
}

Authorizations

Authorization
string
header
required

Provide API Token as Bearer authentication

api_token
string
query
required

Query API Token

Path Parameters

team
string
required

The domain of the website making the agent lookup request

Body

application/json

Input data format

shipments
object[]
required

Response

Successful operation

data
object

Combined Label Resource