ShipBob Logistics API
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.
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)
Authentication
Authentication depends on the API you’re calling:
For logisticslabelprintingapi Endpoints
For https://logisticslabelprintingapi-stage.shipbob.dev/ or https://logisticslabelprintingapi.shipbob.com/:
Use an SBL_authToken provided by your ShipBob rep:
For sandbox-api or api.shipbob.com Endpoints
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.
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
Request Body
Send a JSON object with order details:
Key Fields
Response
On success (HTTP 200):
label: ZPL string or PDF data (based onLabel-Type).
Error Responses
400: Bad request (check your JSON).401: Invalid or missingSBL_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
Request Body
Send a JSON object with order details:
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: 33for label creation). - Generate your Personal Access Token in the ShipBob dashboard for
sandbox-apiorapi.shipbob.comcalls. - Contact your ShipBob rep for your production
location_idor if you hit a 401 error with yourSBL_authToken. - Poll at least every 30 minutes to avoid missing tracking updates.
Diagram
FAQs
How to sign up for a sandbox account?
Sign up for a sandbox by following this link.

