// Persist one key per intended booking if you need safe network-error recovery.
async function bookShipment(url, token, input, idempotencyKey, signal) {
const headers = { Authorization: 'Bearer ' + token, 'Content-Type': 'application/json' };
if (idempotencyKey) headers['Idempotency-Key'] = idempotencyKey;
let response = await fetch(url, { method: 'POST', headers, body: JSON.stringify(input), signal });
let body = await response.json();
// Non-2xx can still contain a persisted shipment, e.g. 424 or a booking timeout.
if (!response.ok) throw Object.assign(new Error(body.message ?? 'Booking failed'), { status: response.status, body });
if (response.status === 202) {
const location = response.headers.get('Location');
if (!location) throw new Error('Missing shipment Location');
while (['queued', 'booking', 'cancelling'].includes(body.data.state)) {
await new Promise(resolve => setTimeout(resolve, 1000 * Number(response.headers.get('Retry-After') ?? 5)));
response = await fetch(location, { headers: { Authorization: 'Bearer ' + token }, signal });
body = await response.json();
if (!response.ok) throw Object.assign(new Error(body.message ?? 'Polling failed'), { status: response.status, body });
}
}
if (body.data.state === 'failed') throw Object.assign(new Error('Booking failed'), { shipment: body.data });
return body.data;
}curl --request POST \
--url https://api.smartsend.io/v2/teams/{teamUuid}/shipments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"invoice_number": "INV-1042",
"reference": "ORDER-1042",
"identifier": "shop-order-1042",
"uri": "https://shop.example.com/admin/orders/1042",
"delivery": {
"service_code": "postnord_agent",
"pickup_point": {
"country": "DK",
"code": "12345"
},
"addons": [
{
"code": "SIGNATURE"
}
],
"delivery_window": {
"earliest": "2026-09-17T08:00:00Z",
"latest": "2026-09-17T16:00:00Z"
},
"incoterm": "DAP"
},
"parties": {
"merchant": {
"reference": "SHOP-DK",
"identifier": "shop-1",
"uri": "https://shop.example.com",
"address": {
"address_lines": [
"Eksempelgade 1"
],
"postal_code": "2100",
"city": "Copenhagen",
"country": "DK",
"administrative_area": "84"
},
"contact": {
"name_lines": [
"Example Shop"
],
"company": "Example Shop ApS",
"email": "shop@example.com",
"phone": "+4587654321"
},
"identifiers": {
"vat": "DK12345678",
"eori": "DK12345678",
"gb_eori": "GB123456789000",
"tax_id": "12345678",
"voec": "2000123"
}
},
"customer": {
"reference": "CUSTOMER-2048",
"identifier": "customer-2048",
"uri": "https://shop.example.com/admin/customers/2048",
"address": {
"address_lines": [
"Eksempelvej 10"
],
"postal_code": "8000",
"city": "Aarhus C",
"country": "DK",
"administrative_area": "82"
},
"contact": {
"name_lines": [
"Example Customer"
],
"company": "Example Design ApS",
"email": "customer@example.com",
"phone": "+4512345678"
},
"identifiers": {
"vat": "DK87654321",
"eori": "DK87654321",
"gb_eori": "GB987654321000",
"tax_id": "87654321",
"voec": "2000456"
}
}
},
"parcels": [
{
"reference": "ORDER-1042-1",
"identifier": "shop-parcel-1",
"freetext": "Gift wrapped; keep dry.",
"gross_weight": {
"value": 1500,
"unit": "g"
},
"length": {
"value": 30,
"unit": "cm"
},
"width": {
"value": 20,
"unit": "cm"
},
"height": {
"value": 15,
"unit": "cm"
},
"total_net_amount": {
"value": 20000,
"currency": "DKK"
},
"tax_amount": {
"value": 5000,
"currency": "DKK"
},
"duty_amount": {
"value": 0,
"currency": "DKK"
},
"items": [
{
"reference": "TSHIRT-BLUE-M",
"identifier": "order-line-9001",
"uri": "https://shop.example.com/products/blue-t-shirt",
"image_url": "https://shop.example.com/images/blue-t-shirt.jpg",
"sku": "TSHIRT-BLUE-M",
"location": "A1-04",
"name": "Blue cotton T-shirt, size M",
"description": "Two blue cotton T-shirts",
"tariff_code": "610910",
"country_of_origin": "DK",
"quantity": 2,
"total_net_amount": {
"value": 20000,
"currency": "DKK"
},
"tax_amount": {
"value": 5000,
"currency": "DKK"
},
"duty_amount": {
"value": 0,
"currency": "DKK"
},
"net_weight": {
"value": 1000,
"unit": "g"
},
"cost_amount": {
"value": 10000,
"currency": "DKK"
}
}
]
}
],
"total_net_amount": {
"value": 20000,
"currency": "DKK"
},
"tax_amount": {
"value": 5000,
"currency": "DKK"
},
"duty_amount": {
"value": 0,
"currency": "DKK"
},
"shipping_net_amount": {
"value": 3920,
"currency": "DKK"
},
"shipping_tax_amount": {
"value": 980,
"currency": "DKK"
},
"content_type": "commercial_goods"
}
'import requests
url = "https://api.smartsend.io/v2/teams/{teamUuid}/shipments"
payload = {
"invoice_number": "INV-1042",
"reference": "ORDER-1042",
"identifier": "shop-order-1042",
"uri": "https://shop.example.com/admin/orders/1042",
"delivery": {
"service_code": "postnord_agent",
"pickup_point": {
"country": "DK",
"code": "12345"
},
"addons": [{ "code": "SIGNATURE" }],
"delivery_window": {
"earliest": "2026-09-17T08:00:00Z",
"latest": "2026-09-17T16:00:00Z"
},
"incoterm": "DAP"
},
"parties": {
"merchant": {
"reference": "SHOP-DK",
"identifier": "shop-1",
"uri": "https://shop.example.com",
"address": {
"address_lines": ["Eksempelgade 1"],
"postal_code": "2100",
"city": "Copenhagen",
"country": "DK",
"administrative_area": "84"
},
"contact": {
"name_lines": ["Example Shop"],
"company": "Example Shop ApS",
"email": "shop@example.com",
"phone": "+4587654321"
},
"identifiers": {
"vat": "DK12345678",
"eori": "DK12345678",
"gb_eori": "GB123456789000",
"tax_id": "12345678",
"voec": "2000123"
}
},
"customer": {
"reference": "CUSTOMER-2048",
"identifier": "customer-2048",
"uri": "https://shop.example.com/admin/customers/2048",
"address": {
"address_lines": ["Eksempelvej 10"],
"postal_code": "8000",
"city": "Aarhus C",
"country": "DK",
"administrative_area": "82"
},
"contact": {
"name_lines": ["Example Customer"],
"company": "Example Design ApS",
"email": "customer@example.com",
"phone": "+4512345678"
},
"identifiers": {
"vat": "DK87654321",
"eori": "DK87654321",
"gb_eori": "GB987654321000",
"tax_id": "87654321",
"voec": "2000456"
}
}
},
"parcels": [
{
"reference": "ORDER-1042-1",
"identifier": "shop-parcel-1",
"freetext": "Gift wrapped; keep dry.",
"gross_weight": {
"value": 1500,
"unit": "g"
},
"length": {
"value": 30,
"unit": "cm"
},
"width": {
"value": 20,
"unit": "cm"
},
"height": {
"value": 15,
"unit": "cm"
},
"total_net_amount": {
"value": 20000,
"currency": "DKK"
},
"tax_amount": {
"value": 5000,
"currency": "DKK"
},
"duty_amount": {
"value": 0,
"currency": "DKK"
},
"items": [
{
"reference": "TSHIRT-BLUE-M",
"identifier": "order-line-9001",
"uri": "https://shop.example.com/products/blue-t-shirt",
"image_url": "https://shop.example.com/images/blue-t-shirt.jpg",
"sku": "TSHIRT-BLUE-M",
"location": "A1-04",
"name": "Blue cotton T-shirt, size M",
"description": "Two blue cotton T-shirts",
"tariff_code": "610910",
"country_of_origin": "DK",
"quantity": 2,
"total_net_amount": {
"value": 20000,
"currency": "DKK"
},
"tax_amount": {
"value": 5000,
"currency": "DKK"
},
"duty_amount": {
"value": 0,
"currency": "DKK"
},
"net_weight": {
"value": 1000,
"unit": "g"
},
"cost_amount": {
"value": 10000,
"currency": "DKK"
}
}
]
}
],
"total_net_amount": {
"value": 20000,
"currency": "DKK"
},
"tax_amount": {
"value": 5000,
"currency": "DKK"
},
"duty_amount": {
"value": 0,
"currency": "DKK"
},
"shipping_net_amount": {
"value": 3920,
"currency": "DKK"
},
"shipping_tax_amount": {
"value": 980,
"currency": "DKK"
},
"content_type": "commercial_goods"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.smartsend.io/v2/teams/{teamUuid}/shipments",
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([
'invoice_number' => 'INV-1042',
'reference' => 'ORDER-1042',
'identifier' => 'shop-order-1042',
'uri' => 'https://shop.example.com/admin/orders/1042',
'delivery' => [
'service_code' => 'postnord_agent',
'pickup_point' => [
'country' => 'DK',
'code' => '12345'
],
'addons' => [
[
'code' => 'SIGNATURE'
]
],
'delivery_window' => [
'earliest' => '2026-09-17T08:00:00Z',
'latest' => '2026-09-17T16:00:00Z'
],
'incoterm' => 'DAP'
],
'parties' => [
'merchant' => [
'reference' => 'SHOP-DK',
'identifier' => 'shop-1',
'uri' => 'https://shop.example.com',
'address' => [
'address_lines' => [
'Eksempelgade 1'
],
'postal_code' => '2100',
'city' => 'Copenhagen',
'country' => 'DK',
'administrative_area' => '84'
],
'contact' => [
'name_lines' => [
'Example Shop'
],
'company' => 'Example Shop ApS',
'email' => 'shop@example.com',
'phone' => '+4587654321'
],
'identifiers' => [
'vat' => 'DK12345678',
'eori' => 'DK12345678',
'gb_eori' => 'GB123456789000',
'tax_id' => '12345678',
'voec' => '2000123'
]
],
'customer' => [
'reference' => 'CUSTOMER-2048',
'identifier' => 'customer-2048',
'uri' => 'https://shop.example.com/admin/customers/2048',
'address' => [
'address_lines' => [
'Eksempelvej 10'
],
'postal_code' => '8000',
'city' => 'Aarhus C',
'country' => 'DK',
'administrative_area' => '82'
],
'contact' => [
'name_lines' => [
'Example Customer'
],
'company' => 'Example Design ApS',
'email' => 'customer@example.com',
'phone' => '+4512345678'
],
'identifiers' => [
'vat' => 'DK87654321',
'eori' => 'DK87654321',
'gb_eori' => 'GB987654321000',
'tax_id' => '87654321',
'voec' => '2000456'
]
]
],
'parcels' => [
[
'reference' => 'ORDER-1042-1',
'identifier' => 'shop-parcel-1',
'freetext' => 'Gift wrapped; keep dry.',
'gross_weight' => [
'value' => 1500,
'unit' => 'g'
],
'length' => [
'value' => 30,
'unit' => 'cm'
],
'width' => [
'value' => 20,
'unit' => 'cm'
],
'height' => [
'value' => 15,
'unit' => 'cm'
],
'total_net_amount' => [
'value' => 20000,
'currency' => 'DKK'
],
'tax_amount' => [
'value' => 5000,
'currency' => 'DKK'
],
'duty_amount' => [
'value' => 0,
'currency' => 'DKK'
],
'items' => [
[
'reference' => 'TSHIRT-BLUE-M',
'identifier' => 'order-line-9001',
'uri' => 'https://shop.example.com/products/blue-t-shirt',
'image_url' => 'https://shop.example.com/images/blue-t-shirt.jpg',
'sku' => 'TSHIRT-BLUE-M',
'location' => 'A1-04',
'name' => 'Blue cotton T-shirt, size M',
'description' => 'Two blue cotton T-shirts',
'tariff_code' => '610910',
'country_of_origin' => 'DK',
'quantity' => 2,
'total_net_amount' => [
'value' => 20000,
'currency' => 'DKK'
],
'tax_amount' => [
'value' => 5000,
'currency' => 'DKK'
],
'duty_amount' => [
'value' => 0,
'currency' => 'DKK'
],
'net_weight' => [
'value' => 1000,
'unit' => 'g'
],
'cost_amount' => [
'value' => 10000,
'currency' => 'DKK'
]
]
]
]
],
'total_net_amount' => [
'value' => 20000,
'currency' => 'DKK'
],
'tax_amount' => [
'value' => 5000,
'currency' => 'DKK'
],
'duty_amount' => [
'value' => 0,
'currency' => 'DKK'
],
'shipping_net_amount' => [
'value' => 3920,
'currency' => 'DKK'
],
'shipping_tax_amount' => [
'value' => 980,
'currency' => 'DKK'
],
'content_type' => 'commercial_goods'
]),
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.smartsend.io/v2/teams/{teamUuid}/shipments"
payload := strings.NewReader("{\n \"invoice_number\": \"INV-1042\",\n \"reference\": \"ORDER-1042\",\n \"identifier\": \"shop-order-1042\",\n \"uri\": \"https://shop.example.com/admin/orders/1042\",\n \"delivery\": {\n \"service_code\": \"postnord_agent\",\n \"pickup_point\": {\n \"country\": \"DK\",\n \"code\": \"12345\"\n },\n \"addons\": [\n {\n \"code\": \"SIGNATURE\"\n }\n ],\n \"delivery_window\": {\n \"earliest\": \"2026-09-17T08:00:00Z\",\n \"latest\": \"2026-09-17T16:00:00Z\"\n },\n \"incoterm\": \"DAP\"\n },\n \"parties\": {\n \"merchant\": {\n \"reference\": \"SHOP-DK\",\n \"identifier\": \"shop-1\",\n \"uri\": \"https://shop.example.com\",\n \"address\": {\n \"address_lines\": [\n \"Eksempelgade 1\"\n ],\n \"postal_code\": \"2100\",\n \"city\": \"Copenhagen\",\n \"country\": \"DK\",\n \"administrative_area\": \"84\"\n },\n \"contact\": {\n \"name_lines\": [\n \"Example Shop\"\n ],\n \"company\": \"Example Shop ApS\",\n \"email\": \"shop@example.com\",\n \"phone\": \"+4587654321\"\n },\n \"identifiers\": {\n \"vat\": \"DK12345678\",\n \"eori\": \"DK12345678\",\n \"gb_eori\": \"GB123456789000\",\n \"tax_id\": \"12345678\",\n \"voec\": \"2000123\"\n }\n },\n \"customer\": {\n \"reference\": \"CUSTOMER-2048\",\n \"identifier\": \"customer-2048\",\n \"uri\": \"https://shop.example.com/admin/customers/2048\",\n \"address\": {\n \"address_lines\": [\n \"Eksempelvej 10\"\n ],\n \"postal_code\": \"8000\",\n \"city\": \"Aarhus C\",\n \"country\": \"DK\",\n \"administrative_area\": \"82\"\n },\n \"contact\": {\n \"name_lines\": [\n \"Example Customer\"\n ],\n \"company\": \"Example Design ApS\",\n \"email\": \"customer@example.com\",\n \"phone\": \"+4512345678\"\n },\n \"identifiers\": {\n \"vat\": \"DK87654321\",\n \"eori\": \"DK87654321\",\n \"gb_eori\": \"GB987654321000\",\n \"tax_id\": \"87654321\",\n \"voec\": \"2000456\"\n }\n }\n },\n \"parcels\": [\n {\n \"reference\": \"ORDER-1042-1\",\n \"identifier\": \"shop-parcel-1\",\n \"freetext\": \"Gift wrapped; keep dry.\",\n \"gross_weight\": {\n \"value\": 1500,\n \"unit\": \"g\"\n },\n \"length\": {\n \"value\": 30,\n \"unit\": \"cm\"\n },\n \"width\": {\n \"value\": 20,\n \"unit\": \"cm\"\n },\n \"height\": {\n \"value\": 15,\n \"unit\": \"cm\"\n },\n \"total_net_amount\": {\n \"value\": 20000,\n \"currency\": \"DKK\"\n },\n \"tax_amount\": {\n \"value\": 5000,\n \"currency\": \"DKK\"\n },\n \"duty_amount\": {\n \"value\": 0,\n \"currency\": \"DKK\"\n },\n \"items\": [\n {\n \"reference\": \"TSHIRT-BLUE-M\",\n \"identifier\": \"order-line-9001\",\n \"uri\": \"https://shop.example.com/products/blue-t-shirt\",\n \"image_url\": \"https://shop.example.com/images/blue-t-shirt.jpg\",\n \"sku\": \"TSHIRT-BLUE-M\",\n \"location\": \"A1-04\",\n \"name\": \"Blue cotton T-shirt, size M\",\n \"description\": \"Two blue cotton T-shirts\",\n \"tariff_code\": \"610910\",\n \"country_of_origin\": \"DK\",\n \"quantity\": 2,\n \"total_net_amount\": {\n \"value\": 20000,\n \"currency\": \"DKK\"\n },\n \"tax_amount\": {\n \"value\": 5000,\n \"currency\": \"DKK\"\n },\n \"duty_amount\": {\n \"value\": 0,\n \"currency\": \"DKK\"\n },\n \"net_weight\": {\n \"value\": 1000,\n \"unit\": \"g\"\n },\n \"cost_amount\": {\n \"value\": 10000,\n \"currency\": \"DKK\"\n }\n }\n ]\n }\n ],\n \"total_net_amount\": {\n \"value\": 20000,\n \"currency\": \"DKK\"\n },\n \"tax_amount\": {\n \"value\": 5000,\n \"currency\": \"DKK\"\n },\n \"duty_amount\": {\n \"value\": 0,\n \"currency\": \"DKK\"\n },\n \"shipping_net_amount\": {\n \"value\": 3920,\n \"currency\": \"DKK\"\n },\n \"shipping_tax_amount\": {\n \"value\": 980,\n \"currency\": \"DKK\"\n },\n \"content_type\": \"commercial_goods\"\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.smartsend.io/v2/teams/{teamUuid}/shipments")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"invoice_number\": \"INV-1042\",\n \"reference\": \"ORDER-1042\",\n \"identifier\": \"shop-order-1042\",\n \"uri\": \"https://shop.example.com/admin/orders/1042\",\n \"delivery\": {\n \"service_code\": \"postnord_agent\",\n \"pickup_point\": {\n \"country\": \"DK\",\n \"code\": \"12345\"\n },\n \"addons\": [\n {\n \"code\": \"SIGNATURE\"\n }\n ],\n \"delivery_window\": {\n \"earliest\": \"2026-09-17T08:00:00Z\",\n \"latest\": \"2026-09-17T16:00:00Z\"\n },\n \"incoterm\": \"DAP\"\n },\n \"parties\": {\n \"merchant\": {\n \"reference\": \"SHOP-DK\",\n \"identifier\": \"shop-1\",\n \"uri\": \"https://shop.example.com\",\n \"address\": {\n \"address_lines\": [\n \"Eksempelgade 1\"\n ],\n \"postal_code\": \"2100\",\n \"city\": \"Copenhagen\",\n \"country\": \"DK\",\n \"administrative_area\": \"84\"\n },\n \"contact\": {\n \"name_lines\": [\n \"Example Shop\"\n ],\n \"company\": \"Example Shop ApS\",\n \"email\": \"shop@example.com\",\n \"phone\": \"+4587654321\"\n },\n \"identifiers\": {\n \"vat\": \"DK12345678\",\n \"eori\": \"DK12345678\",\n \"gb_eori\": \"GB123456789000\",\n \"tax_id\": \"12345678\",\n \"voec\": \"2000123\"\n }\n },\n \"customer\": {\n \"reference\": \"CUSTOMER-2048\",\n \"identifier\": \"customer-2048\",\n \"uri\": \"https://shop.example.com/admin/customers/2048\",\n \"address\": {\n \"address_lines\": [\n \"Eksempelvej 10\"\n ],\n \"postal_code\": \"8000\",\n \"city\": \"Aarhus C\",\n \"country\": \"DK\",\n \"administrative_area\": \"82\"\n },\n \"contact\": {\n \"name_lines\": [\n \"Example Customer\"\n ],\n \"company\": \"Example Design ApS\",\n \"email\": \"customer@example.com\",\n \"phone\": \"+4512345678\"\n },\n \"identifiers\": {\n \"vat\": \"DK87654321\",\n \"eori\": \"DK87654321\",\n \"gb_eori\": \"GB987654321000\",\n \"tax_id\": \"87654321\",\n \"voec\": \"2000456\"\n }\n }\n },\n \"parcels\": [\n {\n \"reference\": \"ORDER-1042-1\",\n \"identifier\": \"shop-parcel-1\",\n \"freetext\": \"Gift wrapped; keep dry.\",\n \"gross_weight\": {\n \"value\": 1500,\n \"unit\": \"g\"\n },\n \"length\": {\n \"value\": 30,\n \"unit\": \"cm\"\n },\n \"width\": {\n \"value\": 20,\n \"unit\": \"cm\"\n },\n \"height\": {\n \"value\": 15,\n \"unit\": \"cm\"\n },\n \"total_net_amount\": {\n \"value\": 20000,\n \"currency\": \"DKK\"\n },\n \"tax_amount\": {\n \"value\": 5000,\n \"currency\": \"DKK\"\n },\n \"duty_amount\": {\n \"value\": 0,\n \"currency\": \"DKK\"\n },\n \"items\": [\n {\n \"reference\": \"TSHIRT-BLUE-M\",\n \"identifier\": \"order-line-9001\",\n \"uri\": \"https://shop.example.com/products/blue-t-shirt\",\n \"image_url\": \"https://shop.example.com/images/blue-t-shirt.jpg\",\n \"sku\": \"TSHIRT-BLUE-M\",\n \"location\": \"A1-04\",\n \"name\": \"Blue cotton T-shirt, size M\",\n \"description\": \"Two blue cotton T-shirts\",\n \"tariff_code\": \"610910\",\n \"country_of_origin\": \"DK\",\n \"quantity\": 2,\n \"total_net_amount\": {\n \"value\": 20000,\n \"currency\": \"DKK\"\n },\n \"tax_amount\": {\n \"value\": 5000,\n \"currency\": \"DKK\"\n },\n \"duty_amount\": {\n \"value\": 0,\n \"currency\": \"DKK\"\n },\n \"net_weight\": {\n \"value\": 1000,\n \"unit\": \"g\"\n },\n \"cost_amount\": {\n \"value\": 10000,\n \"currency\": \"DKK\"\n }\n }\n ]\n }\n ],\n \"total_net_amount\": {\n \"value\": 20000,\n \"currency\": \"DKK\"\n },\n \"tax_amount\": {\n \"value\": 5000,\n \"currency\": \"DKK\"\n },\n \"duty_amount\": {\n \"value\": 0,\n \"currency\": \"DKK\"\n },\n \"shipping_net_amount\": {\n \"value\": 3920,\n \"currency\": \"DKK\"\n },\n \"shipping_tax_amount\": {\n \"value\": 980,\n \"currency\": \"DKK\"\n },\n \"content_type\": \"commercial_goods\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.smartsend.io/v2/teams/{teamUuid}/shipments")
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 \"invoice_number\": \"INV-1042\",\n \"reference\": \"ORDER-1042\",\n \"identifier\": \"shop-order-1042\",\n \"uri\": \"https://shop.example.com/admin/orders/1042\",\n \"delivery\": {\n \"service_code\": \"postnord_agent\",\n \"pickup_point\": {\n \"country\": \"DK\",\n \"code\": \"12345\"\n },\n \"addons\": [\n {\n \"code\": \"SIGNATURE\"\n }\n ],\n \"delivery_window\": {\n \"earliest\": \"2026-09-17T08:00:00Z\",\n \"latest\": \"2026-09-17T16:00:00Z\"\n },\n \"incoterm\": \"DAP\"\n },\n \"parties\": {\n \"merchant\": {\n \"reference\": \"SHOP-DK\",\n \"identifier\": \"shop-1\",\n \"uri\": \"https://shop.example.com\",\n \"address\": {\n \"address_lines\": [\n \"Eksempelgade 1\"\n ],\n \"postal_code\": \"2100\",\n \"city\": \"Copenhagen\",\n \"country\": \"DK\",\n \"administrative_area\": \"84\"\n },\n \"contact\": {\n \"name_lines\": [\n \"Example Shop\"\n ],\n \"company\": \"Example Shop ApS\",\n \"email\": \"shop@example.com\",\n \"phone\": \"+4587654321\"\n },\n \"identifiers\": {\n \"vat\": \"DK12345678\",\n \"eori\": \"DK12345678\",\n \"gb_eori\": \"GB123456789000\",\n \"tax_id\": \"12345678\",\n \"voec\": \"2000123\"\n }\n },\n \"customer\": {\n \"reference\": \"CUSTOMER-2048\",\n \"identifier\": \"customer-2048\",\n \"uri\": \"https://shop.example.com/admin/customers/2048\",\n \"address\": {\n \"address_lines\": [\n \"Eksempelvej 10\"\n ],\n \"postal_code\": \"8000\",\n \"city\": \"Aarhus C\",\n \"country\": \"DK\",\n \"administrative_area\": \"82\"\n },\n \"contact\": {\n \"name_lines\": [\n \"Example Customer\"\n ],\n \"company\": \"Example Design ApS\",\n \"email\": \"customer@example.com\",\n \"phone\": \"+4512345678\"\n },\n \"identifiers\": {\n \"vat\": \"DK87654321\",\n \"eori\": \"DK87654321\",\n \"gb_eori\": \"GB987654321000\",\n \"tax_id\": \"87654321\",\n \"voec\": \"2000456\"\n }\n }\n },\n \"parcels\": [\n {\n \"reference\": \"ORDER-1042-1\",\n \"identifier\": \"shop-parcel-1\",\n \"freetext\": \"Gift wrapped; keep dry.\",\n \"gross_weight\": {\n \"value\": 1500,\n \"unit\": \"g\"\n },\n \"length\": {\n \"value\": 30,\n \"unit\": \"cm\"\n },\n \"width\": {\n \"value\": 20,\n \"unit\": \"cm\"\n },\n \"height\": {\n \"value\": 15,\n \"unit\": \"cm\"\n },\n \"total_net_amount\": {\n \"value\": 20000,\n \"currency\": \"DKK\"\n },\n \"tax_amount\": {\n \"value\": 5000,\n \"currency\": \"DKK\"\n },\n \"duty_amount\": {\n \"value\": 0,\n \"currency\": \"DKK\"\n },\n \"items\": [\n {\n \"reference\": \"TSHIRT-BLUE-M\",\n \"identifier\": \"order-line-9001\",\n \"uri\": \"https://shop.example.com/products/blue-t-shirt\",\n \"image_url\": \"https://shop.example.com/images/blue-t-shirt.jpg\",\n \"sku\": \"TSHIRT-BLUE-M\",\n \"location\": \"A1-04\",\n \"name\": \"Blue cotton T-shirt, size M\",\n \"description\": \"Two blue cotton T-shirts\",\n \"tariff_code\": \"610910\",\n \"country_of_origin\": \"DK\",\n \"quantity\": 2,\n \"total_net_amount\": {\n \"value\": 20000,\n \"currency\": \"DKK\"\n },\n \"tax_amount\": {\n \"value\": 5000,\n \"currency\": \"DKK\"\n },\n \"duty_amount\": {\n \"value\": 0,\n \"currency\": \"DKK\"\n },\n \"net_weight\": {\n \"value\": 1000,\n \"unit\": \"g\"\n },\n \"cost_amount\": {\n \"value\": 10000,\n \"currency\": \"DKK\"\n }\n }\n ]\n }\n ],\n \"total_net_amount\": {\n \"value\": 20000,\n \"currency\": \"DKK\"\n },\n \"tax_amount\": {\n \"value\": 5000,\n \"currency\": \"DKK\"\n },\n \"duty_amount\": {\n \"value\": 0,\n \"currency\": \"DKK\"\n },\n \"shipping_net_amount\": {\n \"value\": 3920,\n \"currency\": \"DKK\"\n },\n \"shipping_tax_amount\": {\n \"value\": 980,\n \"currency\": \"DKK\"\n },\n \"content_type\": \"commercial_goods\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"uuid": "22222222-2222-4222-8222-222222222222",
"state": "booked",
"invoice_number": "INV-1042",
"reference": "ORDER-1042",
"identifier": "shop-order-1042",
"uri": "https://shop.example.com/admin/orders/1042",
"delivery": {
"carrier": {
"code": "postnord",
"name": "PostNord",
"logo_url": "https://assets.example.com/carriers/postnord/logo.svg",
"icon_url": "https://assets.example.com/carriers/postnord/icon.svg"
},
"last_mile_carrier": {
"code": "postnord",
"name": "PostNord",
"logo_url": "https://assets.example.com/carriers/postnord/logo.svg",
"icon_url": "https://assets.example.com/carriers/postnord/icon.svg"
},
"service_code": "postnord_agent",
"service_name": "Service point",
"is_pickup": true,
"is_return": false,
"addons": [
{
"code": "SIGNATURE",
"name": "Signature"
}
],
"pickup_point": {
"uuid": "99999999-9999-4999-8999-999999999999",
"code": "12345",
"name": "Example Parcel Shop",
"address": {
"address_lines": [
"Eksempelvej 20"
],
"postal_code": "8000",
"city": "Aarhus C",
"country": "DK",
"administrative_area": "82"
}
},
"delivery_window": {
"earliest": "2026-09-17T08:00:00Z",
"latest": "2026-09-17T16:00:00Z"
},
"incoterm": "DAP"
},
"parties": {
"merchant": {
"reference": "SHOP-DK",
"identifier": "shop-1",
"uri": "https://shop.example.com",
"address": {
"address_lines": [
"Eksempelgade 1"
],
"postal_code": "2100",
"city": "Copenhagen",
"country": "DK",
"administrative_area": "84"
},
"contact": {
"name_lines": [
"Example Shop"
],
"company": "Example Shop ApS",
"email": "shop@example.com",
"phone": "+4587654321"
},
"identifiers": {
"vat": "DK12345678",
"eori": "DK12345678",
"gb_eori": "GB123456789000",
"tax_id": "12345678",
"voec": "2000123"
}
},
"customer": {
"reference": "CUSTOMER-2048",
"identifier": "customer-2048",
"uri": "https://shop.example.com/admin/customers/2048",
"address": {
"address_lines": [
"Eksempelvej 10"
],
"postal_code": "8000",
"city": "Aarhus C",
"country": "DK",
"administrative_area": "82"
},
"contact": {
"name_lines": [
"Example Customer"
],
"company": "Example Design ApS",
"email": "customer@example.com",
"phone": "+4512345678"
},
"identifiers": {
"vat": "DK87654321",
"eori": "DK87654321",
"gb_eori": "GB987654321000",
"tax_id": "87654321",
"voec": "2000456"
}
}
},
"parcels": [
{
"uuid": "33333333-3333-4333-8333-333333333333",
"reference": "ORDER-1042-1",
"identifier": "shop-parcel-1",
"freetext": "Gift wrapped; keep dry.",
"gross_weight": {
"value": 1500,
"unit": "g"
},
"length": {
"value": 30,
"unit": "cm"
},
"width": {
"value": 20,
"unit": "cm"
},
"height": {
"value": 15,
"unit": "cm"
},
"total_net_amount": {
"value": 20000,
"currency": "DKK"
},
"tax_amount": {
"value": 5000,
"currency": "DKK"
},
"duty_amount": {
"value": 0,
"currency": "DKK"
},
"items": [
{
"reference": "TSHIRT-BLUE-M",
"identifier": "order-line-9001",
"uri": "https://shop.example.com/products/blue-t-shirt",
"image_url": "https://shop.example.com/images/blue-t-shirt.jpg",
"sku": "TSHIRT-BLUE-M",
"location": "A1-04",
"name": "Blue cotton T-shirt, size M",
"description": "Two blue cotton T-shirts",
"tariff_code": "610910",
"country_of_origin": "DK",
"quantity": 2,
"total_net_amount": {
"value": 20000,
"currency": "DKK"
},
"tax_amount": {
"value": 5000,
"currency": "DKK"
},
"duty_amount": {
"value": 0,
"currency": "DKK"
},
"net_weight": {
"value": 1000,
"unit": "g"
},
"cost_amount": {
"value": 10000,
"currency": "DKK"
},
"dangerous_goods": null
}
],
"tracking_number": "00340434161094015749",
"tracking_url": "https://track.smartsend.io/example"
}
],
"total_net_amount": {
"value": 20000,
"currency": "DKK"
},
"tax_amount": {
"value": 5000,
"currency": "DKK"
},
"duty_amount": {
"value": 0,
"currency": "DKK"
},
"shipping_net_amount": {
"value": 3920,
"currency": "DKK"
},
"shipping_tax_amount": {
"value": 980,
"currency": "DKK"
},
"content_type": "commercial_goods",
"documents": [
{
"uuid": "44444444-4444-4444-8444-444444444444",
"print_status": "queued",
"name": "Shipping label",
"filename": "ORDER-1042-label.pdf",
"types": [
"label"
],
"format": "pdf",
"mime_type": "application/pdf",
"size_bytes": 18342,
"width": {
"value": 210,
"unit": "mm"
},
"height": {
"value": 297,
"unit": "mm"
},
"page_count": 1,
"url": "https://downloads.example.com/documents/label.pdf",
"url_expires_at": "2026-09-16T10:15:02Z",
"description": "Print and attach the label.",
"created_at": "2026-09-16T10:00:02Z",
"updated_at": "2026-09-16T10:00:02Z"
}
],
"qr_codes": [
{
"url": "https://downloads.example.com/codes/ORDER-1042.png",
"url_expires_at": "2026-09-16T10:15:02Z"
}
],
"drop_off_codes": [
"PB-12345678"
],
"created_at": "2026-09-16T10:00:00Z",
"updated_at": "2026-09-16T10:00:02Z",
"booked_at": "2026-09-16T10:00:02Z",
"cancelled_at": null,
"voided_at": null
}
}Create and book shipment
Validates and books a shipment with the selected carrier service.
// Persist one key per intended booking if you need safe network-error recovery.
async function bookShipment(url, token, input, idempotencyKey, signal) {
const headers = { Authorization: 'Bearer ' + token, 'Content-Type': 'application/json' };
if (idempotencyKey) headers['Idempotency-Key'] = idempotencyKey;
let response = await fetch(url, { method: 'POST', headers, body: JSON.stringify(input), signal });
let body = await response.json();
// Non-2xx can still contain a persisted shipment, e.g. 424 or a booking timeout.
if (!response.ok) throw Object.assign(new Error(body.message ?? 'Booking failed'), { status: response.status, body });
if (response.status === 202) {
const location = response.headers.get('Location');
if (!location) throw new Error('Missing shipment Location');
while (['queued', 'booking', 'cancelling'].includes(body.data.state)) {
await new Promise(resolve => setTimeout(resolve, 1000 * Number(response.headers.get('Retry-After') ?? 5)));
response = await fetch(location, { headers: { Authorization: 'Bearer ' + token }, signal });
body = await response.json();
if (!response.ok) throw Object.assign(new Error(body.message ?? 'Polling failed'), { status: response.status, body });
}
}
if (body.data.state === 'failed') throw Object.assign(new Error('Booking failed'), { shipment: body.data });
return body.data;
}curl --request POST \
--url https://api.smartsend.io/v2/teams/{teamUuid}/shipments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"invoice_number": "INV-1042",
"reference": "ORDER-1042",
"identifier": "shop-order-1042",
"uri": "https://shop.example.com/admin/orders/1042",
"delivery": {
"service_code": "postnord_agent",
"pickup_point": {
"country": "DK",
"code": "12345"
},
"addons": [
{
"code": "SIGNATURE"
}
],
"delivery_window": {
"earliest": "2026-09-17T08:00:00Z",
"latest": "2026-09-17T16:00:00Z"
},
"incoterm": "DAP"
},
"parties": {
"merchant": {
"reference": "SHOP-DK",
"identifier": "shop-1",
"uri": "https://shop.example.com",
"address": {
"address_lines": [
"Eksempelgade 1"
],
"postal_code": "2100",
"city": "Copenhagen",
"country": "DK",
"administrative_area": "84"
},
"contact": {
"name_lines": [
"Example Shop"
],
"company": "Example Shop ApS",
"email": "shop@example.com",
"phone": "+4587654321"
},
"identifiers": {
"vat": "DK12345678",
"eori": "DK12345678",
"gb_eori": "GB123456789000",
"tax_id": "12345678",
"voec": "2000123"
}
},
"customer": {
"reference": "CUSTOMER-2048",
"identifier": "customer-2048",
"uri": "https://shop.example.com/admin/customers/2048",
"address": {
"address_lines": [
"Eksempelvej 10"
],
"postal_code": "8000",
"city": "Aarhus C",
"country": "DK",
"administrative_area": "82"
},
"contact": {
"name_lines": [
"Example Customer"
],
"company": "Example Design ApS",
"email": "customer@example.com",
"phone": "+4512345678"
},
"identifiers": {
"vat": "DK87654321",
"eori": "DK87654321",
"gb_eori": "GB987654321000",
"tax_id": "87654321",
"voec": "2000456"
}
}
},
"parcels": [
{
"reference": "ORDER-1042-1",
"identifier": "shop-parcel-1",
"freetext": "Gift wrapped; keep dry.",
"gross_weight": {
"value": 1500,
"unit": "g"
},
"length": {
"value": 30,
"unit": "cm"
},
"width": {
"value": 20,
"unit": "cm"
},
"height": {
"value": 15,
"unit": "cm"
},
"total_net_amount": {
"value": 20000,
"currency": "DKK"
},
"tax_amount": {
"value": 5000,
"currency": "DKK"
},
"duty_amount": {
"value": 0,
"currency": "DKK"
},
"items": [
{
"reference": "TSHIRT-BLUE-M",
"identifier": "order-line-9001",
"uri": "https://shop.example.com/products/blue-t-shirt",
"image_url": "https://shop.example.com/images/blue-t-shirt.jpg",
"sku": "TSHIRT-BLUE-M",
"location": "A1-04",
"name": "Blue cotton T-shirt, size M",
"description": "Two blue cotton T-shirts",
"tariff_code": "610910",
"country_of_origin": "DK",
"quantity": 2,
"total_net_amount": {
"value": 20000,
"currency": "DKK"
},
"tax_amount": {
"value": 5000,
"currency": "DKK"
},
"duty_amount": {
"value": 0,
"currency": "DKK"
},
"net_weight": {
"value": 1000,
"unit": "g"
},
"cost_amount": {
"value": 10000,
"currency": "DKK"
}
}
]
}
],
"total_net_amount": {
"value": 20000,
"currency": "DKK"
},
"tax_amount": {
"value": 5000,
"currency": "DKK"
},
"duty_amount": {
"value": 0,
"currency": "DKK"
},
"shipping_net_amount": {
"value": 3920,
"currency": "DKK"
},
"shipping_tax_amount": {
"value": 980,
"currency": "DKK"
},
"content_type": "commercial_goods"
}
'import requests
url = "https://api.smartsend.io/v2/teams/{teamUuid}/shipments"
payload = {
"invoice_number": "INV-1042",
"reference": "ORDER-1042",
"identifier": "shop-order-1042",
"uri": "https://shop.example.com/admin/orders/1042",
"delivery": {
"service_code": "postnord_agent",
"pickup_point": {
"country": "DK",
"code": "12345"
},
"addons": [{ "code": "SIGNATURE" }],
"delivery_window": {
"earliest": "2026-09-17T08:00:00Z",
"latest": "2026-09-17T16:00:00Z"
},
"incoterm": "DAP"
},
"parties": {
"merchant": {
"reference": "SHOP-DK",
"identifier": "shop-1",
"uri": "https://shop.example.com",
"address": {
"address_lines": ["Eksempelgade 1"],
"postal_code": "2100",
"city": "Copenhagen",
"country": "DK",
"administrative_area": "84"
},
"contact": {
"name_lines": ["Example Shop"],
"company": "Example Shop ApS",
"email": "shop@example.com",
"phone": "+4587654321"
},
"identifiers": {
"vat": "DK12345678",
"eori": "DK12345678",
"gb_eori": "GB123456789000",
"tax_id": "12345678",
"voec": "2000123"
}
},
"customer": {
"reference": "CUSTOMER-2048",
"identifier": "customer-2048",
"uri": "https://shop.example.com/admin/customers/2048",
"address": {
"address_lines": ["Eksempelvej 10"],
"postal_code": "8000",
"city": "Aarhus C",
"country": "DK",
"administrative_area": "82"
},
"contact": {
"name_lines": ["Example Customer"],
"company": "Example Design ApS",
"email": "customer@example.com",
"phone": "+4512345678"
},
"identifiers": {
"vat": "DK87654321",
"eori": "DK87654321",
"gb_eori": "GB987654321000",
"tax_id": "87654321",
"voec": "2000456"
}
}
},
"parcels": [
{
"reference": "ORDER-1042-1",
"identifier": "shop-parcel-1",
"freetext": "Gift wrapped; keep dry.",
"gross_weight": {
"value": 1500,
"unit": "g"
},
"length": {
"value": 30,
"unit": "cm"
},
"width": {
"value": 20,
"unit": "cm"
},
"height": {
"value": 15,
"unit": "cm"
},
"total_net_amount": {
"value": 20000,
"currency": "DKK"
},
"tax_amount": {
"value": 5000,
"currency": "DKK"
},
"duty_amount": {
"value": 0,
"currency": "DKK"
},
"items": [
{
"reference": "TSHIRT-BLUE-M",
"identifier": "order-line-9001",
"uri": "https://shop.example.com/products/blue-t-shirt",
"image_url": "https://shop.example.com/images/blue-t-shirt.jpg",
"sku": "TSHIRT-BLUE-M",
"location": "A1-04",
"name": "Blue cotton T-shirt, size M",
"description": "Two blue cotton T-shirts",
"tariff_code": "610910",
"country_of_origin": "DK",
"quantity": 2,
"total_net_amount": {
"value": 20000,
"currency": "DKK"
},
"tax_amount": {
"value": 5000,
"currency": "DKK"
},
"duty_amount": {
"value": 0,
"currency": "DKK"
},
"net_weight": {
"value": 1000,
"unit": "g"
},
"cost_amount": {
"value": 10000,
"currency": "DKK"
}
}
]
}
],
"total_net_amount": {
"value": 20000,
"currency": "DKK"
},
"tax_amount": {
"value": 5000,
"currency": "DKK"
},
"duty_amount": {
"value": 0,
"currency": "DKK"
},
"shipping_net_amount": {
"value": 3920,
"currency": "DKK"
},
"shipping_tax_amount": {
"value": 980,
"currency": "DKK"
},
"content_type": "commercial_goods"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.smartsend.io/v2/teams/{teamUuid}/shipments",
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([
'invoice_number' => 'INV-1042',
'reference' => 'ORDER-1042',
'identifier' => 'shop-order-1042',
'uri' => 'https://shop.example.com/admin/orders/1042',
'delivery' => [
'service_code' => 'postnord_agent',
'pickup_point' => [
'country' => 'DK',
'code' => '12345'
],
'addons' => [
[
'code' => 'SIGNATURE'
]
],
'delivery_window' => [
'earliest' => '2026-09-17T08:00:00Z',
'latest' => '2026-09-17T16:00:00Z'
],
'incoterm' => 'DAP'
],
'parties' => [
'merchant' => [
'reference' => 'SHOP-DK',
'identifier' => 'shop-1',
'uri' => 'https://shop.example.com',
'address' => [
'address_lines' => [
'Eksempelgade 1'
],
'postal_code' => '2100',
'city' => 'Copenhagen',
'country' => 'DK',
'administrative_area' => '84'
],
'contact' => [
'name_lines' => [
'Example Shop'
],
'company' => 'Example Shop ApS',
'email' => 'shop@example.com',
'phone' => '+4587654321'
],
'identifiers' => [
'vat' => 'DK12345678',
'eori' => 'DK12345678',
'gb_eori' => 'GB123456789000',
'tax_id' => '12345678',
'voec' => '2000123'
]
],
'customer' => [
'reference' => 'CUSTOMER-2048',
'identifier' => 'customer-2048',
'uri' => 'https://shop.example.com/admin/customers/2048',
'address' => [
'address_lines' => [
'Eksempelvej 10'
],
'postal_code' => '8000',
'city' => 'Aarhus C',
'country' => 'DK',
'administrative_area' => '82'
],
'contact' => [
'name_lines' => [
'Example Customer'
],
'company' => 'Example Design ApS',
'email' => 'customer@example.com',
'phone' => '+4512345678'
],
'identifiers' => [
'vat' => 'DK87654321',
'eori' => 'DK87654321',
'gb_eori' => 'GB987654321000',
'tax_id' => '87654321',
'voec' => '2000456'
]
]
],
'parcels' => [
[
'reference' => 'ORDER-1042-1',
'identifier' => 'shop-parcel-1',
'freetext' => 'Gift wrapped; keep dry.',
'gross_weight' => [
'value' => 1500,
'unit' => 'g'
],
'length' => [
'value' => 30,
'unit' => 'cm'
],
'width' => [
'value' => 20,
'unit' => 'cm'
],
'height' => [
'value' => 15,
'unit' => 'cm'
],
'total_net_amount' => [
'value' => 20000,
'currency' => 'DKK'
],
'tax_amount' => [
'value' => 5000,
'currency' => 'DKK'
],
'duty_amount' => [
'value' => 0,
'currency' => 'DKK'
],
'items' => [
[
'reference' => 'TSHIRT-BLUE-M',
'identifier' => 'order-line-9001',
'uri' => 'https://shop.example.com/products/blue-t-shirt',
'image_url' => 'https://shop.example.com/images/blue-t-shirt.jpg',
'sku' => 'TSHIRT-BLUE-M',
'location' => 'A1-04',
'name' => 'Blue cotton T-shirt, size M',
'description' => 'Two blue cotton T-shirts',
'tariff_code' => '610910',
'country_of_origin' => 'DK',
'quantity' => 2,
'total_net_amount' => [
'value' => 20000,
'currency' => 'DKK'
],
'tax_amount' => [
'value' => 5000,
'currency' => 'DKK'
],
'duty_amount' => [
'value' => 0,
'currency' => 'DKK'
],
'net_weight' => [
'value' => 1000,
'unit' => 'g'
],
'cost_amount' => [
'value' => 10000,
'currency' => 'DKK'
]
]
]
]
],
'total_net_amount' => [
'value' => 20000,
'currency' => 'DKK'
],
'tax_amount' => [
'value' => 5000,
'currency' => 'DKK'
],
'duty_amount' => [
'value' => 0,
'currency' => 'DKK'
],
'shipping_net_amount' => [
'value' => 3920,
'currency' => 'DKK'
],
'shipping_tax_amount' => [
'value' => 980,
'currency' => 'DKK'
],
'content_type' => 'commercial_goods'
]),
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.smartsend.io/v2/teams/{teamUuid}/shipments"
payload := strings.NewReader("{\n \"invoice_number\": \"INV-1042\",\n \"reference\": \"ORDER-1042\",\n \"identifier\": \"shop-order-1042\",\n \"uri\": \"https://shop.example.com/admin/orders/1042\",\n \"delivery\": {\n \"service_code\": \"postnord_agent\",\n \"pickup_point\": {\n \"country\": \"DK\",\n \"code\": \"12345\"\n },\n \"addons\": [\n {\n \"code\": \"SIGNATURE\"\n }\n ],\n \"delivery_window\": {\n \"earliest\": \"2026-09-17T08:00:00Z\",\n \"latest\": \"2026-09-17T16:00:00Z\"\n },\n \"incoterm\": \"DAP\"\n },\n \"parties\": {\n \"merchant\": {\n \"reference\": \"SHOP-DK\",\n \"identifier\": \"shop-1\",\n \"uri\": \"https://shop.example.com\",\n \"address\": {\n \"address_lines\": [\n \"Eksempelgade 1\"\n ],\n \"postal_code\": \"2100\",\n \"city\": \"Copenhagen\",\n \"country\": \"DK\",\n \"administrative_area\": \"84\"\n },\n \"contact\": {\n \"name_lines\": [\n \"Example Shop\"\n ],\n \"company\": \"Example Shop ApS\",\n \"email\": \"shop@example.com\",\n \"phone\": \"+4587654321\"\n },\n \"identifiers\": {\n \"vat\": \"DK12345678\",\n \"eori\": \"DK12345678\",\n \"gb_eori\": \"GB123456789000\",\n \"tax_id\": \"12345678\",\n \"voec\": \"2000123\"\n }\n },\n \"customer\": {\n \"reference\": \"CUSTOMER-2048\",\n \"identifier\": \"customer-2048\",\n \"uri\": \"https://shop.example.com/admin/customers/2048\",\n \"address\": {\n \"address_lines\": [\n \"Eksempelvej 10\"\n ],\n \"postal_code\": \"8000\",\n \"city\": \"Aarhus C\",\n \"country\": \"DK\",\n \"administrative_area\": \"82\"\n },\n \"contact\": {\n \"name_lines\": [\n \"Example Customer\"\n ],\n \"company\": \"Example Design ApS\",\n \"email\": \"customer@example.com\",\n \"phone\": \"+4512345678\"\n },\n \"identifiers\": {\n \"vat\": \"DK87654321\",\n \"eori\": \"DK87654321\",\n \"gb_eori\": \"GB987654321000\",\n \"tax_id\": \"87654321\",\n \"voec\": \"2000456\"\n }\n }\n },\n \"parcels\": [\n {\n \"reference\": \"ORDER-1042-1\",\n \"identifier\": \"shop-parcel-1\",\n \"freetext\": \"Gift wrapped; keep dry.\",\n \"gross_weight\": {\n \"value\": 1500,\n \"unit\": \"g\"\n },\n \"length\": {\n \"value\": 30,\n \"unit\": \"cm\"\n },\n \"width\": {\n \"value\": 20,\n \"unit\": \"cm\"\n },\n \"height\": {\n \"value\": 15,\n \"unit\": \"cm\"\n },\n \"total_net_amount\": {\n \"value\": 20000,\n \"currency\": \"DKK\"\n },\n \"tax_amount\": {\n \"value\": 5000,\n \"currency\": \"DKK\"\n },\n \"duty_amount\": {\n \"value\": 0,\n \"currency\": \"DKK\"\n },\n \"items\": [\n {\n \"reference\": \"TSHIRT-BLUE-M\",\n \"identifier\": \"order-line-9001\",\n \"uri\": \"https://shop.example.com/products/blue-t-shirt\",\n \"image_url\": \"https://shop.example.com/images/blue-t-shirt.jpg\",\n \"sku\": \"TSHIRT-BLUE-M\",\n \"location\": \"A1-04\",\n \"name\": \"Blue cotton T-shirt, size M\",\n \"description\": \"Two blue cotton T-shirts\",\n \"tariff_code\": \"610910\",\n \"country_of_origin\": \"DK\",\n \"quantity\": 2,\n \"total_net_amount\": {\n \"value\": 20000,\n \"currency\": \"DKK\"\n },\n \"tax_amount\": {\n \"value\": 5000,\n \"currency\": \"DKK\"\n },\n \"duty_amount\": {\n \"value\": 0,\n \"currency\": \"DKK\"\n },\n \"net_weight\": {\n \"value\": 1000,\n \"unit\": \"g\"\n },\n \"cost_amount\": {\n \"value\": 10000,\n \"currency\": \"DKK\"\n }\n }\n ]\n }\n ],\n \"total_net_amount\": {\n \"value\": 20000,\n \"currency\": \"DKK\"\n },\n \"tax_amount\": {\n \"value\": 5000,\n \"currency\": \"DKK\"\n },\n \"duty_amount\": {\n \"value\": 0,\n \"currency\": \"DKK\"\n },\n \"shipping_net_amount\": {\n \"value\": 3920,\n \"currency\": \"DKK\"\n },\n \"shipping_tax_amount\": {\n \"value\": 980,\n \"currency\": \"DKK\"\n },\n \"content_type\": \"commercial_goods\"\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.smartsend.io/v2/teams/{teamUuid}/shipments")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"invoice_number\": \"INV-1042\",\n \"reference\": \"ORDER-1042\",\n \"identifier\": \"shop-order-1042\",\n \"uri\": \"https://shop.example.com/admin/orders/1042\",\n \"delivery\": {\n \"service_code\": \"postnord_agent\",\n \"pickup_point\": {\n \"country\": \"DK\",\n \"code\": \"12345\"\n },\n \"addons\": [\n {\n \"code\": \"SIGNATURE\"\n }\n ],\n \"delivery_window\": {\n \"earliest\": \"2026-09-17T08:00:00Z\",\n \"latest\": \"2026-09-17T16:00:00Z\"\n },\n \"incoterm\": \"DAP\"\n },\n \"parties\": {\n \"merchant\": {\n \"reference\": \"SHOP-DK\",\n \"identifier\": \"shop-1\",\n \"uri\": \"https://shop.example.com\",\n \"address\": {\n \"address_lines\": [\n \"Eksempelgade 1\"\n ],\n \"postal_code\": \"2100\",\n \"city\": \"Copenhagen\",\n \"country\": \"DK\",\n \"administrative_area\": \"84\"\n },\n \"contact\": {\n \"name_lines\": [\n \"Example Shop\"\n ],\n \"company\": \"Example Shop ApS\",\n \"email\": \"shop@example.com\",\n \"phone\": \"+4587654321\"\n },\n \"identifiers\": {\n \"vat\": \"DK12345678\",\n \"eori\": \"DK12345678\",\n \"gb_eori\": \"GB123456789000\",\n \"tax_id\": \"12345678\",\n \"voec\": \"2000123\"\n }\n },\n \"customer\": {\n \"reference\": \"CUSTOMER-2048\",\n \"identifier\": \"customer-2048\",\n \"uri\": \"https://shop.example.com/admin/customers/2048\",\n \"address\": {\n \"address_lines\": [\n \"Eksempelvej 10\"\n ],\n \"postal_code\": \"8000\",\n \"city\": \"Aarhus C\",\n \"country\": \"DK\",\n \"administrative_area\": \"82\"\n },\n \"contact\": {\n \"name_lines\": [\n \"Example Customer\"\n ],\n \"company\": \"Example Design ApS\",\n \"email\": \"customer@example.com\",\n \"phone\": \"+4512345678\"\n },\n \"identifiers\": {\n \"vat\": \"DK87654321\",\n \"eori\": \"DK87654321\",\n \"gb_eori\": \"GB987654321000\",\n \"tax_id\": \"87654321\",\n \"voec\": \"2000456\"\n }\n }\n },\n \"parcels\": [\n {\n \"reference\": \"ORDER-1042-1\",\n \"identifier\": \"shop-parcel-1\",\n \"freetext\": \"Gift wrapped; keep dry.\",\n \"gross_weight\": {\n \"value\": 1500,\n \"unit\": \"g\"\n },\n \"length\": {\n \"value\": 30,\n \"unit\": \"cm\"\n },\n \"width\": {\n \"value\": 20,\n \"unit\": \"cm\"\n },\n \"height\": {\n \"value\": 15,\n \"unit\": \"cm\"\n },\n \"total_net_amount\": {\n \"value\": 20000,\n \"currency\": \"DKK\"\n },\n \"tax_amount\": {\n \"value\": 5000,\n \"currency\": \"DKK\"\n },\n \"duty_amount\": {\n \"value\": 0,\n \"currency\": \"DKK\"\n },\n \"items\": [\n {\n \"reference\": \"TSHIRT-BLUE-M\",\n \"identifier\": \"order-line-9001\",\n \"uri\": \"https://shop.example.com/products/blue-t-shirt\",\n \"image_url\": \"https://shop.example.com/images/blue-t-shirt.jpg\",\n \"sku\": \"TSHIRT-BLUE-M\",\n \"location\": \"A1-04\",\n \"name\": \"Blue cotton T-shirt, size M\",\n \"description\": \"Two blue cotton T-shirts\",\n \"tariff_code\": \"610910\",\n \"country_of_origin\": \"DK\",\n \"quantity\": 2,\n \"total_net_amount\": {\n \"value\": 20000,\n \"currency\": \"DKK\"\n },\n \"tax_amount\": {\n \"value\": 5000,\n \"currency\": \"DKK\"\n },\n \"duty_amount\": {\n \"value\": 0,\n \"currency\": \"DKK\"\n },\n \"net_weight\": {\n \"value\": 1000,\n \"unit\": \"g\"\n },\n \"cost_amount\": {\n \"value\": 10000,\n \"currency\": \"DKK\"\n }\n }\n ]\n }\n ],\n \"total_net_amount\": {\n \"value\": 20000,\n \"currency\": \"DKK\"\n },\n \"tax_amount\": {\n \"value\": 5000,\n \"currency\": \"DKK\"\n },\n \"duty_amount\": {\n \"value\": 0,\n \"currency\": \"DKK\"\n },\n \"shipping_net_amount\": {\n \"value\": 3920,\n \"currency\": \"DKK\"\n },\n \"shipping_tax_amount\": {\n \"value\": 980,\n \"currency\": \"DKK\"\n },\n \"content_type\": \"commercial_goods\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.smartsend.io/v2/teams/{teamUuid}/shipments")
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 \"invoice_number\": \"INV-1042\",\n \"reference\": \"ORDER-1042\",\n \"identifier\": \"shop-order-1042\",\n \"uri\": \"https://shop.example.com/admin/orders/1042\",\n \"delivery\": {\n \"service_code\": \"postnord_agent\",\n \"pickup_point\": {\n \"country\": \"DK\",\n \"code\": \"12345\"\n },\n \"addons\": [\n {\n \"code\": \"SIGNATURE\"\n }\n ],\n \"delivery_window\": {\n \"earliest\": \"2026-09-17T08:00:00Z\",\n \"latest\": \"2026-09-17T16:00:00Z\"\n },\n \"incoterm\": \"DAP\"\n },\n \"parties\": {\n \"merchant\": {\n \"reference\": \"SHOP-DK\",\n \"identifier\": \"shop-1\",\n \"uri\": \"https://shop.example.com\",\n \"address\": {\n \"address_lines\": [\n \"Eksempelgade 1\"\n ],\n \"postal_code\": \"2100\",\n \"city\": \"Copenhagen\",\n \"country\": \"DK\",\n \"administrative_area\": \"84\"\n },\n \"contact\": {\n \"name_lines\": [\n \"Example Shop\"\n ],\n \"company\": \"Example Shop ApS\",\n \"email\": \"shop@example.com\",\n \"phone\": \"+4587654321\"\n },\n \"identifiers\": {\n \"vat\": \"DK12345678\",\n \"eori\": \"DK12345678\",\n \"gb_eori\": \"GB123456789000\",\n \"tax_id\": \"12345678\",\n \"voec\": \"2000123\"\n }\n },\n \"customer\": {\n \"reference\": \"CUSTOMER-2048\",\n \"identifier\": \"customer-2048\",\n \"uri\": \"https://shop.example.com/admin/customers/2048\",\n \"address\": {\n \"address_lines\": [\n \"Eksempelvej 10\"\n ],\n \"postal_code\": \"8000\",\n \"city\": \"Aarhus C\",\n \"country\": \"DK\",\n \"administrative_area\": \"82\"\n },\n \"contact\": {\n \"name_lines\": [\n \"Example Customer\"\n ],\n \"company\": \"Example Design ApS\",\n \"email\": \"customer@example.com\",\n \"phone\": \"+4512345678\"\n },\n \"identifiers\": {\n \"vat\": \"DK87654321\",\n \"eori\": \"DK87654321\",\n \"gb_eori\": \"GB987654321000\",\n \"tax_id\": \"87654321\",\n \"voec\": \"2000456\"\n }\n }\n },\n \"parcels\": [\n {\n \"reference\": \"ORDER-1042-1\",\n \"identifier\": \"shop-parcel-1\",\n \"freetext\": \"Gift wrapped; keep dry.\",\n \"gross_weight\": {\n \"value\": 1500,\n \"unit\": \"g\"\n },\n \"length\": {\n \"value\": 30,\n \"unit\": \"cm\"\n },\n \"width\": {\n \"value\": 20,\n \"unit\": \"cm\"\n },\n \"height\": {\n \"value\": 15,\n \"unit\": \"cm\"\n },\n \"total_net_amount\": {\n \"value\": 20000,\n \"currency\": \"DKK\"\n },\n \"tax_amount\": {\n \"value\": 5000,\n \"currency\": \"DKK\"\n },\n \"duty_amount\": {\n \"value\": 0,\n \"currency\": \"DKK\"\n },\n \"items\": [\n {\n \"reference\": \"TSHIRT-BLUE-M\",\n \"identifier\": \"order-line-9001\",\n \"uri\": \"https://shop.example.com/products/blue-t-shirt\",\n \"image_url\": \"https://shop.example.com/images/blue-t-shirt.jpg\",\n \"sku\": \"TSHIRT-BLUE-M\",\n \"location\": \"A1-04\",\n \"name\": \"Blue cotton T-shirt, size M\",\n \"description\": \"Two blue cotton T-shirts\",\n \"tariff_code\": \"610910\",\n \"country_of_origin\": \"DK\",\n \"quantity\": 2,\n \"total_net_amount\": {\n \"value\": 20000,\n \"currency\": \"DKK\"\n },\n \"tax_amount\": {\n \"value\": 5000,\n \"currency\": \"DKK\"\n },\n \"duty_amount\": {\n \"value\": 0,\n \"currency\": \"DKK\"\n },\n \"net_weight\": {\n \"value\": 1000,\n \"unit\": \"g\"\n },\n \"cost_amount\": {\n \"value\": 10000,\n \"currency\": \"DKK\"\n }\n }\n ]\n }\n ],\n \"total_net_amount\": {\n \"value\": 20000,\n \"currency\": \"DKK\"\n },\n \"tax_amount\": {\n \"value\": 5000,\n \"currency\": \"DKK\"\n },\n \"duty_amount\": {\n \"value\": 0,\n \"currency\": \"DKK\"\n },\n \"shipping_net_amount\": {\n \"value\": 3920,\n \"currency\": \"DKK\"\n },\n \"shipping_tax_amount\": {\n \"value\": 980,\n \"currency\": \"DKK\"\n },\n \"content_type\": \"commercial_goods\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"uuid": "22222222-2222-4222-8222-222222222222",
"state": "booked",
"invoice_number": "INV-1042",
"reference": "ORDER-1042",
"identifier": "shop-order-1042",
"uri": "https://shop.example.com/admin/orders/1042",
"delivery": {
"carrier": {
"code": "postnord",
"name": "PostNord",
"logo_url": "https://assets.example.com/carriers/postnord/logo.svg",
"icon_url": "https://assets.example.com/carriers/postnord/icon.svg"
},
"last_mile_carrier": {
"code": "postnord",
"name": "PostNord",
"logo_url": "https://assets.example.com/carriers/postnord/logo.svg",
"icon_url": "https://assets.example.com/carriers/postnord/icon.svg"
},
"service_code": "postnord_agent",
"service_name": "Service point",
"is_pickup": true,
"is_return": false,
"addons": [
{
"code": "SIGNATURE",
"name": "Signature"
}
],
"pickup_point": {
"uuid": "99999999-9999-4999-8999-999999999999",
"code": "12345",
"name": "Example Parcel Shop",
"address": {
"address_lines": [
"Eksempelvej 20"
],
"postal_code": "8000",
"city": "Aarhus C",
"country": "DK",
"administrative_area": "82"
}
},
"delivery_window": {
"earliest": "2026-09-17T08:00:00Z",
"latest": "2026-09-17T16:00:00Z"
},
"incoterm": "DAP"
},
"parties": {
"merchant": {
"reference": "SHOP-DK",
"identifier": "shop-1",
"uri": "https://shop.example.com",
"address": {
"address_lines": [
"Eksempelgade 1"
],
"postal_code": "2100",
"city": "Copenhagen",
"country": "DK",
"administrative_area": "84"
},
"contact": {
"name_lines": [
"Example Shop"
],
"company": "Example Shop ApS",
"email": "shop@example.com",
"phone": "+4587654321"
},
"identifiers": {
"vat": "DK12345678",
"eori": "DK12345678",
"gb_eori": "GB123456789000",
"tax_id": "12345678",
"voec": "2000123"
}
},
"customer": {
"reference": "CUSTOMER-2048",
"identifier": "customer-2048",
"uri": "https://shop.example.com/admin/customers/2048",
"address": {
"address_lines": [
"Eksempelvej 10"
],
"postal_code": "8000",
"city": "Aarhus C",
"country": "DK",
"administrative_area": "82"
},
"contact": {
"name_lines": [
"Example Customer"
],
"company": "Example Design ApS",
"email": "customer@example.com",
"phone": "+4512345678"
},
"identifiers": {
"vat": "DK87654321",
"eori": "DK87654321",
"gb_eori": "GB987654321000",
"tax_id": "87654321",
"voec": "2000456"
}
}
},
"parcels": [
{
"uuid": "33333333-3333-4333-8333-333333333333",
"reference": "ORDER-1042-1",
"identifier": "shop-parcel-1",
"freetext": "Gift wrapped; keep dry.",
"gross_weight": {
"value": 1500,
"unit": "g"
},
"length": {
"value": 30,
"unit": "cm"
},
"width": {
"value": 20,
"unit": "cm"
},
"height": {
"value": 15,
"unit": "cm"
},
"total_net_amount": {
"value": 20000,
"currency": "DKK"
},
"tax_amount": {
"value": 5000,
"currency": "DKK"
},
"duty_amount": {
"value": 0,
"currency": "DKK"
},
"items": [
{
"reference": "TSHIRT-BLUE-M",
"identifier": "order-line-9001",
"uri": "https://shop.example.com/products/blue-t-shirt",
"image_url": "https://shop.example.com/images/blue-t-shirt.jpg",
"sku": "TSHIRT-BLUE-M",
"location": "A1-04",
"name": "Blue cotton T-shirt, size M",
"description": "Two blue cotton T-shirts",
"tariff_code": "610910",
"country_of_origin": "DK",
"quantity": 2,
"total_net_amount": {
"value": 20000,
"currency": "DKK"
},
"tax_amount": {
"value": 5000,
"currency": "DKK"
},
"duty_amount": {
"value": 0,
"currency": "DKK"
},
"net_weight": {
"value": 1000,
"unit": "g"
},
"cost_amount": {
"value": 10000,
"currency": "DKK"
},
"dangerous_goods": null
}
],
"tracking_number": "00340434161094015749",
"tracking_url": "https://track.smartsend.io/example"
}
],
"total_net_amount": {
"value": 20000,
"currency": "DKK"
},
"tax_amount": {
"value": 5000,
"currency": "DKK"
},
"duty_amount": {
"value": 0,
"currency": "DKK"
},
"shipping_net_amount": {
"value": 3920,
"currency": "DKK"
},
"shipping_tax_amount": {
"value": 980,
"currency": "DKK"
},
"content_type": "commercial_goods",
"documents": [
{
"uuid": "44444444-4444-4444-8444-444444444444",
"print_status": "queued",
"name": "Shipping label",
"filename": "ORDER-1042-label.pdf",
"types": [
"label"
],
"format": "pdf",
"mime_type": "application/pdf",
"size_bytes": 18342,
"width": {
"value": 210,
"unit": "mm"
},
"height": {
"value": 297,
"unit": "mm"
},
"page_count": 1,
"url": "https://downloads.example.com/documents/label.pdf",
"url_expires_at": "2026-09-16T10:15:02Z",
"description": "Print and attach the label.",
"created_at": "2026-09-16T10:00:02Z",
"updated_at": "2026-09-16T10:00:02Z"
}
],
"qr_codes": [
{
"url": "https://downloads.example.com/codes/ORDER-1042.png",
"url_expires_at": "2026-09-16T10:15:02Z"
}
],
"drop_off_codes": [
"PB-12345678"
],
"created_at": "2026-09-16T10:00:00Z",
"updated_at": "2026-09-16T10:00:02Z",
"booked_at": "2026-09-16T10:00:02Z",
"cancelled_at": null,
"voided_at": null
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Preferred language(s) for translatable content using BCP 47 language tags. Supports quality values (q-factors) for priority ordering. The API negotiates the best available language based on this header, the team's configured language, and available translations. If omitted, the team's default language is used.
"da-DK, da;q=0.9, en;q=0.8"
Optional client-supplied request identifier. When provided and matching the validation pattern, the value is echoed back in the Request-ID response header. Otherwise the server generates one. Use this to correlate requests between client and server when reporting issues.
1 - 64^[A-Za-z0-9._-]{1,64}$Optional, case-sensitive key for one intended action. Scope: team, HTTP method and canonical path. Retained for at least 24 hours and while processing. Same key and payload reuses the stored outcome without repeating side effects; the resource representation is current. Changed payload: 422 with an Idempotency-Key entry in errors. Concurrent duplicate: 409 with Retry-After and Location when known. Without a key there is no deduplication. Use GET at Location after 202.
16 - 128^[A-Za-z0-9._-]{16,128}$Path Parameters
Team uuid. All resources are scoped to this team.
Body
Immutable input for one logical booking. Every supplied amount includes value and currency; every supplied weight or dimension includes value and unit. Within one shipment, all non-null amounts use the same currency, all weights use the same unit, and all parcel dimensions use the same unit. Missing or invalid object fields and mixed currencies or units return 422; currency and units never fall back to team defaults. Optional fields may be omitted or null where allowed. No per-booking document/print preference overrides.
Selected delivery product and shipment-specific options. A requested delivery window must be supported by that product; an estimate from discovery is not a reservation.
Show child attributes
Show child attributes
Omit merchant to use the appropriate team address. Pickup points belong to delivery.
Show child attributes
Show child attributes
Parcels in stable input order.
1Show child attributes
Show child attributes
Customs invoice number when applicable. Use reference for the public order reference.
"INV-1001121"
Public reference, e.g. order number or SKU, which may be forwarded to the carrier or printed. Not necessarily unique.
"Order-5521"
Private integration reference, e.g. a database ID. Not used for deduplication and not forwarded to carrier labels. Not necessarily unique.
"shop-order-1042"
URI linking to the source of this shipment (webshop order URL, deep link, or any URI scheme)
"https://shop.example.com/admin/orders/1042"
Total goods value excluding tax.
Show child attributes
Show child attributes
{ "value": 15920, "currency": "DKK" }
Total goods tax.
Show child attributes
Show child attributes
{ "value": 3980, "currency": "DKK" }
Total goods duty.
Show child attributes
Show child attributes
{ "value": 5572, "currency": "DKK" }
Shipping cost excluding tax.
Show child attributes
Show child attributes
{ "value": 3920, "currency": "DKK" }
Shipping tax.
Show child attributes
Show child attributes
{ "value": 980, "currency": "DKK" }
Type of contents in the shipment
commercial_goods, returned_goods, gift, commercial_sample, documents, other Response
Shipment booked with all required documents and codes ready.
Current immutable booking input plus evolving lifecycle and results. Each shipment has one logical booking. Full event and print histories are retrieved through their own paginated endpoints. A failed document workflow may still have a carrier booking; never blindly rebook such a result. Amounts and measurements include their own currency or unit, preserved from the accepted input. All shipment, parcel and item amounts share one currency; all weights, including dangerous goods, share one unit; all parcel dimensions share one unit. Document dimensions are independent.
Show child attributes
Show child attributes
Was this page helpful?