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

# Filters

> Narrow which services and rate cards get priced.

The optional `filters` block restricts which of a customer's service mappings are
priced. **Filter by the same values you see in the response** — service and rate
card are matched by their alias (`serviceId` / `rateCardId`).

```json theme={null}
"filters": {
  "carrierIds":     ["ZEPHYR"],        // carrier alias
  "serviceIds":     ["EXPRESS"],       // = the serviceId in the response
  "rateCardIds":    ["EX_RATES"],      // = the rateCardId in the response
  "serviceTypes":   ["DOMESTIC"],      // service type
  "serviceClasses": ["EXPRESS"]        // service class
}
```

## Dimensions

<ResponseField name="carrierIds" type="string[]">
  Restrict to services supplied by these **carriers**, matched by **carrier alias**.
</ResponseField>

<ResponseField name="serviceIds" type="string[]">
  Restrict to these services, matched by **service alias** — the same value
  returned as `serviceId` on each quote line (e.g. `ZEPHYR`, `FALCON`).
</ResponseField>

<ResponseField name="rateCardIds" type="string[]">
  Restrict to these rate cards, matched by **rate-card alias** — the same value
  returned as `rateCardId` (e.g. `ZEPHYR_EXP`, `FALCON_STD`).
</ResponseField>

<ResponseField name="serviceTypes" type="string[]">
  Restrict to these service types, e.g. `DOMESTIC`, `INTERNATIONAL`.
</ResponseField>

<ResponseField name="serviceClasses" type="string[]">
  Restrict to these service classes, e.g. `STANDARD`, `EXPRESS`.
</ResponseField>

## How matching works

<CardGroup cols={2}>
  <Card title="Empty = no restriction" icon="asterisk">
    An empty or omitted array places no restriction on that dimension. Omit
    `filters` entirely to price everything.
  </Card>

  <Card title="AND across, OR within" icon="diagram-project">
    A rate card is priced only if it satisfies **every** non-empty dimension;
    within one dimension, matching **any** listed value passes.
  </Card>
</CardGroup>

### Example — combine dimensions

Price only the **Zephyr** service **and** the **ZEPHYR\_EXP** rate card:

```json theme={null}
"filters": { "serviceIds": ["ZEPHYR"], "rateCardIds": ["ZEPHYR_EXP"] }
```

### Example — several services

Price Zephyr or Falcon (drops everything else):

```json theme={null}
"filters": { "serviceIds": ["ZEPHYR", "FALCON"] }
```

<Note>
  If a filter matches nothing, that customer's `quotes` array comes back empty
  (and `noQuoteMessage` may explain why) — the request still succeeds.
</Note>
