Passer au contenu principal
POST
/
client
/
shipments
/
create
Create a shipment
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"
    }
  ]
}
'
{
  "message": "Shipment created successfully",
  "code": 0,
  "data": {
    "orderNumber": "UNI031455E90",
    "trackingId": "UR07300000000005351",
    "recipient": {
      "name": "Jane Doe",
      "phone": "+1-604-123-4567",
      "email": "jane@example.com"
    },
    "address": {
      "address1": "2455 Meadowvale Blvd",
      "city": "Mississauga",
      "province": "ON",
      "postalCode": "L5N 0H1",
      "country": "CA"
    },
    "dimensions": {
      "length": 1,
      "width": 1,
      "height": 1,
      "dimensionUnit": "INCH"
    },
    "weight": {
      "value": 1,
      "weightUnit": "LB"
    },
    "status": "DRAFT",
    "note": "Gift Box",
    "createdAt": "2025-07-30T18:32:11.455Z",
    "updatedAt": "2025-07-30T18:32:11.899Z",
    "rates": {
      "postageType": "NEXT DAY",
      "postageFee": 4.88,
      "tax": 0.63,
      "total": 5.51,
      "currency": "CAD"
    },
    "shipmentLineItems": [
      {
        "description": "T-shirt",
        "quantity": 1,
        "unit_value": 10,
        "currency": "CAD"
      }
    ]
  }
}
Une fois que vous avez acheté une expédition et imprimé l’étiquette, visitez ship.uniuni.com/locations pour confirmer votre point de dépôt ou ship.uniuni.com/pickups pour demander un service de ramassage (si disponible).
shipmentLineItems est obligatoire. Chaque expédition doit inclure au moins un article (tableau shipmentLineItems avec >= 1 élément). L’omettre ou envoyer un tableau vide retourne une erreur 422 PayloadValidationError.
Expéditions transfrontalières (CA vers US) : Chaque article dans shipmentLineItems doit également inclure hs_code, country_of_origin et une description identifiant le fabricant. Les expéditions manquant ces informations pourraient être retenues à la frontière.

Autorisations

Authorization
string
header
requis

API access token generated from the UniUni Platform dashboard.

Corps

application/json
recipient
object
requis
address
object
requis
weight
object
requis
shipmentLineItems
object[]
requis

Line items describing the contents. Must contain at least one item.

Minimum array length: 1
dimensions
object

Package dimensions. Provide either dimensions or packagingId, not both.

packagingId
integer

ID of a pre-configured packaging profile. Use instead of dimensions if the package matches a saved profile.

postageType
enum<string>

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.

Options disponibles:
PUBLICATION,
SAME DAY,
NEXT DAY,
STANDARD,
USPS Ground Advantage,
PostNL International Packet Tracked,
OTHER
note
string

Optional note, up to 200 characters.

Maximum string length: 200
insuranceRequired
boolean

Whether parcel protection (insurance) is required for this shipment.

orderNumber
string

Optional client-provided order reference.

Réponse

Shipment created or error returned

message
string
requis

Additional information about the request status.

code
integer
requis

Status code. 0 indicates success.

data
object