跳转到主要内容
POST
/
client
/
batch
/
create
Create a batch
curl --request POST \
  --url https://api.ship.uniuni.com/prod/client/batch/create \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "batchName": "Monday Dropoff",
  "shipments": [
    "UNI02947917E"
  ]
}
'
{
  "message": "Success",
  "code": 0,
  "data": {
    "batchNumber": "URB0717000000000837",
    "batchName": "Monday Dropoff",
    "status": "PENDING",
    "printedLabel": false,
    "createdAt": "2025-07-17T21:55:05.526Z",
    "updatedAt": "2025-07-17T21:55:05.697Z",
    "shipmentCount": 1
  }
}
只有已购买(已支付)的货件才能添加到批次中。草稿货件将导致1002错误。

授权

Authorization
string
header
必填

API access token generated from the UniUni Platform dashboard.

请求体

application/json
batchName
string

Name for the batch.

shipments
string[]

List of order numbers to include. Only purchased shipments can be added.

响应

200 - application/json

Batch created or error

message
string
必填

Additional information about the request status.

code
integer
必填

Status code. 0 indicates success.

data
object