Skip to main content
POST
/
shipping
/
get-rates
Get Shipping Rates for Order
curl --request POST \
  --url https://staging-api.puppetvendors.com/shipping/get-rates \
  --header 'Content-Type: application/json' \
  --header 'x-access-token: <api-key>' \
  --data '
{
  "orderNumber": {},
  "vendorId": "<string>",
  "lineItems": [
    "<string>"
  ],
  "length": 123,
  "width": 123,
  "height": 123,
  "weight": 123,
  "weightunit": "<string>",
  "distanceunit": "<string>",
  "to_address": {},
  "to_address.street1": "<string>",
  "to_address.street2": "<string>",
  "to_address.country": "<string>",
  "to_address.zip": "<string>",
  "to_address.city": "<string>",
  "to_address.phone": "<string>",
  "to_address.state": "<string>",
  "to_address.name": "<string>",
  "to_address.email": "<string>",
  "from_address": {},
  "from_address.street1": "<string>",
  "from_address.street2": "<string>",
  "from_address.country": "<string>",
  "from_address.zip": "<string>",
  "from_address.city": "<string>",
  "from_address.phone": "<string>",
  "from_address.state": "<string>",
  "from_address.name": "<string>",
  "from_address.email": "<string>"
}
'

Documentation Index

Fetch the complete documentation index at: https://dev.puppetvendors.com/llms.txt

Use this file to discover all available pages before exploring further.

V2 Preview — This endpoint is part of the V2 API preview. Breaking changes may occur.

Overview

Fetch real-time shipping rates from connected carriers for a specific set of line items. Provide package dimensions, weight, and origin/destination addresses to receive available rates with pricing and estimated delivery times.

Use Cases

  • Show rate options to vendors before purchasing a label
  • Compare carrier pricing for a shipment
  • Integrate shipping rate selection into custom fulfillment workflows

Request Body

orderNumber
string | number
required
The Shopify order number.
vendorId
string
required
The vendor’s ID.
lineItems
string[]
required
Array of line item IDs to ship. Minimum 1 item.
length
number
Package length. Must be a positive number.
width
number
Package width. Must be a positive number.
height
number
Package height. Must be a positive number.
weight
number
Package weight. Must be a positive number.
weightunit
string
Weight unit (e.g. lb, kg, oz, g).
distanceunit
string
Distance unit for dimensions (e.g. in, cm).
to_address
object
Destination address.
to_address.street1
string
Street address line 1.
to_address.street2
string
Street address line 2.
to_address.country
string
Country code (e.g. US, GB).
to_address.zip
string
Postal / ZIP code.
to_address.city
string
City name.
to_address.phone
string
Phone number.
to_address.state
string
State or province.
to_address.name
string
Recipient name.
to_address.email
string
Recipient email.
from_address
object
Origin address. Same fields as to_address.
from_address.street1
string
Street address line 1.
from_address.street2
string
Street address line 2.
from_address.country
string
Country code.
from_address.zip
string
Postal / ZIP code.
from_address.city
string
City name.
from_address.phone
string
Phone number.
from_address.state
string
State or province.
from_address.name
string
Sender name.
from_address.email
string
Sender email.

Response

200
{
  "success": true,
  "data": {
    "rates": [
      {
        "provider": "shippo",
        "service": "usps_priority",
        "serviceName": "USPS Priority Mail",
        "amount": 7.49,
        "currency": "USD",
        "estimatedDays": 3,
        "carrierCode": "usps"
      },
      {
        "provider": "shippo",
        "service": "ups_ground",
        "serviceName": "UPS Ground",
        "amount": 9.15,
        "currency": "USD",
        "estimatedDays": 5,
        "carrierCode": "ups"
      }
    ]
  }
}

Example

curl -X POST "https://staging-api.puppetvendors.com/shipping/get-rates" \
  -H "x-access-token: YOUR_VENDOR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "orderNumber": "1042",
    "vendorId": "507f1f77bcf86cd799439011",
    "lineItems": ["660a1b2e3d98f0001a2b3c01"],
    "length": 12,
    "width": 8,
    "height": 6,
    "weight": 2.5,
    "weightunit": "lb",
    "distanceunit": "in",
    "to_address": {
      "street1": "456 Oak Ave",
      "city": "Portland",
      "state": "OR",
      "zip": "97201",
      "country": "US"
    },
    "from_address": {
      "street1": "123 Main St",
      "city": "Austin",
      "state": "TX",
      "zip": "78701",
      "country": "US"
    }
  }'

More Examples

International shipment rates
curl -X POST "https://staging-api.puppetvendors.com/shipping/get-rates" \
  -H "x-access-token: YOUR_VENDOR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "orderNumber": "1055",
    "vendorId": "507f1f77bcf86cd799439012",
    "lineItems": ["665a1b2c3d4e5f6a7b8c9d0e"],
    "length": 12,
    "width": 8,
    "height": 6,
    "weight": 2.5,
    "weightunit": "lb",
    "distanceunit": "in",
    "from_address": {
      "street1": "123 Main St",
      "city": "New York",
      "state": "NY",
      "country": "US",
      "zip": "10001"
    },
    "to_address": {
      "street1": "10 Downing St",
      "city": "London",
      "country": "GB",
      "zip": "SW1A 2AA"
    }
  }'