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

# Search Filters

Filters are provided as a list of keys and filter specifications. The keys are names of fields that can be returned in the response. Not all fields support filtering.

Multiple filters are combined using "AND" logic. For example, to find orders that were created after 2023-01-01 and are not completed the filters could be specified like so:

```json title="Request" theme={null}
{
  "created_at": {"from": "2023-01-01"},
  "status": {"neq": "complete"}
}
```

### Filters

<ParamField path="eq" type="any">
  ```json theme={null}
  { "status" : { "eq" : 1 } }
  ```

  The value is equal to the given value.
</ParamField>

<ParamField path="neq" type="any">
  ```json theme={null}
  { "sku" : { "neq" : "product1" } }
  ```

  The value is not equal to the given value.
</ParamField>

<ParamField path="starts" type="string">
  ```json theme={null}
  { "sku" : { "starts" : "abc-" } }
  ```

  The value starts with the given value (prefix match).
</ParamField>

<ParamField path="gt" type="number">
  ```json theme={null}
  { "order_id" : { "gt" : 5 } }
  ```

  The value is greater than the given value.
</ParamField>

<ParamField path="lt" type="number">
  ```json theme={null}
  { "order_id" : { "lt" : 5 } }
  ```

  The value is less than the given value.
</ParamField>

<ParamField path="gteq" type="number">
  ```json theme={null}
  { "order_id" : { "gteq" : 5 } }
  ```

  The value is greater than or equal to the given value.
</ParamField>

<ParamField path="lteq" type="number">
  ```json theme={null}
  { "order_id" : { "lteq" : 5 } }
  ```

  The value is less than or equal to the given value.
</ParamField>

<ParamField path="from" type="string">
  ```json theme={null}
  { "created_at" : { "from" : "2014-07-12 14:12:47", "datetime" : true } }
  ```

  ```json theme={null}
  { "created_at" : { "from" : "2014-07-12" } }
  ```

  The value is greater than or equal to the given value. If the "datetime" flag is specified the value is compared with the exact timestamp given, otherwise the value is compared with the first second on the given date. The timezone is the merchant's configured timezone.
</ParamField>

<ParamField path="to" type="string">
  ```json theme={null}
  { "created_at" : { "to" : "2014-07-12 14:12:47", "datetime" : true } }
  ```

  ```json theme={null}
  { "created_at" : { "to" : "2014-07-12" } }
  ```

  The value is less than or equal to the given value. If the "datetime" flag is specified the value is compared with the exact timestamp given, otherwise the value is compared with the last second on the given date. The timezone is the merchant's configured timezone.
</ParamField>

<ParamField path="in" type="array">
  ```json theme={null}
  { "order_id" : { "in" : [ "114", "115" ] } }
  ```

  The value is equal to one of the given values. This can be used to locate multiple records with one query.
</ParamField>

<ParamField path="nin" type="array">
  ```json theme={null}
  { "status" : { "nin" : [ "new", "complete" ] } }
  ```

  The value is not equal to any of the given values.
</ParamField>

<ParamField path="null" type="integer">
  ```json theme={null}
  { "target_ship_date" : { "null" : 1 } }
  ```

  The field's value is null (has no value).
</ParamField>

<ParamField path="notnull" type="integer">
  ```json theme={null}
  { "target_ship_date" : { "notnull" : 1 } }
  ```

  The field has a value that is not null.
</ParamField>
