# schema

> Use shoplazza schema to introspect Shoplazza CLI: list topics, drill into a command, and read the parameters it accepts without leaving the terminal.

Explore available APIs, commands, and their parameters through schema introspection.

## Usage

```shell
shoplazza schema [path] [flags]
```

### Flags

| Flag | Type | Description |
|------|------|-------------|
| `--view <section>` | string | Filter output: `all`, `request`, or `response` (default: `all`) |
| `--jq, -q <expr>` | string | jq expression to filter the JSON output (e.g. `'.parameters'`); needs `--format json` at an interactive terminal |

## Examples

### List all available modules

```shell
shoplazza schema
```

Returns a list of all service modules (products, orders, customers, etc.).

### List commands in a module

```shell
shoplazza schema products
```

Returns all available commands under the products module.

### View command details

```shell
shoplazza schema products.list
```

Returns the full schema for the `products list` command:

* HTTP method and path
* Query parameters with types
* Request body structure
* Response schema

### Filter to request or response only

```shell
# Show only request parameters
shoplazza schema products.create --view request

# Show only response schema
shoplazza schema products.list --view response
```

## Use cases

* **Discover APIs** — Browse available commands before writing scripts
* **Check parameters** — Verify required fields before making API calls
* **Debug requests** — Understand expected request/response formats
* **AI agent integration** — Agents can introspect the schema to discover capabilities dynamically
