---
title: "Filter saved searches"
method: POST
path: "/saved-searches/filter"
tags: ["Saved Searches"]
---

# Filter saved searches

`POST /saved-searches/filter`

Filter saved searches using comprehensive query criteria with AND/OR logic and multiple operators.
Supports complex filtering similar to GraphQL capabilities.
Returns only saved searches accessible to the authenticated user (either owned by them or public).

## Request body

- SavedSearchFilterRequest — Request body for filtering saved searches
  - `filter` SavedSearchFilter — Filter criteria for saved searches with AND/OR logic support
    - `and` SavedSearchFilter[] — All conditions must match (recursive)
    - `or` SavedSearchFilter[] — At least one condition must match (recursive)
    - `not` SavedSearchFilter — recursive
    - `id` IDFilter — Filter options for ID fields (limited operations - exact match only)
      - `equalTo` string, uuid — Exact match
      - `in` string[] — Matches any UUID in the array
    - `name` StringFilter — Filter options for string fields
      - `equalTo` string — Exact match
      - `notEqualTo` string — Not equal to
      - `in` string[] — Matches any value in the array
      - `notIn` string[] — Does not match any value in the array
      - `includes` string — Contains substring (case-insensitive)
      - `notIncludes` string — Does not contain substring (case-insensitive)
      - `startsWith` string — Starts with prefix (case-insensitive)
      - `notStartsWith` string — Does not start with prefix (case-insensitive)
      - `endsWith` string — Ends with suffix (case-insensitive)
      - `notEndsWith` string — Does not end with suffix (case-insensitive)
      - `isNull` boolean — Field is null (true) or not null (false)
    - `preferenceType` StringFilter — Filter options for string fields
      - `equalTo` string — Exact match
      - `notEqualTo` string — Not equal to
      - `in` string[] — Matches any value in the array
      - `notIn` string[] — Does not match any value in the array
      - `includes` string — Contains substring (case-insensitive)
      - `notIncludes` string — Does not contain substring (case-insensitive)
      - `startsWith` string — Starts with prefix (case-insensitive)
      - `notStartsWith` string — Does not start with prefix (case-insensitive)
      - `endsWith` string — Ends with suffix (case-insensitive)
      - `notEndsWith` string — Does not end with suffix (case-insensitive)
      - `isNull` boolean — Field is null (true) or not null (false)
    - `isPublic` BooleanFilter — Filter options for boolean fields
      - `equalTo` boolean — Exact match
      - `notEqualTo` boolean — Not equal to
      - `isNull` boolean — Field is null (true) or not null (false)
    - `createdAt` DatetimeFilter — Filter options for datetime fields
      - `equalTo` string, date-time — Exact match
      - `notEqualTo` string, date-time — Not equal to
      - `lessThan` string, date-time — Before this datetime
      - `lessThanOrEqualTo` string, date-time — On or before this datetime
      - `greaterThan` string, date-time — After this datetime
      - `greaterThanOrEqualTo` string, date-time — On or after this datetime
      - `isNull` boolean — Field is null (true) or not null (false)
    - `updatedAt` DatetimeFilter — Filter options for datetime fields
      - `equalTo` string, date-time — Exact match
      - `notEqualTo` string, date-time — Not equal to
      - `lessThan` string, date-time — Before this datetime
      - `lessThanOrEqualTo` string, date-time — On or before this datetime
      - `greaterThan` string, date-time — After this datetime
      - `greaterThanOrEqualTo` string, date-time — On or after this datetime
      - `isNull` boolean — Field is null (true) or not null (false)
  - `pageSize` integer — Number of results per page
  - `cursor` string — Pagination cursor for next page

## Response `200`

Successful response

- object
  - `data` SavedSearch[]
    - `object` 'SAVED_SEARCH' — Object type identifier
    - `id` string, uuid, required — Unique saved search identifier
    - `name` string, required — Display name for the saved search
    - `preferenceType` 'SHIPMENT' | 'INVOICE' | 'BILL' | 'USER' | 'CUSTOMER' | 'VENDOR' | 'QUOTE' | 'COMMISSION' | 'CARRIER' | 'INVOICE_PAYMENT' | 'BILL_PAYMENT' | 'LOAD' | 'TRUCK_POSTING' | 'LOCATION', required — Type of entity this saved search applies to. Each type corresponds to a specific entity's search view. **Entity Mapping:** - `INVOICE`: Customer invoices (AR Invoices) - money owed to you - `BILL`: Vendor/Carrier bills (AP Invoices) - money you owe - `INVOICE_PAYMENT`: Customer payment groups (AR Payment Groups) - `BILL_PAYMENT`: Vendor/Carrier payment groups (AP Payment Groups)
    - `jsonValue` SearchConfigurationState — The saved search configuration state containing criteria, sorting, and display preferences. This is stored in the jsonValue field.
      - `searchCriteria` object — Search criteria configuration
        - `filters` object[] — Array of field-level search filters
          - `field` string, required — The field name to filter on
          - `searchCriteria` object, required — The search criteria for this field
            - `operator` string, required — Search operator (e.g., EQUALS, ONE_OF, BETWEEN)
            - `values` union[] — Array of values for multi-value operators
              - …
            - `value` union — Single value for single-value operators
              - …
            - `min` union — Minimum value for range operators
              - …
            - `max` union — Maximum value for range operators
              - …
            - `minRelative` integer — Relative minimum (e.g., -7 for 7 units ago)
            - `minRelativeUnit` 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR' | 'MINUTE' | 'SECOND' — Time unit for minRelative
            - `maxRelative` integer — Relative maximum
            - `maxRelativeUnit` 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR' | 'MINUTE' | 'SECOND' — Time unit for maxRelative
            - `valueRelative` integer — Relative value
            - `valueRelativeUnit` 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR' | 'MINUTE' | 'SECOND' — Time unit for valueRelative
      - `sorting` object[] — Sort configuration
        - `id` string, required — Field name to sort by
        - `desc` boolean, required — Sort in descending order if true
      - `columnVisibility` object — Column visibility settings (key is column name, value is visibility)
      - `columnOrder` string[] — Order of columns for display
    - `isPublic` boolean, nullable — Whether this saved search is visible to all users in the organization. If false or null, only the owner can see it.
    - `ownedByUser` string, uuid, nullable — User ID who owns this saved search. Null means it's an organization-level saved search.
    - `groupId` string, uuid, nullable — Optional group this saved search belongs to
    - `createdAt` string, date-time, required — Timestamp when saved search was created
    - `updatedAt` string, date-time, required — Timestamp when saved search was last updated
  - `pagination` PaginationInfo
    - `pageSize` integer, required — Number of items per page
    - `hasNextPage` boolean, required — Whether there are more pages
    - `hasPreviousPage` boolean — Whether there are previous pages
    - `endCursor` string, nullable — Cursor for the next page (null if no next page)

## Other responses

- `400` — Bad request - invalid input
- `401` — Unauthorized - invalid or missing access token
- `422` — Validation error - invalid field values
- `429` — Rate limit exceeded

---

[API](https://skmtc.net/mvmnt/apis/mvmnt-api.md) · [All operations](https://skmtc.net/mvmnt/apis/mvmnt-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mvmnt/mvmnt-api/versions/c44e5e7a4256/schema)
