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.
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.
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:
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.
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 on Label-Type).Error Responses
400: Bad request (check your JSON).401: Invalid or missing SBL_authToken.500: Server issue—try again later.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:
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.
location_id: 33 for label creation).sandbox-api or api.shipbob.com calls.location_id or if you hit a 401 error with your SBL_authToken.Sign up for a sandbox by following this link.