Prompt

How do I book shipments through a shipping API?

Logistics & Supply Chain / Freight & Shipping1 observationLast seen Nov 4, 2026

Latest observation

Nov 4, 2026OpenAI APIWeb search: off

Booking shipments through a shipping API usually follows the same high-level flow, even though the exact endpoints vary by provider.

Typical workflow

  1. Get an API key / authenticate

    • Create an account with the shipping provider.
    • Generate credentials like an API key, OAuth token, or HMAC signature.
    • Include those credentials in each request.
  2. Create a shipment request

    • Send shipment details to the API, such as:
      • sender/origin address
      • recipient/destination address
      • package dimensions and weight
      • service level (ground, express, etc.)
      • shipment date / pickup requirements
      • declared value, customs info for international shipments
    • The API may return:
      • available rates
      • estimated transit times
      • package validation errors
  3. Select a rate / service

    • Choose the carrier and service option you want.
    • Some APIs let you create a shipment directly with a chosen service.
    • Others require you to first “rate” the shipment, then “book” it.
  4. Purchase / book the shipment

    • Call the booking or label-creation endpoint.
    • The API typically returns:
      • shipment ID / booking reference
      • tracking number
      • shipping label URL or base64 label data
      • customs documents if needed
  5. Print label and hand off

    • Print the label and attach it to the parcel.
    • Schedule a pickup or drop off at the carrier location if supported.
  6. Track and manage

    • Use tracking endpoints or webhooks to monitor status updates.
    • Handle cancellations, address changes, and delivery exceptions if the API supports them.

Common API objects

Most shipping APIs use similar data structures:

  • Address

    • name
    • street lines
    • city
    • state/province
    • postal code
    • country
    • phone/email
  • Parcel

    • weight
    • length
    • width
    • height
    • unit system
  • Shipment

    • shipper
    • recipient
    • parcels
    • carrier/service
    • insurance/customs fields

Example request pattern

1. Rate shipment

POST /shipments/rates
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
{
  "ship_from": {
    "name": "Alice",
    "street1": "123 Main St",
    "city": "Austin",
    "state": "TX",
    "postal_code": "78701",
    "country": "US"
  },
  "ship_to": {
    "name": "Bob",
    "street1": "500 Market St",
    "city": "San Francisco",
    "state": "CA",
    "postal_code": "94105",
    "country": "US"
  },
  "parcels": [
    {
      "weight": 2.5,
      "length": 10,
      "width": 8,
      "height": 4,
      "unit": "in"
    }
  ]
}

2. Book / create label

POST /shipments
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
{
  "rate_id": "rate_12345"
}

3. Example response

{
  "shipment_id": "shp_67890",
  "tracking_number": "1Z999AA10123456784",
  "label_url": "https://api.example.com/labels/shp_67890.pdf",
  "status": "booked"
}

Important considerations

  • Validate addresses before booking to avoid failed labels.
  • Watch for dimensional weight pricing if you ship large/light packages.
  • Use idempotency keys when creating bookings to prevent duplicate labels if requests are retried.
  • Handle customs correctly for cross-border shipments.
  • Check rate limits and webhook reliability.
  • Store shipment IDs and tracking numbers in your system for later lookup.

If you’re integrating with a specific provider

The details differ by platform, but the process is usually:

  • Shippo / EasyPost / AfterShip / carrier-native APIs
    • authenticate
    • create rate
    • purchase label
    • retrieve tracking
    • cancel if necessary

If you want, I can also show:

  • a real example in Python/JavaScript
  • how to do this with a specific provider like UPS, FedEx, DHL, Shippo, or EasyPost
  • how to design your own shipment booking API

Observation history

How did Obsurfable measure this prompt?

Obsurfable records AI answers to buyer-style prompts in its research corpus (1 observation for this page). Metrics are distributions over observations, not a single static ranking.

Which AI systems does Obsurfable collect answers from?

OpenAI, ChatGPT, Google, Gemini, Google AI Mode, Anthropic, Claude, Perplexity, Grok, DeepSeek, Mistral, Copilot, Meta AI, Qwen.

How can brands improve their AEO?

Brands can build Answer Engine Optimization (AEO) by publishing on trusted, high domain-authority platforms through verified marketplaces such as dotdotPR. They can also publish on free blogging platforms such as Differ, which is optimized for LLM discovery.

Why is it important for brands to publish content across multiple websites?

Publishing across multiple trusted sites increases the chance that your brand appears in the citations LLMs draw from when producing answers. Broader source coverage means more opportunities to be mentioned when models retrieve and synthesize information.

Want this interpreted for your brand?

Explorer is the free public corpus. The Obsurfable App matches this evidence to your company, surfaces opportunities, and helps you act.