# Filter vendor contacts Query vendor contacts using flexible filter criteria with AND/OR logic. By default, only non-deleted contacts are returned (deletedAt: { isNull: true }). Override this by explicitly setting deletedAt filter criteria. Endpoint: POST /vendor-contacts/filter Version: 1.0.0 Security: BearerAuth ## Request fields (application/json): - `filter` (object) Filter criteria (optional - omit to return all vendor contacts). Note: deletedAt automatically defaults to { isNull: true } unless explicitly overridden. Example: {"and":[{"roles":{"includes":"BILLING"}},{"vendorId":{"equalTo":"550e8400-e29b-41d4-a716-446655440001"}}]} - `filter.and` (array) All conditions must match (recursive) Example: [{"roles":{"includes":"BILLING"}},{"vendorId":{"equalTo":"550e8400-e29b-41d4-a716-446655440001"}}] - `filter.or` (array) At least one condition must match (recursive) - `filter.not` (object) Negates the filter - `filter.vendorId` (object) Filter options for UUID fields (all operations) - `filter.vendorId.equalTo` (string) Exact match - `filter.vendorId.notEqualTo` (string) Not equal to - `filter.vendorId.in` (array) Matches any UUID in the array - `filter.vendorId.notIn` (array) Does not match any UUID in the array - `filter.vendorId.isNull` (boolean) Field is null (true) or not null (false) - `filter.email` (object) Filter options for string fields - `filter.email.in` (array) Matches any value in the array - `filter.email.notIn` (array) Does not match any value in the array - `filter.email.includes` (string) Contains substring (case-insensitive) - `filter.email.notIncludes` (string) Does not contain substring (case-insensitive) - `filter.email.startsWith` (string) Starts with prefix (case-insensitive) - `filter.email.notStartsWith` (string) Does not start with prefix (case-insensitive) - `filter.email.endsWith` (string) Ends with suffix (case-insensitive) - `filter.email.notEndsWith` (string) Does not end with suffix (case-insensitive) - `filter.phone` (object) Filter options for string fields - `filter.role` (object) Filter options for string fields - `filter.roles` (object) Filter for contact role enum array field - `filter.roles.includes` (string) Array contains this contact role Enum: "AGENT", "BILLING", "OPERATION", "OWNER" - `filter.roles.notIncludes` (string) Array does not contain this contact role Enum: "AGENT", "BILLING", "OPERATION", "OWNER" - `filter.deletedById` (object) Filter options for UUID fields (all operations) - `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.deletedAt` (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, required) - `data.object` (string) Object type identifier Enum: "VENDOR_CONTACT" - `data.vendor` (object, required) Vendor this contact belongs to (id and key only) - `data.vendor.id` (string, required) Resource UUID - `data.vendor.key` (string,null) Client-defined reference ID if set - `data.email` (string,null) Contact email address Example: "john.smith@abcwarehouse.com" - `data.phone` (string,null) Contact phone number Example: "+1-555-123-4567" - `data.role` (string,null) Contact role or title (deprecated - use roles array) Example: "Billing Manager" - `data.roles` (array,null) Types/roles this contact serves Enum: "AGENT", "BILLING", "OPERATION", "OWNER" - `data.deletedBy` (any) User who deleted this contact (full user details) - `data.createdAt` (string, required) When the contact was created Example: "2025-01-15T10:00:00Z" - `data.deletedAt` (string,null) When the contact was soft deleted (null if active) - `pageInfo` (object, required) - `pageInfo.pageSize` (integer, required) Number of items per page Example: 50 - `pageInfo.hasNextPage` (boolean, required) Whether there are more pages Example: true - `pageInfo.hasPreviousPage` (boolean) Whether there are previous pages - `pageInfo.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 500 fields (application/json): - `error` (string, required) Error code - `message` (string, required) Human-readable error message