Developer Docs

Getting Started
  • Quick Start
  • Getting Started
  • Authentication
API Reference
  • Overview
  • Orders
  • Products
  • Inventory
  • Shipments
  • Customers
  • Returns
  • Tracking
Integrations
  • Shopify
  • WooCommerce
  • BigCommerce
  • Custom API
Webhooks
  • Overview
  • Webhook Events
Resources
  • Rate Limits
  • Error Codes
  • API Playground
  • SDK Libraries
  • Changelog
  • API Status
Support
  • Community
  • GitHub
  • Support
HomeDeveloper HubDocsApi ReferenceShipments
API Reference

Shipments & Tracking API

Get real-time shipping rates, create shipping labels, select carriers, and track shipments from pickup to delivery.

Endpoints

View all shipping endpoints

Code Examples

Integration code samples

Webhooks

Real-time tracking updates

Endpoints

POST/v1/shipping/rates

Get shipping rates from multiple carriers

Request Body

{
  "from_zip": "90001",
  "to_zip": "10001",
  "weight": 2.5,
  "weight_unit": "lbs",
  "dimensions": {
    "length": 12,
    "width": 8,
    "height": 6,
    "unit": "in"
  },
  "value": 150.00,
  "insurance": true
}

Response Example

{
  "success": true,
  "data": {
    "rates": [
      {
        "carrier": "USPS",
        "service": "Priority Mail",
        "rate": 12.50,
        "currency": "USD",
        "delivery_days": 2,
        "delivery_date": "2025-01-17T00:00:00.000Z"
      },
      {
        "carrier": "FedEx",
        "service": "Ground",
        "rate": 14.75,
        "currency": "USD",
        "delivery_days": 3,
        "delivery_date": "2025-01-18T00:00:00.000Z"
      },
      {
        "carrier": "UPS",
        "service": "Ground",
        "rate": 15.20,
        "currency": "USD",
        "delivery_days": 3,
        "delivery_date": "2025-01-18T00:00:00.000Z"
      }
    ]
  },
  "meta": {
    "timestamp": "2025-01-15T10:30:00.000Z"
  }
}
POST/v1/shipping/labels

Create a shipping label for an order

Request Body

{
  "order_id": "ORDER-12345",
  "carrier": "USPS",
  "service": "Priority Mail",
  "from_address": {
    "name": "3PL SHIP Warehouse",
    "street1": "123 Warehouse Blvd",
    "city": "Los Angeles",
    "state": "CA",
    "zip": "90001",
    "country": "US"
  },
  "to_address": {
    "name": "John Doe",
    "street1": "456 Main St",
    "city": "New York",
    "state": "NY",
    "zip": "10001",
    "country": "US",
    "phone": "+1-555-0100"
  },
  "package": {
    "weight": 2.5,
    "weight_unit": "lbs",
    "dimensions": {
      "length": 12,
      "width": 8,
      "height": 6,
      "unit": "in"
    }
  }
}

Response Example

{
  "success": true,
  "data": {
    "label_id": "LBL-123456",
    "tracking_number": "9400111899563824166541",
    "carrier": "USPS",
    "service": "Priority Mail",
    "cost": 12.50,
    "label_url": "https://app.3plship.com/labels/LBL-123456.pdf",
    "tracking_url": "https://tools.usps.com/go/TrackConfirmAction?tLabels=9400111899563824166541",
    "created_at": "2025-01-15T10:30:00.000Z"
  },
  "meta": {
    "timestamp": "2025-01-15T10:30:00.000Z"
  }
}
GET/v1/tracking/:tracking_number

Get real-time tracking information

Response Example

{
  "success": true,
  "data": {
    "tracking_number": "9400111899563824166541",
    "carrier": "USPS",
    "status": "in_transit",
    "status_detail": "In Transit to Next Facility",
    "estimated_delivery": "2025-01-17T00:00:00.000Z",
    "events": [
      {
        "status": "in_transit",
        "message": "In Transit to Next Facility",
        "location": "Newark, NJ",
        "timestamp": "2025-01-16T08:45:00.000Z"
      },
      {
        "status": "accepted",
        "message": "Accepted at USPS Origin Facility",
        "location": "Los Angeles, CA",
        "timestamp": "2025-01-15T14:30:00.000Z"
      }
    ]
  },
  "meta": {
    "timestamp": "2025-01-16T10:30:00.000Z"
  }
}
GET/v1/shipping/carriers

List available carriers and services

Response Example

{
  "success": true,
  "data": {
    "carriers": [
      {
        "code": "usps",
        "name": "USPS",
        "services": [
          "Priority Mail",
          "First-Class Package",
          "Priority Mail Express"
        ]
      },
      {
        "code": "fedex",
        "name": "FedEx",
        "services": [
          "Ground",
          "2Day",
          "Overnight"
        ]
      },
      {
        "code": "ups",
        "name": "UPS",
        "services": [
          "Ground",
          "2nd Day Air",
          "Next Day Air"
        ]
      }
    ]
  },
  "meta": {
    "timestamp": "2025-01-15T10:30:00.000Z"
  }
}

Code Examples

cURL
curl -X POST https://app.3plship.com/api/v1/shipping/rates \
  -H "Authorization: Bearer zl_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "from_zip": "90001",
    "to_zip": "10001",
    "weight": 2.5,
    "weight_unit": "lbs",
    "dimensions": {
      "length": 12,
      "width": 8,
      "height": 6,
      "unit": "in"
    }
  }'
Python
import requests

response = requests.post(
  'https://app.3plship.com/api/v1/shipping/rates',
  headers={
    'Authorization': 'Bearer zl_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
    'Content-Type': 'application/json'
  },
  json={
    'from_zip': '90001',
    'to_zip': '10001',
    'weight': 2.5,
    'weight_unit': 'lbs',
    'dimensions': {
      'length': 12,
      'width': 8,
      'height': 6,
      'unit': 'in'
    }
  }
)
data = response.json()

Related Webhooks

shipment.created

Triggered when a shipping label is created

shipment.tracking_updated

Triggered when tracking status changes

shipment.delivered

Triggered when package is delivered

Ready to Get Started?

Integrate shipping and tracking into your application today

Try in PlaygroundView Quickstart