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

# Quickstart

> Make your first Traddal API call in five minutes.

## 1. Create an API client

In your dashboard, go to **Settings → Developers → API clients** and
create a client. Choose the scopes it needs — for example
`consignments:read consignments:write classify:read calculate:read`.

You'll get a **client ID** and **client secret**. The secret is shown once —
store it somewhere safe.

## 2. Get an access token

API clients are machine-to-machine (M2M) OAuth clients. Exchange your
credentials for a short-lived bearer token:

```bash theme={null}
curl -X POST https://{partner}.mytraddal.com/admin/oauth2/token \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -d 'grant_type=client_credentials' \
  -d 'client_id={client_id}' \
  -d 'client_secret={client_secret}'
```

The response contains `access_token` and `expires_in`. Tokens are JWTs bound
to your workspace's organization — a token minted for one partner can never
read another partner's data.

## 3. Make your first call

```bash theme={null}
curl https://{partner}.mytraddal.com/admin/api/v1/consignments \
  -H 'Authorization: Bearer {access_token}'
```

```json theme={null}
{
  "consignments": [],
  "total": 0
}
```

## 4. Classify a product

The classify and calculate endpoints live on the same Admin API, so the same
token works (with the `classify:read` / `calculate:read` scopes):

```bash theme={null}
curl -X POST https://{partner}.mytraddal.com/admin/api/v1/classify \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer {access_token}' \
  -d '{
    "description": "Men'\''s waterproof hiking backpack, 40L, nylon",
    "destination_country": "US"
  }'
```

## Next steps

<CardGroup cols={2}>
  <Card title="Authentication" href="/guides/authentication">
    Scopes, token lifetimes, and how partner isolation is enforced.
  </Card>

  <Card title="API conventions" href="/guides/conventions">
    snake\_case on the wire, versioning, and error shapes.
  </Card>
</CardGroup>
