curl --request POST \
--url https://app.smartsend.io/api/v2/team/{team}/booking-batches/{batch}/shipments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": [
{
"currency": "<string>",
"weight_unit": "g",
"dimension_unit": "cm",
"invoice_number": "<string>",
"reference": "<string>",
"identifier": "<string>",
"uri": "<string>",
"delivery": {
"addons": [
{
"code": "<string>"
}
],
"carrier": "<string>",
"service": "<string>"
},
"parties": {
"receiver": {
"reference": "<string>",
"identifier": "<string>",
"uri": "<string>",
"address": {
"address_lines": [
"<string>"
],
"postal_code": "<string>",
"city": "<string>",
"country": "<string>",
"administrative_area": "<string>"
},
"contact": {
"name_lines": [
"<string>"
],
"company": "<string>",
"email": "jsmith@example.com",
"phone": "<string>"
},
"identifiers": {
"vat": "<string>",
"eori": "<string>",
"gb_eori": "<string>",
"tax_id": "<string>",
"voec": "<string>"
}
},
"pickup": {
"service_point_code": "<string>",
"reference": "<string>",
"identifier": "<string>",
"uri": "<string>"
}
},
"parcels": [
{
"reference": "<string>",
"identifier": "<string>",
"tracking_url": "<string>",
"freetext": "<string>",
"gross_weight": 1,
"length": 1,
"width": 1,
"height": 1,
"total_net_amount": 123,
"tax_amount": 123,
"duty_amount": 123,
"items": [
{
"reference": "<string>",
"identifier": "<string>",
"uri": "<string>",
"image_url": "<string>",
"sku": "<string>",
"location": "<string>",
"name": "<string>",
"description": "<string>",
"tariff_code": "<string>",
"country_of_origin": "<string>",
"quantity": 1,
"total_net_amount": 123,
"tax_amount": 123,
"duty_amount": 123,
"net_weight": 1,
"cost_amount": 123
}
]
}
],
"total_net_amount": 123,
"tax_amount": 123,
"duty_amount": 123,
"shipping_net_amount": 123,
"shipping_tax_amount": 123
}
]
}
'import requests
url = "https://app.smartsend.io/api/v2/team/{team}/booking-batches/{batch}/shipments"
payload = { "data": [
{
"currency": "<string>",
"weight_unit": "g",
"dimension_unit": "cm",
"invoice_number": "<string>",
"reference": "<string>",
"identifier": "<string>",
"uri": "<string>",
"delivery": {
"addons": [{ "code": "<string>" }],
"carrier": "<string>",
"service": "<string>"
},
"parties": {
"receiver": {
"reference": "<string>",
"identifier": "<string>",
"uri": "<string>",
"address": {
"address_lines": ["<string>"],
"postal_code": "<string>",
"city": "<string>",
"country": "<string>",
"administrative_area": "<string>"
},
"contact": {
"name_lines": ["<string>"],
"company": "<string>",
"email": "jsmith@example.com",
"phone": "<string>"
},
"identifiers": {
"vat": "<string>",
"eori": "<string>",
"gb_eori": "<string>",
"tax_id": "<string>",
"voec": "<string>"
}
},
"pickup": {
"service_point_code": "<string>",
"reference": "<string>",
"identifier": "<string>",
"uri": "<string>"
}
},
"parcels": [
{
"reference": "<string>",
"identifier": "<string>",
"tracking_url": "<string>",
"freetext": "<string>",
"gross_weight": 1,
"length": 1,
"width": 1,
"height": 1,
"total_net_amount": 123,
"tax_amount": 123,
"duty_amount": 123,
"items": [
{
"reference": "<string>",
"identifier": "<string>",
"uri": "<string>",
"image_url": "<string>",
"sku": "<string>",
"location": "<string>",
"name": "<string>",
"description": "<string>",
"tariff_code": "<string>",
"country_of_origin": "<string>",
"quantity": 1,
"total_net_amount": 123,
"tax_amount": 123,
"duty_amount": 123,
"net_weight": 1,
"cost_amount": 123
}
]
}
],
"total_net_amount": 123,
"tax_amount": 123,
"duty_amount": 123,
"shipping_net_amount": 123,
"shipping_tax_amount": 123
}
] }
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({
data: [
{
currency: '<string>',
weight_unit: 'g',
dimension_unit: 'cm',
invoice_number: '<string>',
reference: '<string>',
identifier: '<string>',
uri: '<string>',
delivery: {addons: [{code: '<string>'}], carrier: '<string>', service: '<string>'},
parties: {
receiver: {
reference: '<string>',
identifier: '<string>',
uri: '<string>',
address: {
address_lines: ['<string>'],
postal_code: '<string>',
city: '<string>',
country: '<string>',
administrative_area: '<string>'
},
contact: {
name_lines: ['<string>'],
company: '<string>',
email: 'jsmith@example.com',
phone: '<string>'
},
identifiers: {
vat: '<string>',
eori: '<string>',
gb_eori: '<string>',
tax_id: '<string>',
voec: '<string>'
}
},
pickup: {
service_point_code: '<string>',
reference: '<string>',
identifier: '<string>',
uri: '<string>'
}
},
parcels: [
{
reference: '<string>',
identifier: '<string>',
tracking_url: '<string>',
freetext: '<string>',
gross_weight: 1,
length: 1,
width: 1,
height: 1,
total_net_amount: 123,
tax_amount: 123,
duty_amount: 123,
items: [
{
reference: '<string>',
identifier: '<string>',
uri: '<string>',
image_url: '<string>',
sku: '<string>',
location: '<string>',
name: '<string>',
description: '<string>',
tariff_code: '<string>',
country_of_origin: '<string>',
quantity: 1,
total_net_amount: 123,
tax_amount: 123,
duty_amount: 123,
net_weight: 1,
cost_amount: 123
}
]
}
],
total_net_amount: 123,
tax_amount: 123,
duty_amount: 123,
shipping_net_amount: 123,
shipping_tax_amount: 123
}
]
})
};
fetch('https://app.smartsend.io/api/v2/team/{team}/booking-batches/{batch}/shipments', 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/v2/team/{team}/booking-batches/{batch}/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([
'data' => [
[
'currency' => '<string>',
'weight_unit' => 'g',
'dimension_unit' => 'cm',
'invoice_number' => '<string>',
'reference' => '<string>',
'identifier' => '<string>',
'uri' => '<string>',
'delivery' => [
'addons' => [
[
'code' => '<string>'
]
],
'carrier' => '<string>',
'service' => '<string>'
],
'parties' => [
'receiver' => [
'reference' => '<string>',
'identifier' => '<string>',
'uri' => '<string>',
'address' => [
'address_lines' => [
'<string>'
],
'postal_code' => '<string>',
'city' => '<string>',
'country' => '<string>',
'administrative_area' => '<string>'
],
'contact' => [
'name_lines' => [
'<string>'
],
'company' => '<string>',
'email' => 'jsmith@example.com',
'phone' => '<string>'
],
'identifiers' => [
'vat' => '<string>',
'eori' => '<string>',
'gb_eori' => '<string>',
'tax_id' => '<string>',
'voec' => '<string>'
]
],
'pickup' => [
'service_point_code' => '<string>',
'reference' => '<string>',
'identifier' => '<string>',
'uri' => '<string>'
]
],
'parcels' => [
[
'reference' => '<string>',
'identifier' => '<string>',
'tracking_url' => '<string>',
'freetext' => '<string>',
'gross_weight' => 1,
'length' => 1,
'width' => 1,
'height' => 1,
'total_net_amount' => 123,
'tax_amount' => 123,
'duty_amount' => 123,
'items' => [
[
'reference' => '<string>',
'identifier' => '<string>',
'uri' => '<string>',
'image_url' => '<string>',
'sku' => '<string>',
'location' => '<string>',
'name' => '<string>',
'description' => '<string>',
'tariff_code' => '<string>',
'country_of_origin' => '<string>',
'quantity' => 1,
'total_net_amount' => 123,
'tax_amount' => 123,
'duty_amount' => 123,
'net_weight' => 1,
'cost_amount' => 123
]
]
]
],
'total_net_amount' => 123,
'tax_amount' => 123,
'duty_amount' => 123,
'shipping_net_amount' => 123,
'shipping_tax_amount' => 123
]
]
]),
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/v2/team/{team}/booking-batches/{batch}/shipments"
payload := strings.NewReader("{\n \"data\": [\n {\n \"currency\": \"<string>\",\n \"weight_unit\": \"g\",\n \"dimension_unit\": \"cm\",\n \"invoice_number\": \"<string>\",\n \"reference\": \"<string>\",\n \"identifier\": \"<string>\",\n \"uri\": \"<string>\",\n \"delivery\": {\n \"addons\": [\n {\n \"code\": \"<string>\"\n }\n ],\n \"carrier\": \"<string>\",\n \"service\": \"<string>\"\n },\n \"parties\": {\n \"receiver\": {\n \"reference\": \"<string>\",\n \"identifier\": \"<string>\",\n \"uri\": \"<string>\",\n \"address\": {\n \"address_lines\": [\n \"<string>\"\n ],\n \"postal_code\": \"<string>\",\n \"city\": \"<string>\",\n \"country\": \"<string>\",\n \"administrative_area\": \"<string>\"\n },\n \"contact\": {\n \"name_lines\": [\n \"<string>\"\n ],\n \"company\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone\": \"<string>\"\n },\n \"identifiers\": {\n \"vat\": \"<string>\",\n \"eori\": \"<string>\",\n \"gb_eori\": \"<string>\",\n \"tax_id\": \"<string>\",\n \"voec\": \"<string>\"\n }\n },\n \"pickup\": {\n \"service_point_code\": \"<string>\",\n \"reference\": \"<string>\",\n \"identifier\": \"<string>\",\n \"uri\": \"<string>\"\n }\n },\n \"parcels\": [\n {\n \"reference\": \"<string>\",\n \"identifier\": \"<string>\",\n \"tracking_url\": \"<string>\",\n \"freetext\": \"<string>\",\n \"gross_weight\": 1,\n \"length\": 1,\n \"width\": 1,\n \"height\": 1,\n \"total_net_amount\": 123,\n \"tax_amount\": 123,\n \"duty_amount\": 123,\n \"items\": [\n {\n \"reference\": \"<string>\",\n \"identifier\": \"<string>\",\n \"uri\": \"<string>\",\n \"image_url\": \"<string>\",\n \"sku\": \"<string>\",\n \"location\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"tariff_code\": \"<string>\",\n \"country_of_origin\": \"<string>\",\n \"quantity\": 1,\n \"total_net_amount\": 123,\n \"tax_amount\": 123,\n \"duty_amount\": 123,\n \"net_weight\": 1,\n \"cost_amount\": 123\n }\n ]\n }\n ],\n \"total_net_amount\": 123,\n \"tax_amount\": 123,\n \"duty_amount\": 123,\n \"shipping_net_amount\": 123,\n \"shipping_tax_amount\": 123\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/v2/team/{team}/booking-batches/{batch}/shipments")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"data\": [\n {\n \"currency\": \"<string>\",\n \"weight_unit\": \"g\",\n \"dimension_unit\": \"cm\",\n \"invoice_number\": \"<string>\",\n \"reference\": \"<string>\",\n \"identifier\": \"<string>\",\n \"uri\": \"<string>\",\n \"delivery\": {\n \"addons\": [\n {\n \"code\": \"<string>\"\n }\n ],\n \"carrier\": \"<string>\",\n \"service\": \"<string>\"\n },\n \"parties\": {\n \"receiver\": {\n \"reference\": \"<string>\",\n \"identifier\": \"<string>\",\n \"uri\": \"<string>\",\n \"address\": {\n \"address_lines\": [\n \"<string>\"\n ],\n \"postal_code\": \"<string>\",\n \"city\": \"<string>\",\n \"country\": \"<string>\",\n \"administrative_area\": \"<string>\"\n },\n \"contact\": {\n \"name_lines\": [\n \"<string>\"\n ],\n \"company\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone\": \"<string>\"\n },\n \"identifiers\": {\n \"vat\": \"<string>\",\n \"eori\": \"<string>\",\n \"gb_eori\": \"<string>\",\n \"tax_id\": \"<string>\",\n \"voec\": \"<string>\"\n }\n },\n \"pickup\": {\n \"service_point_code\": \"<string>\",\n \"reference\": \"<string>\",\n \"identifier\": \"<string>\",\n \"uri\": \"<string>\"\n }\n },\n \"parcels\": [\n {\n \"reference\": \"<string>\",\n \"identifier\": \"<string>\",\n \"tracking_url\": \"<string>\",\n \"freetext\": \"<string>\",\n \"gross_weight\": 1,\n \"length\": 1,\n \"width\": 1,\n \"height\": 1,\n \"total_net_amount\": 123,\n \"tax_amount\": 123,\n \"duty_amount\": 123,\n \"items\": [\n {\n \"reference\": \"<string>\",\n \"identifier\": \"<string>\",\n \"uri\": \"<string>\",\n \"image_url\": \"<string>\",\n \"sku\": \"<string>\",\n \"location\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"tariff_code\": \"<string>\",\n \"country_of_origin\": \"<string>\",\n \"quantity\": 1,\n \"total_net_amount\": 123,\n \"tax_amount\": 123,\n \"duty_amount\": 123,\n \"net_weight\": 1,\n \"cost_amount\": 123\n }\n ]\n }\n ],\n \"total_net_amount\": 123,\n \"tax_amount\": 123,\n \"duty_amount\": 123,\n \"shipping_net_amount\": 123,\n \"shipping_tax_amount\": 123\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.smartsend.io/api/v2/team/{team}/booking-batches/{batch}/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 \"data\": [\n {\n \"currency\": \"<string>\",\n \"weight_unit\": \"g\",\n \"dimension_unit\": \"cm\",\n \"invoice_number\": \"<string>\",\n \"reference\": \"<string>\",\n \"identifier\": \"<string>\",\n \"uri\": \"<string>\",\n \"delivery\": {\n \"addons\": [\n {\n \"code\": \"<string>\"\n }\n ],\n \"carrier\": \"<string>\",\n \"service\": \"<string>\"\n },\n \"parties\": {\n \"receiver\": {\n \"reference\": \"<string>\",\n \"identifier\": \"<string>\",\n \"uri\": \"<string>\",\n \"address\": {\n \"address_lines\": [\n \"<string>\"\n ],\n \"postal_code\": \"<string>\",\n \"city\": \"<string>\",\n \"country\": \"<string>\",\n \"administrative_area\": \"<string>\"\n },\n \"contact\": {\n \"name_lines\": [\n \"<string>\"\n ],\n \"company\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone\": \"<string>\"\n },\n \"identifiers\": {\n \"vat\": \"<string>\",\n \"eori\": \"<string>\",\n \"gb_eori\": \"<string>\",\n \"tax_id\": \"<string>\",\n \"voec\": \"<string>\"\n }\n },\n \"pickup\": {\n \"service_point_code\": \"<string>\",\n \"reference\": \"<string>\",\n \"identifier\": \"<string>\",\n \"uri\": \"<string>\"\n }\n },\n \"parcels\": [\n {\n \"reference\": \"<string>\",\n \"identifier\": \"<string>\",\n \"tracking_url\": \"<string>\",\n \"freetext\": \"<string>\",\n \"gross_weight\": 1,\n \"length\": 1,\n \"width\": 1,\n \"height\": 1,\n \"total_net_amount\": 123,\n \"tax_amount\": 123,\n \"duty_amount\": 123,\n \"items\": [\n {\n \"reference\": \"<string>\",\n \"identifier\": \"<string>\",\n \"uri\": \"<string>\",\n \"image_url\": \"<string>\",\n \"sku\": \"<string>\",\n \"location\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"tariff_code\": \"<string>\",\n \"country_of_origin\": \"<string>\",\n \"quantity\": 1,\n \"total_net_amount\": 123,\n \"tax_amount\": 123,\n \"duty_amount\": 123,\n \"net_weight\": 1,\n \"cost_amount\": 123\n }\n ]\n }\n ],\n \"total_net_amount\": 123,\n \"tax_amount\": 123,\n \"duty_amount\": 123,\n \"shipping_net_amount\": 123,\n \"shipping_tax_amount\": 123\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"currency": "<string>",
"weight_unit": "g",
"dimension_unit": "cm",
"invoice_number": "<string>",
"reference": "<string>",
"identifier": "<string>",
"uri": "<string>",
"delivery": {
"carrier_code": "<string>",
"carrier_name": "<string>",
"carrier_logo_url": "<string>",
"carrier_icon_url": "<string>",
"service_code": "<string>",
"service_name": "<string>",
"is_pickup": true,
"is_return": true,
"addons": [
{
"code": "<string>",
"name": "<string>"
}
]
},
"parties": {
"receiver": {
"reference": "<string>",
"identifier": "<string>",
"uri": "<string>",
"address": {
"address_lines": [
"<string>"
],
"postal_code": "<string>",
"city": "<string>",
"country": "<string>",
"administrative_area": "<string>"
},
"contact": {
"name_lines": [
"<string>"
],
"company": "<string>",
"email": "jsmith@example.com",
"phone": "<string>"
},
"identifiers": {
"vat": "<string>",
"eori": "<string>",
"gb_eori": "<string>",
"tax_id": "<string>",
"voec": "<string>"
}
},
"pickup": {
"service_point_code": "<string>",
"company": "<string>",
"address": {
"address_lines": [
"<string>"
],
"postal_code": "<string>",
"city": "<string>",
"country": "<string>",
"administrative_area": "<string>"
},
"reference": "<string>",
"identifier": "<string>",
"uri": "<string>"
}
},
"parcels": [
{
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reference": "<string>",
"identifier": "<string>",
"tracking_code": "<string>",
"tracking_url": "<string>",
"freetext": "<string>",
"gross_weight": 1,
"length": 1,
"width": 1,
"height": 1,
"total_net_amount": 123,
"tax_amount": 123,
"duty_amount": 123,
"items": [
{
"reference": "<string>",
"identifier": "<string>",
"uri": "<string>",
"image_url": "<string>",
"sku": "<string>",
"location": "<string>",
"name": "<string>",
"description": "<string>",
"tariff_code": "<string>",
"country_of_origin": "<string>",
"quantity": 1,
"total_net_amount": 123,
"tax_amount": 123,
"duty_amount": 123,
"net_weight": 1,
"cost_amount": 123
}
],
"documents": [
{
"url": "<string>"
}
]
}
],
"total_net_amount": 123,
"tax_amount": 123,
"duty_amount": 123,
"shipping_net_amount": 123,
"shipping_tax_amount": 123,
"created_at": "2023-11-07T05:31:56Z",
"booked_at": "2023-11-07T05:31:56Z"
}
]
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Add shipments to a batch
Adds one or more shipments to an open batch. Shipments are created but NOT booked until the batch is dispatched. Returns 422 if the batch is not in ‘open’ state.
curl --request POST \
--url https://app.smartsend.io/api/v2/team/{team}/booking-batches/{batch}/shipments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": [
{
"currency": "<string>",
"weight_unit": "g",
"dimension_unit": "cm",
"invoice_number": "<string>",
"reference": "<string>",
"identifier": "<string>",
"uri": "<string>",
"delivery": {
"addons": [
{
"code": "<string>"
}
],
"carrier": "<string>",
"service": "<string>"
},
"parties": {
"receiver": {
"reference": "<string>",
"identifier": "<string>",
"uri": "<string>",
"address": {
"address_lines": [
"<string>"
],
"postal_code": "<string>",
"city": "<string>",
"country": "<string>",
"administrative_area": "<string>"
},
"contact": {
"name_lines": [
"<string>"
],
"company": "<string>",
"email": "jsmith@example.com",
"phone": "<string>"
},
"identifiers": {
"vat": "<string>",
"eori": "<string>",
"gb_eori": "<string>",
"tax_id": "<string>",
"voec": "<string>"
}
},
"pickup": {
"service_point_code": "<string>",
"reference": "<string>",
"identifier": "<string>",
"uri": "<string>"
}
},
"parcels": [
{
"reference": "<string>",
"identifier": "<string>",
"tracking_url": "<string>",
"freetext": "<string>",
"gross_weight": 1,
"length": 1,
"width": 1,
"height": 1,
"total_net_amount": 123,
"tax_amount": 123,
"duty_amount": 123,
"items": [
{
"reference": "<string>",
"identifier": "<string>",
"uri": "<string>",
"image_url": "<string>",
"sku": "<string>",
"location": "<string>",
"name": "<string>",
"description": "<string>",
"tariff_code": "<string>",
"country_of_origin": "<string>",
"quantity": 1,
"total_net_amount": 123,
"tax_amount": 123,
"duty_amount": 123,
"net_weight": 1,
"cost_amount": 123
}
]
}
],
"total_net_amount": 123,
"tax_amount": 123,
"duty_amount": 123,
"shipping_net_amount": 123,
"shipping_tax_amount": 123
}
]
}
'import requests
url = "https://app.smartsend.io/api/v2/team/{team}/booking-batches/{batch}/shipments"
payload = { "data": [
{
"currency": "<string>",
"weight_unit": "g",
"dimension_unit": "cm",
"invoice_number": "<string>",
"reference": "<string>",
"identifier": "<string>",
"uri": "<string>",
"delivery": {
"addons": [{ "code": "<string>" }],
"carrier": "<string>",
"service": "<string>"
},
"parties": {
"receiver": {
"reference": "<string>",
"identifier": "<string>",
"uri": "<string>",
"address": {
"address_lines": ["<string>"],
"postal_code": "<string>",
"city": "<string>",
"country": "<string>",
"administrative_area": "<string>"
},
"contact": {
"name_lines": ["<string>"],
"company": "<string>",
"email": "jsmith@example.com",
"phone": "<string>"
},
"identifiers": {
"vat": "<string>",
"eori": "<string>",
"gb_eori": "<string>",
"tax_id": "<string>",
"voec": "<string>"
}
},
"pickup": {
"service_point_code": "<string>",
"reference": "<string>",
"identifier": "<string>",
"uri": "<string>"
}
},
"parcels": [
{
"reference": "<string>",
"identifier": "<string>",
"tracking_url": "<string>",
"freetext": "<string>",
"gross_weight": 1,
"length": 1,
"width": 1,
"height": 1,
"total_net_amount": 123,
"tax_amount": 123,
"duty_amount": 123,
"items": [
{
"reference": "<string>",
"identifier": "<string>",
"uri": "<string>",
"image_url": "<string>",
"sku": "<string>",
"location": "<string>",
"name": "<string>",
"description": "<string>",
"tariff_code": "<string>",
"country_of_origin": "<string>",
"quantity": 1,
"total_net_amount": 123,
"tax_amount": 123,
"duty_amount": 123,
"net_weight": 1,
"cost_amount": 123
}
]
}
],
"total_net_amount": 123,
"tax_amount": 123,
"duty_amount": 123,
"shipping_net_amount": 123,
"shipping_tax_amount": 123
}
] }
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({
data: [
{
currency: '<string>',
weight_unit: 'g',
dimension_unit: 'cm',
invoice_number: '<string>',
reference: '<string>',
identifier: '<string>',
uri: '<string>',
delivery: {addons: [{code: '<string>'}], carrier: '<string>', service: '<string>'},
parties: {
receiver: {
reference: '<string>',
identifier: '<string>',
uri: '<string>',
address: {
address_lines: ['<string>'],
postal_code: '<string>',
city: '<string>',
country: '<string>',
administrative_area: '<string>'
},
contact: {
name_lines: ['<string>'],
company: '<string>',
email: 'jsmith@example.com',
phone: '<string>'
},
identifiers: {
vat: '<string>',
eori: '<string>',
gb_eori: '<string>',
tax_id: '<string>',
voec: '<string>'
}
},
pickup: {
service_point_code: '<string>',
reference: '<string>',
identifier: '<string>',
uri: '<string>'
}
},
parcels: [
{
reference: '<string>',
identifier: '<string>',
tracking_url: '<string>',
freetext: '<string>',
gross_weight: 1,
length: 1,
width: 1,
height: 1,
total_net_amount: 123,
tax_amount: 123,
duty_amount: 123,
items: [
{
reference: '<string>',
identifier: '<string>',
uri: '<string>',
image_url: '<string>',
sku: '<string>',
location: '<string>',
name: '<string>',
description: '<string>',
tariff_code: '<string>',
country_of_origin: '<string>',
quantity: 1,
total_net_amount: 123,
tax_amount: 123,
duty_amount: 123,
net_weight: 1,
cost_amount: 123
}
]
}
],
total_net_amount: 123,
tax_amount: 123,
duty_amount: 123,
shipping_net_amount: 123,
shipping_tax_amount: 123
}
]
})
};
fetch('https://app.smartsend.io/api/v2/team/{team}/booking-batches/{batch}/shipments', 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/v2/team/{team}/booking-batches/{batch}/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([
'data' => [
[
'currency' => '<string>',
'weight_unit' => 'g',
'dimension_unit' => 'cm',
'invoice_number' => '<string>',
'reference' => '<string>',
'identifier' => '<string>',
'uri' => '<string>',
'delivery' => [
'addons' => [
[
'code' => '<string>'
]
],
'carrier' => '<string>',
'service' => '<string>'
],
'parties' => [
'receiver' => [
'reference' => '<string>',
'identifier' => '<string>',
'uri' => '<string>',
'address' => [
'address_lines' => [
'<string>'
],
'postal_code' => '<string>',
'city' => '<string>',
'country' => '<string>',
'administrative_area' => '<string>'
],
'contact' => [
'name_lines' => [
'<string>'
],
'company' => '<string>',
'email' => 'jsmith@example.com',
'phone' => '<string>'
],
'identifiers' => [
'vat' => '<string>',
'eori' => '<string>',
'gb_eori' => '<string>',
'tax_id' => '<string>',
'voec' => '<string>'
]
],
'pickup' => [
'service_point_code' => '<string>',
'reference' => '<string>',
'identifier' => '<string>',
'uri' => '<string>'
]
],
'parcels' => [
[
'reference' => '<string>',
'identifier' => '<string>',
'tracking_url' => '<string>',
'freetext' => '<string>',
'gross_weight' => 1,
'length' => 1,
'width' => 1,
'height' => 1,
'total_net_amount' => 123,
'tax_amount' => 123,
'duty_amount' => 123,
'items' => [
[
'reference' => '<string>',
'identifier' => '<string>',
'uri' => '<string>',
'image_url' => '<string>',
'sku' => '<string>',
'location' => '<string>',
'name' => '<string>',
'description' => '<string>',
'tariff_code' => '<string>',
'country_of_origin' => '<string>',
'quantity' => 1,
'total_net_amount' => 123,
'tax_amount' => 123,
'duty_amount' => 123,
'net_weight' => 1,
'cost_amount' => 123
]
]
]
],
'total_net_amount' => 123,
'tax_amount' => 123,
'duty_amount' => 123,
'shipping_net_amount' => 123,
'shipping_tax_amount' => 123
]
]
]),
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/v2/team/{team}/booking-batches/{batch}/shipments"
payload := strings.NewReader("{\n \"data\": [\n {\n \"currency\": \"<string>\",\n \"weight_unit\": \"g\",\n \"dimension_unit\": \"cm\",\n \"invoice_number\": \"<string>\",\n \"reference\": \"<string>\",\n \"identifier\": \"<string>\",\n \"uri\": \"<string>\",\n \"delivery\": {\n \"addons\": [\n {\n \"code\": \"<string>\"\n }\n ],\n \"carrier\": \"<string>\",\n \"service\": \"<string>\"\n },\n \"parties\": {\n \"receiver\": {\n \"reference\": \"<string>\",\n \"identifier\": \"<string>\",\n \"uri\": \"<string>\",\n \"address\": {\n \"address_lines\": [\n \"<string>\"\n ],\n \"postal_code\": \"<string>\",\n \"city\": \"<string>\",\n \"country\": \"<string>\",\n \"administrative_area\": \"<string>\"\n },\n \"contact\": {\n \"name_lines\": [\n \"<string>\"\n ],\n \"company\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone\": \"<string>\"\n },\n \"identifiers\": {\n \"vat\": \"<string>\",\n \"eori\": \"<string>\",\n \"gb_eori\": \"<string>\",\n \"tax_id\": \"<string>\",\n \"voec\": \"<string>\"\n }\n },\n \"pickup\": {\n \"service_point_code\": \"<string>\",\n \"reference\": \"<string>\",\n \"identifier\": \"<string>\",\n \"uri\": \"<string>\"\n }\n },\n \"parcels\": [\n {\n \"reference\": \"<string>\",\n \"identifier\": \"<string>\",\n \"tracking_url\": \"<string>\",\n \"freetext\": \"<string>\",\n \"gross_weight\": 1,\n \"length\": 1,\n \"width\": 1,\n \"height\": 1,\n \"total_net_amount\": 123,\n \"tax_amount\": 123,\n \"duty_amount\": 123,\n \"items\": [\n {\n \"reference\": \"<string>\",\n \"identifier\": \"<string>\",\n \"uri\": \"<string>\",\n \"image_url\": \"<string>\",\n \"sku\": \"<string>\",\n \"location\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"tariff_code\": \"<string>\",\n \"country_of_origin\": \"<string>\",\n \"quantity\": 1,\n \"total_net_amount\": 123,\n \"tax_amount\": 123,\n \"duty_amount\": 123,\n \"net_weight\": 1,\n \"cost_amount\": 123\n }\n ]\n }\n ],\n \"total_net_amount\": 123,\n \"tax_amount\": 123,\n \"duty_amount\": 123,\n \"shipping_net_amount\": 123,\n \"shipping_tax_amount\": 123\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/v2/team/{team}/booking-batches/{batch}/shipments")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"data\": [\n {\n \"currency\": \"<string>\",\n \"weight_unit\": \"g\",\n \"dimension_unit\": \"cm\",\n \"invoice_number\": \"<string>\",\n \"reference\": \"<string>\",\n \"identifier\": \"<string>\",\n \"uri\": \"<string>\",\n \"delivery\": {\n \"addons\": [\n {\n \"code\": \"<string>\"\n }\n ],\n \"carrier\": \"<string>\",\n \"service\": \"<string>\"\n },\n \"parties\": {\n \"receiver\": {\n \"reference\": \"<string>\",\n \"identifier\": \"<string>\",\n \"uri\": \"<string>\",\n \"address\": {\n \"address_lines\": [\n \"<string>\"\n ],\n \"postal_code\": \"<string>\",\n \"city\": \"<string>\",\n \"country\": \"<string>\",\n \"administrative_area\": \"<string>\"\n },\n \"contact\": {\n \"name_lines\": [\n \"<string>\"\n ],\n \"company\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone\": \"<string>\"\n },\n \"identifiers\": {\n \"vat\": \"<string>\",\n \"eori\": \"<string>\",\n \"gb_eori\": \"<string>\",\n \"tax_id\": \"<string>\",\n \"voec\": \"<string>\"\n }\n },\n \"pickup\": {\n \"service_point_code\": \"<string>\",\n \"reference\": \"<string>\",\n \"identifier\": \"<string>\",\n \"uri\": \"<string>\"\n }\n },\n \"parcels\": [\n {\n \"reference\": \"<string>\",\n \"identifier\": \"<string>\",\n \"tracking_url\": \"<string>\",\n \"freetext\": \"<string>\",\n \"gross_weight\": 1,\n \"length\": 1,\n \"width\": 1,\n \"height\": 1,\n \"total_net_amount\": 123,\n \"tax_amount\": 123,\n \"duty_amount\": 123,\n \"items\": [\n {\n \"reference\": \"<string>\",\n \"identifier\": \"<string>\",\n \"uri\": \"<string>\",\n \"image_url\": \"<string>\",\n \"sku\": \"<string>\",\n \"location\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"tariff_code\": \"<string>\",\n \"country_of_origin\": \"<string>\",\n \"quantity\": 1,\n \"total_net_amount\": 123,\n \"tax_amount\": 123,\n \"duty_amount\": 123,\n \"net_weight\": 1,\n \"cost_amount\": 123\n }\n ]\n }\n ],\n \"total_net_amount\": 123,\n \"tax_amount\": 123,\n \"duty_amount\": 123,\n \"shipping_net_amount\": 123,\n \"shipping_tax_amount\": 123\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.smartsend.io/api/v2/team/{team}/booking-batches/{batch}/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 \"data\": [\n {\n \"currency\": \"<string>\",\n \"weight_unit\": \"g\",\n \"dimension_unit\": \"cm\",\n \"invoice_number\": \"<string>\",\n \"reference\": \"<string>\",\n \"identifier\": \"<string>\",\n \"uri\": \"<string>\",\n \"delivery\": {\n \"addons\": [\n {\n \"code\": \"<string>\"\n }\n ],\n \"carrier\": \"<string>\",\n \"service\": \"<string>\"\n },\n \"parties\": {\n \"receiver\": {\n \"reference\": \"<string>\",\n \"identifier\": \"<string>\",\n \"uri\": \"<string>\",\n \"address\": {\n \"address_lines\": [\n \"<string>\"\n ],\n \"postal_code\": \"<string>\",\n \"city\": \"<string>\",\n \"country\": \"<string>\",\n \"administrative_area\": \"<string>\"\n },\n \"contact\": {\n \"name_lines\": [\n \"<string>\"\n ],\n \"company\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone\": \"<string>\"\n },\n \"identifiers\": {\n \"vat\": \"<string>\",\n \"eori\": \"<string>\",\n \"gb_eori\": \"<string>\",\n \"tax_id\": \"<string>\",\n \"voec\": \"<string>\"\n }\n },\n \"pickup\": {\n \"service_point_code\": \"<string>\",\n \"reference\": \"<string>\",\n \"identifier\": \"<string>\",\n \"uri\": \"<string>\"\n }\n },\n \"parcels\": [\n {\n \"reference\": \"<string>\",\n \"identifier\": \"<string>\",\n \"tracking_url\": \"<string>\",\n \"freetext\": \"<string>\",\n \"gross_weight\": 1,\n \"length\": 1,\n \"width\": 1,\n \"height\": 1,\n \"total_net_amount\": 123,\n \"tax_amount\": 123,\n \"duty_amount\": 123,\n \"items\": [\n {\n \"reference\": \"<string>\",\n \"identifier\": \"<string>\",\n \"uri\": \"<string>\",\n \"image_url\": \"<string>\",\n \"sku\": \"<string>\",\n \"location\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"tariff_code\": \"<string>\",\n \"country_of_origin\": \"<string>\",\n \"quantity\": 1,\n \"total_net_amount\": 123,\n \"tax_amount\": 123,\n \"duty_amount\": 123,\n \"net_weight\": 1,\n \"cost_amount\": 123\n }\n ]\n }\n ],\n \"total_net_amount\": 123,\n \"tax_amount\": 123,\n \"duty_amount\": 123,\n \"shipping_net_amount\": 123,\n \"shipping_tax_amount\": 123\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"currency": "<string>",
"weight_unit": "g",
"dimension_unit": "cm",
"invoice_number": "<string>",
"reference": "<string>",
"identifier": "<string>",
"uri": "<string>",
"delivery": {
"carrier_code": "<string>",
"carrier_name": "<string>",
"carrier_logo_url": "<string>",
"carrier_icon_url": "<string>",
"service_code": "<string>",
"service_name": "<string>",
"is_pickup": true,
"is_return": true,
"addons": [
{
"code": "<string>",
"name": "<string>"
}
]
},
"parties": {
"receiver": {
"reference": "<string>",
"identifier": "<string>",
"uri": "<string>",
"address": {
"address_lines": [
"<string>"
],
"postal_code": "<string>",
"city": "<string>",
"country": "<string>",
"administrative_area": "<string>"
},
"contact": {
"name_lines": [
"<string>"
],
"company": "<string>",
"email": "jsmith@example.com",
"phone": "<string>"
},
"identifiers": {
"vat": "<string>",
"eori": "<string>",
"gb_eori": "<string>",
"tax_id": "<string>",
"voec": "<string>"
}
},
"pickup": {
"service_point_code": "<string>",
"company": "<string>",
"address": {
"address_lines": [
"<string>"
],
"postal_code": "<string>",
"city": "<string>",
"country": "<string>",
"administrative_area": "<string>"
},
"reference": "<string>",
"identifier": "<string>",
"uri": "<string>"
}
},
"parcels": [
{
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reference": "<string>",
"identifier": "<string>",
"tracking_code": "<string>",
"tracking_url": "<string>",
"freetext": "<string>",
"gross_weight": 1,
"length": 1,
"width": 1,
"height": 1,
"total_net_amount": 123,
"tax_amount": 123,
"duty_amount": 123,
"items": [
{
"reference": "<string>",
"identifier": "<string>",
"uri": "<string>",
"image_url": "<string>",
"sku": "<string>",
"location": "<string>",
"name": "<string>",
"description": "<string>",
"tariff_code": "<string>",
"country_of_origin": "<string>",
"quantity": 1,
"total_net_amount": 123,
"tax_amount": 123,
"duty_amount": 123,
"net_weight": 1,
"cost_amount": 123
}
],
"documents": [
{
"url": "<string>"
}
]
}
],
"total_net_amount": 123,
"tax_amount": 123,
"duty_amount": 123,
"shipping_net_amount": 123,
"shipping_tax_amount": 123,
"created_at": "2023-11-07T05:31:56Z",
"booked_at": "2023-11-07T05:31:56Z"
}
]
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}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"
Any value passed in this request will be returned in the same header. This can be used to correlate requests between client and server.
1 - 128^[A-Za-z0-9._-]{1,128}$Optional key that makes a write request idempotent so it can be safely retried. Reusing the key with an identical payload within 24 hours returns the original response without re-executing the operation (with an Idempotency-Replayed: true response header); reusing it with a different payload returns 422, and retrying while the original is still processing returns 409 with a Retry-After header. Use a client-generated, case-sensitive string of 16–128 characters (letters, digits, ., _, -). Deriving it deterministically from the request — for example the order ID combined with a hash of the payload — lets retries reuse the same key without storing it. See https://docs.smartsend.io/api-reference/idempotency.
16 - 128^[A-Za-z0-9._-]{16,128}$Path Parameters
Team identifier. All resources are scoped to this team.
1"ad9546c1-393e-49a5-9a72-5cc146c9bec5"
Unique identifier of the batch
Body
Array of shipments to add to the batch
1Show child attributes
Show child attributes
Response
Shipments added to batch successfully
Array of created shipments
Show child attributes
Show child attributes
Was this page helpful?