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

# Introduction

> Fundamental concepts of Retrac's inventory API.

<Info>
  Retrac's API is in beta. Questions or feedback:
  [support@retrac.co](mailto:support@retrac.co?subject=Retrac%20API%20Feedback).
</Info>

Retrac exposes a REST API for managing workspace inventory: items, tags, locations, on-hand stock, transfers, and workspace metadata.

<CardGroup cols={2}>
  <Card title="Authentication" icon="key" href="/api-reference/authentication">
    API keys, scopes, and workspace ID
  </Card>

  <Card title="Security" icon="shield" href="/api-reference/security">
    Safe integration practices
  </Card>
</CardGroup>

## Base URL

```bash theme={null}
https://api.retrac.co
```

HTTPS is required. HTTP requests are not supported.

## Quick example

```bash theme={null}
curl -s "https://api.retrac.co/items?workspaceId=YOUR_WORKSPACE_ID" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

## Authentication

Pass your API key as a Bearer token:

```bash theme={null}
Authorization: Bearer YOUR_API_KEY
```

See [Authentication](/api-reference/authentication) for full-access vs restricted (`retrac_`) keys and scope details.

## Workspace ID

Most endpoints require `workspaceId` as a query parameter (full-access keys only):

```bash theme={null}
https://api.retrac.co/items?workspaceId=YOUR_WORKSPACE_ID
```

Find it under **Settings → General** in the dashboard.

## API surface

| Resource       | Endpoints                                     | Description                  |
| -------------- | --------------------------------------------- | ---------------------------- |
| **Items**      | `/items`, `/items/bulk`, `/items/count`       | Product catalog CRUD         |
| **Tags**       | `/tags`                                       | Organize items               |
| **Locations**  | `/locations`, `/locations/count`              | Warehouses, vans, sites      |
| **Inventory**  | `/inventory/balances`, `/inventory/movements` | Stock levels and ledger      |
| **Transfers**  | `/inventory/transfers`                        | Move stock between locations |
| **Workspaces** | `/workspaces`                                 | Workspace metadata           |

OpenAPI spec: `https://api.retrac.co`

## Response codes

| Code  | Meaning                               |
| ----- | ------------------------------------- |
| `200` | Success                               |
| `201` | Created                               |
| `400` | Bad request                           |
| `401` | Invalid or missing API key            |
| `403` | Forbidden (scope, role, or plan)      |
| `404` | Resource not found                    |
| `409` | Conflict (duplicate slug, name, etc.) |
| `429` | Rate limit exceeded                   |
| `500` | Server error                          |

See [Errors](/api-reference/errors) for machine-readable error codes.

## Versioning

The API is currently at version `0.0.1`. Breaking changes will be minimized during beta; monitor this documentation for updates.
