Skip to main content
This API lets you create shipping labels and sync tracking numbers for orders processed through ShipBob’s logistics system. It’s straightforward to integrate and works in both sandbox and production environments.

ShipBob Logistics OpenAPI spec

Create an Account

To get started, you’ll need a ShipBob account. Sign up here. After signing up, reach out to your ShipBob representative and they’ll guide you through the process and provide the necessary credentials.

Base URLs

  • Production (Live)
  • Sandbox (Testing)
Base URL
https://logisticslabelprintingapi.shipbob.com

Authentication

Authentication depends on the API you’re calling:
For https://logisticslabelprintingapi-stage.shipbob.dev/ or https://logisticslabelprintingapi.shipbob.com/:Use an SBL_authToken provided by your ShipBob rep:
Authorization: <SBL_authToken>
You can also find this by inspecting the element in your browser
For https://sandbox-api.shipbob.com/ or https://api.shipbob.com/:Use a Personal Access Token (PAT), which you can generate in the ShipBob dashboard by going to Integrations > API Tokens > Generate new token.
Authorization: Bearer <Personal_Access_Token>

Create a Shipping Label

POST /api/order:createLabel Generate a shipping label for an order. Labels default to ZPL format, but you can request PDF by adding a Label-Type header. Headers
HeaderValueRequired?Description
Authorization<SBL_authToken>YesYour SBL authentication token
Label-Typeapplication/pdfNoSet to get a PDF label (optional)
Request Body Send a JSON object with order details:
POST /api/order:createLabel
{
  "order": {
    "shipping_method": "Standard",
    "recipient": {
      "name": "Test Test",
      "email": "johndoe@shipbob.com",
      "phone_number": "444-333-2222",
      "address": {
        "address1": "223 E 5th St",
        "address2": null,
        "company_name": null,
        "city": "Greenville",
        "state": "NC",
        "country": "US",
        "zip_code": "27957"
      }
    },
    "location_id": 19,
    "reference_id": "101",
    "measurements": {
      "total_weight_oz": 4,
      "length_in": 2,
      "width_in": 4,
      "depth_in": 6
    },
    "products": [ // optional
      { "name": "Light Roast Coffee", "sku": "LIGHT-ROAST", "quantity": 1 }
    ],
    "tags": [ // optional
      { "name": "size", "value": "small" }
    ],
    "requires_signature": true, // optional
    "insurance_amount": 400, // optional
    "packing_slip": true // optional
  },
  "meta": {
    "order_number": "101",
    "order_id": "101",
    "customer_name": "ABC Merch"
  }
}
Key Fields
FieldTypeRequiredDescription
shipping_methodstringYesShipping option (e.g., "Standard")
recipientobject[]YesRecipient details (see Recipient table)
location_idintegerYesShipBob location ID. Sandbox: always use 33 or 19. Production: contact your ShipBob rep for your location ID.
reference_idstringYesUnique order identifier
measurementsobjectYesPackage dimensions and weight. All values must be whole numbers. Weight in ounces.
metaobject[]YesExtra information for your records
productsobject[]NoPass products to print pick lists and use batching
requires_signaturebooleanNotrue / false
insurance_amountnumberNoAmount in dollars. If >= 300, requires_signature automatically becomes true.
packing_slipbooleanNotrue / false
tagsobject[]NoKey/value tags
Response On success (HTTP 200):
{
  "interim_order_id": "67c8a7f30c3c1d16d05179db",
  "reference_id": "101",
  "shipment_id": 100000001,
  "label": "<label_data>"
}
  • label: ZPL string or PDF data (based on Label-Type).
Error Responses
  • 400: Bad request (check your JSON).
  • 401: Invalid or missing SBL_authToken.
  • 500: Server issue—try again later.

Bulk Cancel Labels

POST /api/order:bulk-cancel You can use this endpoint to refund or cancel shipping labels. Additionally, it allows you to cancel and resubmit one or more orders using the same reference_id. Once an order is canceled through this endpoint, it can be resubmitted as needed. However, please note that canceled orders will no longer be accessible in the UI or via the API. Headers
HeaderValueRequired?Description
Authorization<SBL_authToken>YesYour SBL authentication token
Content-Typeapplication/jsonNoAccepted content type
Request Body Send a JSON object with order details:
POST /api/order:bulk-cancel
{
  "reference_ids": ["ORDER-1","ORDER-2"]
}

Sync Tracking Numbers

  • Option 1 - Webhook
  • Option 2 - Polling
To receive tracking updates, subscribe to the order.shipment.tracking_received webhook that fires usually within 5 minutes after creating a shipping label.Learn how to subscribe here.

Tips for Success

  • Test in the sandbox first (use location_id: 33 or location_id: 19 for label creation).
  • Generate your Personal Access Token in the ShipBob dashboard for sandbox-api or api.shipbob.com calls.
  • Contact your ShipBob rep for your production location_id or if you hit a 401 error with your SBL_authToken.
  • Poll at least every 30 minutes to avoid missing tracking updates.

Diagram

FAQs

Sign up for a sandbox by following this link.

Other Resources