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

# Overview

> Server-to-server inventory for external integrations.

The Inventory API exposes per-SKU sellable quantities by region, plus incoming purchase-order quantities grouped by expected arrival date.

## Endpoint

All requests use a single endpoint:

```http theme={null}
POST https://api.keystoneb2b.io/v1/inventory
Authorization: Bearer <api_key>
Content-Type: application/json
```

## Actions

| Action   | Auth required | Purpose                                  |
| -------- | ------------- | ---------------------------------------- |
| `health` | No            | Verify the service is reachable          |
| `list`   | Yes           | Fetch inventory for all or specific SKUs |

## Quick start

### Health check

```bash theme={null}
curl -s https://api.keystoneb2b.io/v1/inventory \
  -H 'Content-Type: application/json' \
  -d '{"action":"health"}'
```

```json theme={null}
{
  "success": true,
  "service": "inventory-truth-api",
  "timestamp": "2026-06-16T12:00:00.000Z"
}
```

### List specific SKUs

```bash theme={null}
curl -s https://api.keystoneb2b.io/v1/inventory \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"action":"list","skus":["E-CC26-01"]}'
```

### Paginate all SKUs

```json theme={null}
{
  "action": "list",
  "limit": 500,
  "offset": 0
}
```

| Parameter | Notes                                                 |
| --------- | ----------------------------------------------------- |
| `limit`   | Optional. Default `100`, maximum `500`                |
| `offset`  | Optional. Default `0`                                 |
| `skus`    | Optional. Array of SKU strings, max `200` per request |

## Example response

```json theme={null}
{
  "success": true,
  "data": [
    {
      "sku": "E-CC26-01",
      "immediate_inventory": { "usa": 118, "canada": 0 },
      "future_inventory": {
        "usa": [
          { "expected_date": "2026-03-22", "quantity": 1396 },
          { "expected_date": "2026-06-27", "quantity": 50 },
          { "expected_date": "2026-08-06", "quantity": 492 }
        ],
        "canada": [
          { "expected_date": "2026-06-26", "quantity": 10 }
        ]
      },
      "refreshed_at": "2026-06-16T02:56:04.608992+00:00"
    }
  ],
  "limit": 100,
  "offset": 0
}
```

<Card title="Field reference" icon="table" href="/inventory-api/field-reference">
  Learn what each response field means and how regions map to currencies.
</Card>
