curl --request POST \
--url https://api.ship.uniuni.com/prod/client/shipments/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"recipient": {
"name": "Jane Doe",
"phone": "+1-604-123-4567",
"email": "jane@example.com",
"signature": false
},
"address": {
"address1": "3460 Cawthra Road",
"city": "Mississauga",
"province": "ON",
"postalCode": "L5A 2Y1",
"country": "CA"
},
"dimensions": {
"length": 1,
"width": 1,
"height": 1,
"dimensionUnit": "INCH"
},
"weight": {
"value": 1,
"weightUnit": "LB"
},
"postageType": "STANDARD",
"note": "Gift Box",
"shipmentLineItems": [
{
"description": "T-shirt",
"quantity": 1,
"unit_value": 10,
"currency": "CAD"
}
]
}
'import requests
url = "https://api.ship.uniuni.com/prod/client/shipments/create"
payload = {
"recipient": {
"name": "Jane Doe",
"phone": "+1-604-123-4567",
"email": "jane@example.com",
"signature": False
},
"address": {
"address1": "3460 Cawthra Road",
"city": "Mississauga",
"province": "ON",
"postalCode": "L5A 2Y1",
"country": "CA"
},
"dimensions": {
"length": 1,
"width": 1,
"height": 1,
"dimensionUnit": "INCH"
},
"weight": {
"value": 1,
"weightUnit": "LB"
},
"postageType": "STANDARD",
"note": "Gift Box",
"shipmentLineItems": [
{
"description": "T-shirt",
"quantity": 1,
"unit_value": 10,
"currency": "CAD"
}
]
}
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({
recipient: {
name: 'Jane Doe',
phone: '+1-604-123-4567',
email: 'jane@example.com',
signature: false
},
address: {
address1: '3460 Cawthra Road',
city: 'Mississauga',
province: 'ON',
postalCode: 'L5A 2Y1',
country: 'CA'
},
dimensions: {length: 1, width: 1, height: 1, dimensionUnit: 'INCH'},
weight: {value: 1, weightUnit: 'LB'},
postageType: 'STANDARD',
note: 'Gift Box',
shipmentLineItems: [{description: 'T-shirt', quantity: 1, unit_value: 10, currency: 'CAD'}]
})
};
fetch('https://api.ship.uniuni.com/prod/client/shipments/create', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ship.uniuni.com/prod/client/shipments/create",
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([
'recipient' => [
'name' => 'Jane Doe',
'phone' => '+1-604-123-4567',
'email' => 'jane@example.com',
'signature' => false
],
'address' => [
'address1' => '3460 Cawthra Road',
'city' => 'Mississauga',
'province' => 'ON',
'postalCode' => 'L5A 2Y1',
'country' => 'CA'
],
'dimensions' => [
'length' => 1,
'width' => 1,
'height' => 1,
'dimensionUnit' => 'INCH'
],
'weight' => [
'value' => 1,
'weightUnit' => 'LB'
],
'postageType' => 'STANDARD',
'note' => 'Gift Box',
'shipmentLineItems' => [
[
'description' => 'T-shirt',
'quantity' => 1,
'unit_value' => 10,
'currency' => 'CAD'
]
]
]),
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.ship.uniuni.com/prod/client/shipments/create"
payload := strings.NewReader("{\n \"recipient\": {\n \"name\": \"Jane Doe\",\n \"phone\": \"+1-604-123-4567\",\n \"email\": \"jane@example.com\",\n \"signature\": false\n },\n \"address\": {\n \"address1\": \"3460 Cawthra Road\",\n \"city\": \"Mississauga\",\n \"province\": \"ON\",\n \"postalCode\": \"L5A 2Y1\",\n \"country\": \"CA\"\n },\n \"dimensions\": {\n \"length\": 1,\n \"width\": 1,\n \"height\": 1,\n \"dimensionUnit\": \"INCH\"\n },\n \"weight\": {\n \"value\": 1,\n \"weightUnit\": \"LB\"\n },\n \"postageType\": \"STANDARD\",\n \"note\": \"Gift Box\",\n \"shipmentLineItems\": [\n {\n \"description\": \"T-shirt\",\n \"quantity\": 1,\n \"unit_value\": 10,\n \"currency\": \"CAD\"\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://api.ship.uniuni.com/prod/client/shipments/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"recipient\": {\n \"name\": \"Jane Doe\",\n \"phone\": \"+1-604-123-4567\",\n \"email\": \"jane@example.com\",\n \"signature\": false\n },\n \"address\": {\n \"address1\": \"3460 Cawthra Road\",\n \"city\": \"Mississauga\",\n \"province\": \"ON\",\n \"postalCode\": \"L5A 2Y1\",\n \"country\": \"CA\"\n },\n \"dimensions\": {\n \"length\": 1,\n \"width\": 1,\n \"height\": 1,\n \"dimensionUnit\": \"INCH\"\n },\n \"weight\": {\n \"value\": 1,\n \"weightUnit\": \"LB\"\n },\n \"postageType\": \"STANDARD\",\n \"note\": \"Gift Box\",\n \"shipmentLineItems\": [\n {\n \"description\": \"T-shirt\",\n \"quantity\": 1,\n \"unit_value\": 10,\n \"currency\": \"CAD\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ship.uniuni.com/prod/client/shipments/create")
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 \"recipient\": {\n \"name\": \"Jane Doe\",\n \"phone\": \"+1-604-123-4567\",\n \"email\": \"jane@example.com\",\n \"signature\": false\n },\n \"address\": {\n \"address1\": \"3460 Cawthra Road\",\n \"city\": \"Mississauga\",\n \"province\": \"ON\",\n \"postalCode\": \"L5A 2Y1\",\n \"country\": \"CA\"\n },\n \"dimensions\": {\n \"length\": 1,\n \"width\": 1,\n \"height\": 1,\n \"dimensionUnit\": \"INCH\"\n },\n \"weight\": {\n \"value\": 1,\n \"weightUnit\": \"LB\"\n },\n \"postageType\": \"STANDARD\",\n \"note\": \"Gift Box\",\n \"shipmentLineItems\": [\n {\n \"description\": \"T-shirt\",\n \"quantity\": 1,\n \"unit_value\": 10,\n \"currency\": \"CAD\"\n }\n ]\n}"
response = http.request(request)
puts response.read_bodyCrear un envío
Creates a new shipment in DRAFT status. The shipment must be purchased separately before a label can be generated.
curl --request POST \
--url https://api.ship.uniuni.com/prod/client/shipments/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"recipient": {
"name": "Jane Doe",
"phone": "+1-604-123-4567",
"email": "jane@example.com",
"signature": false
},
"address": {
"address1": "3460 Cawthra Road",
"city": "Mississauga",
"province": "ON",
"postalCode": "L5A 2Y1",
"country": "CA"
},
"dimensions": {
"length": 1,
"width": 1,
"height": 1,
"dimensionUnit": "INCH"
},
"weight": {
"value": 1,
"weightUnit": "LB"
},
"postageType": "STANDARD",
"note": "Gift Box",
"shipmentLineItems": [
{
"description": "T-shirt",
"quantity": 1,
"unit_value": 10,
"currency": "CAD"
}
]
}
'import requests
url = "https://api.ship.uniuni.com/prod/client/shipments/create"
payload = {
"recipient": {
"name": "Jane Doe",
"phone": "+1-604-123-4567",
"email": "jane@example.com",
"signature": False
},
"address": {
"address1": "3460 Cawthra Road",
"city": "Mississauga",
"province": "ON",
"postalCode": "L5A 2Y1",
"country": "CA"
},
"dimensions": {
"length": 1,
"width": 1,
"height": 1,
"dimensionUnit": "INCH"
},
"weight": {
"value": 1,
"weightUnit": "LB"
},
"postageType": "STANDARD",
"note": "Gift Box",
"shipmentLineItems": [
{
"description": "T-shirt",
"quantity": 1,
"unit_value": 10,
"currency": "CAD"
}
]
}
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({
recipient: {
name: 'Jane Doe',
phone: '+1-604-123-4567',
email: 'jane@example.com',
signature: false
},
address: {
address1: '3460 Cawthra Road',
city: 'Mississauga',
province: 'ON',
postalCode: 'L5A 2Y1',
country: 'CA'
},
dimensions: {length: 1, width: 1, height: 1, dimensionUnit: 'INCH'},
weight: {value: 1, weightUnit: 'LB'},
postageType: 'STANDARD',
note: 'Gift Box',
shipmentLineItems: [{description: 'T-shirt', quantity: 1, unit_value: 10, currency: 'CAD'}]
})
};
fetch('https://api.ship.uniuni.com/prod/client/shipments/create', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ship.uniuni.com/prod/client/shipments/create",
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([
'recipient' => [
'name' => 'Jane Doe',
'phone' => '+1-604-123-4567',
'email' => 'jane@example.com',
'signature' => false
],
'address' => [
'address1' => '3460 Cawthra Road',
'city' => 'Mississauga',
'province' => 'ON',
'postalCode' => 'L5A 2Y1',
'country' => 'CA'
],
'dimensions' => [
'length' => 1,
'width' => 1,
'height' => 1,
'dimensionUnit' => 'INCH'
],
'weight' => [
'value' => 1,
'weightUnit' => 'LB'
],
'postageType' => 'STANDARD',
'note' => 'Gift Box',
'shipmentLineItems' => [
[
'description' => 'T-shirt',
'quantity' => 1,
'unit_value' => 10,
'currency' => 'CAD'
]
]
]),
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.ship.uniuni.com/prod/client/shipments/create"
payload := strings.NewReader("{\n \"recipient\": {\n \"name\": \"Jane Doe\",\n \"phone\": \"+1-604-123-4567\",\n \"email\": \"jane@example.com\",\n \"signature\": false\n },\n \"address\": {\n \"address1\": \"3460 Cawthra Road\",\n \"city\": \"Mississauga\",\n \"province\": \"ON\",\n \"postalCode\": \"L5A 2Y1\",\n \"country\": \"CA\"\n },\n \"dimensions\": {\n \"length\": 1,\n \"width\": 1,\n \"height\": 1,\n \"dimensionUnit\": \"INCH\"\n },\n \"weight\": {\n \"value\": 1,\n \"weightUnit\": \"LB\"\n },\n \"postageType\": \"STANDARD\",\n \"note\": \"Gift Box\",\n \"shipmentLineItems\": [\n {\n \"description\": \"T-shirt\",\n \"quantity\": 1,\n \"unit_value\": 10,\n \"currency\": \"CAD\"\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://api.ship.uniuni.com/prod/client/shipments/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"recipient\": {\n \"name\": \"Jane Doe\",\n \"phone\": \"+1-604-123-4567\",\n \"email\": \"jane@example.com\",\n \"signature\": false\n },\n \"address\": {\n \"address1\": \"3460 Cawthra Road\",\n \"city\": \"Mississauga\",\n \"province\": \"ON\",\n \"postalCode\": \"L5A 2Y1\",\n \"country\": \"CA\"\n },\n \"dimensions\": {\n \"length\": 1,\n \"width\": 1,\n \"height\": 1,\n \"dimensionUnit\": \"INCH\"\n },\n \"weight\": {\n \"value\": 1,\n \"weightUnit\": \"LB\"\n },\n \"postageType\": \"STANDARD\",\n \"note\": \"Gift Box\",\n \"shipmentLineItems\": [\n {\n \"description\": \"T-shirt\",\n \"quantity\": 1,\n \"unit_value\": 10,\n \"currency\": \"CAD\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ship.uniuni.com/prod/client/shipments/create")
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 \"recipient\": {\n \"name\": \"Jane Doe\",\n \"phone\": \"+1-604-123-4567\",\n \"email\": \"jane@example.com\",\n \"signature\": false\n },\n \"address\": {\n \"address1\": \"3460 Cawthra Road\",\n \"city\": \"Mississauga\",\n \"province\": \"ON\",\n \"postalCode\": \"L5A 2Y1\",\n \"country\": \"CA\"\n },\n \"dimensions\": {\n \"length\": 1,\n \"width\": 1,\n \"height\": 1,\n \"dimensionUnit\": \"INCH\"\n },\n \"weight\": {\n \"value\": 1,\n \"weightUnit\": \"LB\"\n },\n \"postageType\": \"STANDARD\",\n \"note\": \"Gift Box\",\n \"shipmentLineItems\": [\n {\n \"description\": \"T-shirt\",\n \"quantity\": 1,\n \"unit_value\": 10,\n \"currency\": \"CAD\"\n }\n ]\n}"
response = http.request(request)
puts response.read_bodyshipmentLineItems es obligatorio. Cada envío debe incluir al menos un artículo (arreglo shipmentLineItems con >= 1 elemento). Omitirlo o enviar un arreglo vacío devuelve un error 422 PayloadValidationError.shipmentLineItems también debe incluir hs_code, country_of_origin y una description que identifique al fabricante. Los envíos que falten esta información pueden ser retenidos en la frontera.Autorizaciones
API access token generated from the UniUni Platform dashboard.
Cuerpo
Recipient details. Provide phone, email, or both.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Preferred postage type. Domestic shipments typically use SAME DAY, NEXT DAY, or STANDARD. Cross-border CA→US shipments use USPS Ground Advantage (DDP) or PostNL International Packet Tracked (DDU). If the requested type is unavailable, an available type is selected automatically.
PUBLICATION, SAME DAY, NEXT DAY, STANDARD, USPS Ground Advantage, PostNL International Packet Tracked, OTHER Line items describing the contents. Must contain at least one item.
1Show child attributes
Show child attributes
Package dimensions. Provide either dimensions or packagingId, not both. If neither is provided, a saved default packaging preset will be used. If there are no saved packaging presets, dimensions are required.
Show child attributes
Show child attributes
ID of a pre-configured packaging profile. Use instead of dimensions if the package matches a saved profile.
Optional note, up to 200 characters.
200Whether parcel protection (insurance) is required for this shipment.
Optional client-provided order reference.
¿Esta página le ayudó?