跳转到主要内容
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..."
  }
}
labelTypeshipping时,货件必须已购买。
PDF内容以Base64编码存储在body字段中。要保存为文件:
const fs = require('fs');
const pdfBuffer = Buffer.from(response.data.body, 'base64');
fs.writeFileSync('label.pdf', pdfBuffer);

授权

Authorization
string
header
必填

API access token generated from the UniUni Platform dashboard.

路径参数

id
string
必填

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

查询参数

labelType
enum<string>

Type of label to retrieve.

可用选项:
shipping,
batching

响应

200 - application/json

Label PDF or error

message
string
必填

Additional information about the request status.

code
integer
必填

Status code. 0 indicates success.

data
object