# Filter payment terms Filter payment terms using comprehensive query criteria with AND/OR logic and multiple operators. Supports complex filtering similar to GraphQL capabilities. Note: Soft-deleted payment terms are excluded by default (deletedAt defaults to { isNull: true }). Endpoint: POST /payment-terms/filter Version: 1.0.0 Security: BearerAuth ## Request fields (application/json): - `filter` (object) Filter criteria (optional - omit to return all payment terms). Note: deletedAt automatically defaults to { isNull: true } unless explicitly overridden. Example: {"and":[{"doNotUse":{"equalTo":false}},{"days":{"greaterThan":0}}]} - `filter.and` (array) All conditions must match (recursive) Example: [{"doNotUse":{"equalTo":false}},{"days":{"greaterThan":0}}] - `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.description` (object) Filter options for string fields - `filter.days` (object) Filter options for integer fields - `filter.days.lessThan` (integer) Less than - `filter.days.lessThanOrEqualTo` (integer) Less than or equal to - `filter.days.greaterThan` (integer) Greater than - `filter.days.greaterThanOrEqualTo` (integer) Greater than or equal to - `filter.quickPayFee` (object) Filter options for float/number fields - `filter.apOnly` (object) Filter options for boolean fields - `filter.doNotUse` (object) Filter options for boolean fields - `filter.key` (object) Filter options for client key fields (limited operations - exact match only) - `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 - `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) - `data.id` (string, required) Unique payment term identifier Example: "550e8400-e29b-41d4-a716-446655440000" - `data.name` (string, required) Payment term name Example: "Net 30" - `data.description` (string,null) Payment term description or notes Example: "Payment due 30 days from invoice date" - `data.days` (integer,null) Number of days until payment is due Example: 30 - `data.quickPayFee` (number,null) Quick pay fee percentage (e.g., 0.05 for 5%) Example: 0.05 - `data.apOnly` (boolean,null) Whether this payment term is for accounts payable only - `data.doNotUse` (boolean,null) Flag to prevent using this payment term for new transactions - `data.key` (string,null) Client-defined reference identifier Example: "ERP-PAYTERM-NET30" - `data.createdAt` (string, required) When the payment term was created Example: "2025-01-15T10:00:00Z" - `data.updatedAt` (string, required) When the payment term was last updated Example: "2025-01-15T14:30:00Z" - `data.deletedAt` (string,null) When the payment term was soft deleted (null if active) - `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