# Stallion Express API

Access to the sandbox environment can be provided upon request. (Not all rates are available in the Sandbox environment). API token can be found under "Account Settings > API Token" in the Stallion Express dashboard. To help us assist you more effectively when troubleshooting, please make sure to include the Request-ID in your email communication.

Version: 4

## Servers

Production server (uses live data)
```
https://ship.stallion.ca/api/v4
```

Sandbox server (uses test data)
```
https://sandbox.stallion.ca/api/v4
```

## Security

### bearerAuth

Type: http
Scheme: bearer

## Download OpenAPI description

[Stallion Express API](https://docs.stallion.ca/_bundle/@v4/openapi.yaml)

## Postage Types

### Get Postage Types

 - [GET /postage-types](https://docs.stallion.ca/v4/openapi/postage-types/getpostagetypes.md): Get a list of all available postage types

## Shipments

### Get Rates

 - [POST /rates](https://docs.stallion.ca/v4/openapi/shipments/getrates.md): Validates shipment details and returns all available rates.

### Get Shipments

 - [GET /shipments](https://docs.stallion.ca/v4/openapi/shipments/getshipments.md): Get the list of paginated shipments by different search parameters.

### Create Shipment

 - [POST /shipments](https://docs.stallion.ca/v4/openapi/shipments/createshipment.md): Create a shipment and return the postage label.

### Track Shipment

 - [GET /track](https://docs.stallion.ca/v4/openapi/shipments/track.md): Fetch a shipment's tracking details by different search parameters. Send at least one of ship_code, tracking_code or order_id; omitting all three is a 422.

Lookups are scoped to the shipments your account owns. An identifier that belongs to another account is reported exactly like one that does not exist — 404 with No shipment found — so the response cannot be used to discover whether someone else's tracking number exists. A small allowlist of Stallion-operated tracking consumers (the stallion.ca tracking form, AfterShip) may resolve ship_code / tracking_code across accounts; order_id stays owner-scoped even for them, because order IDs are merchant-local and matched as a substring. If you integrate a cross-account tracking surface, ask Stallion support rather than expecting the unscoped behaviour this endpoint had before 2026-08-24.

### Track Shipment by Code

 - [GET /shipments/{ship_code}/track](https://docs.stallion.ca/v4/openapi/shipments/getshipmenttracking.md): Fetch a shipment's tracking details by a single identifier in the path. The {ship_code} segment matches either the ship_code or the tracking_code, so a carrier tracking number works here too. The response body is the same shape GET /track returns.

Scoped to the shipments your account owns, with the same trusted-consumer allowlist described on GET /track. An identifier belonging to another account returns 404 with No shipment found, identical to one that does not exist.

### Get Shipment

 - [GET /shipments/{ship_code}](https://docs.stallion.ca/v4/openapi/shipments/gettracking.md): Get a shipment

### Void Shipment

 - [GET /shipments/{ship_code}/void](https://docs.stallion.ca/v4/openapi/shipments/voidshipment.md): Requests a void for a shipment with the provided id.

## Orders

### Get Orders

 - [GET /orders](https://docs.stallion.ca/v4/openapi/orders/getorders.md): Get a paginated list of orders based on certain criteria.

### Create Order

 - [POST /orders](https://docs.stallion.ca/v4/openapi/orders/createorder.md): Create an order.

### Get Order

 - [GET /orders/{id}](https://docs.stallion.ca/v4/openapi/orders/getorder.md): Retrieve a specific order by its auto generated unique ID.

### Update Order

 - [PUT /orders/{id}](https://docs.stallion.ca/v4/openapi/orders/updateorder.md): Update an order.

### Get Store Order

 - [GET /{store_id}/orders/{order_id}](https://docs.stallion.ca/v4/openapi/orders/getstoreorder.md): Retrieve a specific order by its unique ID.

## Stores

### Get Stores

 - [GET /stores](https://docs.stallion.ca/v4/openapi/stores/getstores.md): Get a list of all stores associated with the authenticated user. (This only shows store create via the API.)

### Create Store

 - [POST /stores](https://docs.stallion.ca/v4/openapi/stores/createstore.md): Create a new store for the authenticated user.

### Delete Store by ID

 - [DELETE /stores/{id}](https://docs.stallion.ca/v4/openapi/stores/deletestore.md): Delete a store by its unique ID.

## Batches

### Create a batch

 - [POST /batches](https://docs.stallion.ca/v4/openapi/batches/createbatch.md): Creates a new batch to be used when creating shipments.

## Locations

### Get Locations

 - [GET /locations](https://docs.stallion.ca/v4/openapi/locations/getlocations.md): Gets a list of all current Stallion Express locations.

## Credits

### Get Credits

 - [GET /credits](https://docs.stallion.ca/v4/openapi/credits/getcredits.md): Return the current account balance

### Add Credits

 - [POST /credits](https://docs.stallion.ca/v4/openapi/credits/addcredits.md): Charge the account's default payment method and add the credits to its CAD balance. amount must be between 10 and 500 inclusive. The account must already have a default payment method saved — there is no way to add one through this API, and a request from an account without one is rejected with 422.

