Passer au contenu principal
GET
/
client
/
label
/
{id}
Get label
curl --request GET \
  --url https://api.ship.uniuni.com/prod/client/label/{id} \
  --header 'Authorization: Bearer <token>'
{
  "message": "Success",
  "code": 0,
  "data": {
    "headers": {
      "Content-Type": "application/pdf",
      "Content-Disposition": "attachment; filename=\"UR07240000000004901_shipping_labels_2025-07-31.pdf\""
    },
    "body": "JVBERi0xLjMKJf////8K..."
  }
}
Lorsque labelType est shipping, l’expédition doit avoir été achetée au préalable.
Le contenu PDF est encodé en Base64 dans le champ body. Pour l’enregistrer en tant que fichier :
const fs = require('fs');
const pdfBuffer = Buffer.from(response.data.body, 'base64');
fs.writeFileSync('label.pdf', pdfBuffer);

Autorisations

Authorization
string
header
requis

API access token generated from the UniUni Platform dashboard.

Paramètres de chemin

id
string
requis

The orderNumber (for shipping labels) or batchNumber (for batch labels).

Paramètres de requête

labelType
enum<string>

Type of label to retrieve.

Options disponibles:
shipping,
batching

Réponse

200 - application/json

Label PDF or error

message
string
requis

Additional information about the request status.

code
integer
requis

Status code. 0 indicates success.

data
object