ShipLabel REST API
ShipLabel registers a REST API namespace: /wp-json/shiplabel/v1/.
Endpoints
| Endpoint | Method | Description |
|---|---|---|
/orders/{order_id}/generate | POST | Generate a label for an order |
/orders/{order_id}/labels | GET | List all labels for an order, each with a signed download_url |
/labels/{label_id}/void | DELETE | Cancel a label with the carrier and delete its local file |
/labels/{label_id} | DELETE | Permanently delete a label record. Only cancelled labels can be deleted |
/labels/{label_id}/tracking | GET | Tracking events saved for a label so far |
/labels/{label_id}/download | GET | Download the label file (requires the signed token from download_url) |
/validate-address | POST | Validate an address with USPS or FedEx |
/rates | POST | Get a rate quote for a package |
Generate a Label
POST /orders/{order_id}/generate
| Parameter | Type | Required | Description |
|---|---|---|---|
carrier | string | Yes | usps or fedex |
weight_oz | number | Yes | Package weight in ounces |
service | string | No | Service code, e.g. PRIORITY_MAIL or FEDEX_2_DAY. Defaults to the carrier's default service |
length, width, height | number | No | Inches. Default 1 |
package_type | string | No | package (default), or for USPS FLAT_RATE_ENVELOPE, FLAT_RATE_BOX_SMALL, FLAT_RATE_BOX_MEDIUM, FLAT_RATE_BOX_LARGE |
item_ids | array | No | Order item IDs in this package. Default: all physical items |
mark_fulfilled | boolean | No | Mark the WooCommerce Fulfillment as fulfilled. Default false |
Returns 201 with the label (carrier, service, tracking_number, postage_cost, label_id, fulfillment_id, download_url), or 422 with an error message.
Rates
POST /rates takes carrier, weight_oz, optional length/width/height, service and package_type, plus either order_id (the destination is read from the order) or to_zip. from_zip defaults to your shipper ZIP. The response is the carrier's rate data.
Validate Address
POST /validate-address takes carrier (usps or fedex) and an address object with address1, address2, city, state, zip and, for FedEx, country.
Authentication
All endpoints require an authenticated WordPress user with the manage_woocommerce capability - a logged-in session with a REST nonce, or Application Passwords. There is no separate API key.
This is separate from the tracking webhook, which is a plain (non-REST) endpoint with its own optional signature check.