> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trackstarhq.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Trackstar is a unified REST API for WMS, cart, and carrier systems. Base URL: https://production.trackstarhq.com. There is no SDK; call the API with plain HTTP.
> Send x-trackstar-api-key on every request. Endpoints scoped to one connection also need x-trackstar-access-token. Read both from environment variables and never print them.
> Reads return data Trackstar has already synced from the connected system. Writes (POST, PUT, PATCH, DELETE) are forwarded to the connected system immediately.
> A new connection has no data until its initial sync finishes. Wait for the connection.historical-sync-completed webhook, or poll GET /connections/{connection_id} and check historical_sync_completed.
> List endpoints page with page_token and next_token (limit is capped at 1000). Repeat every filter on every page. Filters use field[operator]=value, for example created_date[gte]=2026-01-01T00:00:00Z.
> Write bodies must not contain null or empty strings; omit the field instead. Call GET /integrations/{integration_type}/{integration_name}/write-info first to learn the exact fields an integration accepts.
> To test without real credentials, POST /sandbox/generate-sandbox/{wms|cart|carrier} with the API key returns a sandbox access token. Start at https://docs.trackstarhq.com/how-to-guides/build-with-ai.md and install the skills with: npx skills add https://docs.trackstarhq.com

# Carrier API

> One API for invoice charges and raw invoice files across every connected shipping carrier

The Carrier API gives you one set of endpoints for every shipping carrier your customers connect. Each charge on a carrier invoice comes back as a line item in the same shape whichever carrier billed it, and the original invoice files are there to download.

## Make a request

Every endpoint lives under `https://production.trackstarhq.com/carrier/` and takes two headers: your API key, and the access token for the customer's connection. See [Getting Started](https://docs.trackstarhq.com/how-to-guides/getting-started.md) for how to get both.

```bash theme={null}
curl "https://production.trackstarhq.com/carrier/invoice-line-items?limit=10" \
  -H "x-trackstar-api-key: YOUR_API_KEY" \
  -H "x-trackstar-access-token: YOUR_ACCESS_TOKEN"
```

List endpoints return up to 1000 items per page with a `next_token` for the next page, and accept filters such as `updated_date[gte]`. [About the API](https://docs.trackstarhq.com/how-to-guides/about-the-api.md) covers pagination, filtering, errors, and rate limits.

## Resources

> [card] [Invoice Line Items](https://docs.trackstarhq.com/api-reference/carrier-api/invoice-line-items/info.md)
>
> Individual charges on carrier invoices, normalized across carriers.

> [card] [Files](https://docs.trackstarhq.com/api-reference/carrier-api/files/info.md)
>
> The raw invoice files each carrier sends, with download links.

> [card] [Sample Files](https://docs.trackstarhq.com/api-reference/carrier-api/sample-files/overview.md)
>
> Example invoice files from each supported carrier.

## Keep your data current

Trackstar picks up new invoices on a schedule, so reads come from Trackstar and don't wait on the carrier. To hear about new invoices as they land instead of polling, subscribe to [webhooks](https://docs.trackstarhq.com/how-to-guides/webhooks/webhooks.md). [Syncing Data](https://docs.trackstarhq.com/how-to-guides/syncing-data.md) lists how often each resource syncs.

To try the endpoints before a customer connects, use the [Carrier sandbox](https://docs.trackstarhq.com/how-to-guides/sandbox.md).

## Use cases

> [card] [Carrier Invoice Data](https://docs.trackstarhq.com/use-cases/carrier-invoice-data.md)
>
> Retrieve invoice line items as JSON or download raw invoice files.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.