# Filter saved searches 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). Endpoint: POST /saved-searches/filter Version: 1.0.0 Security: BearerAuth ## Request fields (application/json): - `filter` (object) Filter criteria (optional - omit to return all saved searches). Returns only saved searches accessible to the authenticated user. Example: {"preferenceType":{"equalTo":"SHIPMENT"},"isPublic":{"equalTo":true}} - `filter.and` (array) All conditions must match (recursive) - `filter.or` (array) At least one condition must match (recursive) - `filter.not` (object) Negates the filter - `filter.id` (object) Filter options for ID fields (limited operations - exact match only) - `filter.id.equalTo` (string) Exact match - `filter.id.in` (array) Matches any UUID in the array - `filter.name` (object) Filter options for string fields - `filter.name.notEqualTo` (string) Not equal to - `filter.name.in` (array) Matches any value in the array - `filter.name.notIn` (array) Does not match any value in the array - `filter.name.includes` (string) Contains substring (case-insensitive) - `filter.name.notIncludes` (string) Does not contain substring (case-insensitive) - `filter.name.startsWith` (string) Starts with prefix (case-insensitive) - `filter.name.notStartsWith` (string) Does not start with prefix (case-insensitive) - `filter.name.endsWith` (string) Ends with suffix (case-insensitive) - `filter.name.notEndsWith` (string) Does not end with suffix (case-insensitive) - `filter.name.isNull` (boolean) Field is null (true) or not null (false) - `filter.preferenceType` (object) Filter options for string fields Example: {"equalTo":"SHIPMENT"} - `filter.isPublic` (object) Filter options for boolean fields Example: {"equalTo":true} - `filter.pinned` (object) Filter options for boolean fields - `filter.createdAt` (object) Filter options for datetime fields - `filter.createdAt.lessThan` (string) Before this datetime - `filter.createdAt.lessThanOrEqualTo` (string) On or before this datetime - `filter.createdAt.greaterThan` (string) After this datetime - `filter.createdAt.greaterThanOrEqualTo` (string) On or after this datetime - `filter.updatedAt` (object) Filter options for datetime fields - `pageSize` (integer) Number of results per page Example: 50 - `cursor` (string) Pagination cursor for next page ## Response 200 fields (application/json): - `data` (array) - `data.object` (string) Object type identifier Enum: "SAVED_SEARCH" - `data.id` (string, required) Unique saved search identifier Example: "550e8400-e29b-41d4-a716-446655440000" - `data.name` (string, required) Display name for the saved search Example: "Active Shipments - West Coast" - `data.preferenceType` (string, required) The entity type this saved search applies to. Must match the search endpoint where this saved search will be used. Enum: "SHIPMENT", "INVOICE", "BILL", "USER", "CUSTOMER", "VENDOR", "QUOTE", "COMMISSION", "CARRIER", "INVOICE_PAYMENT", "BILL_PAYMENT", "LOAD", "TRUCK_POSTING", "LOCATION" - `data.jsonValue` (object) The saved search configuration (criteria, sorting, display preferences) Example: {"searchCriteria":{"filters":[{"field":"status","searchCriteria":{"operator":"ONE_OF","values":["ACTIVE","PENDING"]}}]},"sorting":[{"id":"createdAt","desc":true}],"columnVisibility":{"status":true,"createdAt":true},"columnOrder":["id","status","createdAt"]} - `data.jsonValue.searchCriteria` (object) Search criteria configuration Example: {"filters":[{"field":"status","searchCriteria":{"operator":"ONE_OF","values":["ACTIVE","PENDING"]}}]} - `data.jsonValue.searchCriteria.filters` (array) Array of field-level search filters Example: [{"field":"status","searchCriteria":{"operator":"ONE_OF","values":["ACTIVE","PENDING"]}}] - `data.jsonValue.searchCriteria.filters.field` (string, required) The field name to filter on Example: "status" - `data.jsonValue.searchCriteria.filters.searchCriteria` (object, required) The search criteria for this field - `data.jsonValue.searchCriteria.filters.searchCriteria.operator` (string, required) Search operator (e.g., EQUALS, ONE_OF, BETWEEN) Example: "ONE_OF" - `data.jsonValue.searchCriteria.filters.searchCriteria.values` (array) Array of values for multi-value operators Example: ["ACTIVE","PENDING"] - `data.jsonValue.searchCriteria.filters.searchCriteria.value` (any) Single value for single-value operators - `data.jsonValue.searchCriteria.filters.searchCriteria.min` (any) Minimum value for range operators - `data.jsonValue.searchCriteria.filters.searchCriteria.max` (any) Maximum value for range operators - `data.jsonValue.searchCriteria.filters.searchCriteria.minRelative` (integer) Relative minimum (e.g., -7 for 7 units ago) - `data.jsonValue.searchCriteria.filters.searchCriteria.minRelativeUnit` (string) Time unit for minRelative Enum: "YEAR", "MONTH", "WEEK", "DAY", "HOUR", "MINUTE", "SECOND" - `data.jsonValue.searchCriteria.filters.searchCriteria.maxRelative` (integer) Relative maximum - `data.jsonValue.searchCriteria.filters.searchCriteria.maxRelativeUnit` (string) Time unit for maxRelative Enum: "YEAR", "MONTH", "WEEK", "DAY", "HOUR", "MINUTE", "SECOND" - `data.jsonValue.searchCriteria.filters.searchCriteria.valueRelative` (integer) Relative value - `data.jsonValue.searchCriteria.filters.searchCriteria.valueRelativeUnit` (string) Time unit for valueRelative Enum: "YEAR", "MONTH", "WEEK", "DAY", "HOUR", "MINUTE", "SECOND" - `data.jsonValue.sorting` (array) Sort configuration Example: [{"id":"createdAt","desc":true}] - `data.jsonValue.sorting.id` (string, required) Field name to sort by Example: "createdAt" - `data.jsonValue.sorting.desc` (boolean, required) Sort in descending order if true Example: true - `data.jsonValue.columnVisibility` (object) Column visibility settings (key is column name, value is visibility) Example: {"status":true,"createdAt":true} - `data.jsonValue.columnOrder` (array) Order of columns for display Example: ["id","status","createdAt"] - `data.isPublic` (boolean,null) Whether this saved search is visible to all users in the organization. If false or null, only the owner can see it. Example: true - `data.pinned` (boolean,null) Whether this saved search is pinned for quick access Example: true - `data.ownedByUser` (string,null) User ID who owns this saved search. Null means it's an organization-level saved search. Example: "550e8400-e29b-41d4-a716-446655440001" - `data.groupId` (string,null) Optional group this saved search belongs to - `data.createdAt` (string, required) Timestamp when saved search was created Example: "2025-01-15T10:00:00Z" - `data.updatedAt` (string, required) Timestamp when saved search was last updated Example: "2025-01-15T14:30:00Z" - `pagination` (object) - `pagination.pageSize` (integer, required) Number of items per page Example: 50 - `pagination.hasNextPage` (boolean, required) Whether there are more pages Example: true - `pagination.hasPreviousPage` (boolean) Whether there are previous pages - `pagination.endCursor` (string,null) Cursor for the next page (null if no next page) Example: "eyJpZCI6IjU1MGU4NDAwLWUyOWItNDFkNC1hNzE2LTQ0NjY1NTQ0MDAwMCJ9" ## Response 400 fields (application/json): - `error` (string, required) Error code - `message` (string, required) Human-readable error message ## Response 401 fields (application/json): - `error` (string, required) Error code - `message` (string, required) Human-readable error message ## Response 422 fields (application/json): - `error` (string, required) Error code Example: "validation_error" - `message` (string, required) Human-readable error message - `details` (array, required) Validation error details - `details.field` (string, required) Field name that failed validation - `details.message` (string, required) Validation error message ## Response 429 fields (application/json): - `error` (string, required) Error code - `message` (string, required) Human-readable error message