跳转到主要内容
POST
/
client
/
shipments
/
quote
Get a pricing quote
curl --request POST \
  --url https://api.ship.uniuni.com/prod/client/shipments/quote \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "address": {
    "address1": "<string>",
    "city": "<string>",
    "province": "<string>",
    "postalCode": "<string>",
    "country": "<string>",
    "address2": "<string>",
    "address3": "<string>",
    "latitude": 123,
    "longitude": 123
  },
  "weight": {
    "value": 123
  },
  "dimensions": {
    "length": 123,
    "width": 123,
    "height": 123
  },
  "packagingId": 123
}
'
{
  "message": "Estimated rates retrieved successfully",
  "code": 0,
  "data": {
    "rates": [
      {
        "postageType": "NEXT DAY",
        "carrierName": "UniUni",
        "postageFee": 1.3,
        "tax": 0,
        "total": 1.3,
        "currency": "CAD",
        "estimated": true,
        "minDeliveryDays": 1,
        "maxDeliveryDays": 2
      }
    ],
    "carrierName": "UniUni",
    "estimated": true,
    "disclaimer": "Rates are estimates only and do not guarantee final shipment eligibility, service availability, or delivery."
  }
}

授权

Authorization
string
header
必填

API access token generated from the UniUni Platform dashboard.

请求体

application/json
address
object
必填
weight
object
必填
postageType
enum<string>
必填

Requested postage service. STANDARD is for domestic. USPS Ground Advantage is for CA to US cross-border (DDP, merchant pays duties). PostNL International Packet Tracked is for CA to US cross-border (DDU, recipient pays duties).

可用选项:
STANDARD,
USPS Ground Advantage,
PostNL International Packet Tracked
dimensions
object
packagingId
number

ID of a preset packaging to use when dimensions are omitted. If the ID is not found for this merchant, the request fails.

响应

200 - application/json

Estimated rates retrieved successfully

message
string
必填
code
integer
必填

Status code. 0 indicates success.

data
object