# Filter credit memos Search for credit memos using filter criteria. ## Common Filters - By customer: { "filter": { "customerId": { "equalTo": "uuid" } } } - With balance: { "filter": { "hasRemainingBalance": true } } - Open credits: { "filter": { "status": { "in": ["OPEN", "PARTIALLY_APPLIED"] } } } Endpoint: POST /credit-memos/filter Version: 1.0.0 Security: BearerAuth ## Request fields (application/json): - `filter` (object) - `filter.id` (object) Filter options for UUID fields (all operations) - `filter.id.equalTo` (string) Exact match - `filter.id.notEqualTo` (string) Not equal to - `filter.id.in` (array) Matches any UUID in the array - `filter.id.notIn` (array) Does not match any UUID in the array - `filter.id.isNull` (boolean) Field is null (true) or not null (false) - `filter.customerId` (object) Filter options for UUID fields (all operations) - `filter.status` (object) - `filter.status.equalTo` (string) Current status of the credit memo (derived from remaining balance). - OPEN: No applications, full balance available - PARTIALLY_APPLIED: Some amount applied, balance remains - APPLIED: Fully applied to invoices - VOIDED: Credit memo cancelled Enum: "OPEN", "PARTIALLY_APPLIED", "APPLIED", "VOIDED" - `filter.status.notEqualTo` (string) Current status of the credit memo (derived from remaining balance). - OPEN: No applications, full balance available - PARTIALLY_APPLIED: Some amount applied, balance remains - APPLIED: Fully applied to invoices - VOIDED: Credit memo cancelled Enum: "OPEN", "PARTIALLY_APPLIED", "APPLIED", "VOIDED" - `filter.status.in` (array) Enum: "OPEN", "PARTIALLY_APPLIED", "APPLIED", "VOIDED" - `filter.memoDate` (object) Filter options for datetime fields - `filter.memoDate.lessThan` (string) Before this datetime - `filter.memoDate.lessThanOrEqualTo` (string) On or before this datetime - `filter.memoDate.greaterThan` (string) After this datetime - `filter.memoDate.greaterThanOrEqualTo` (string) On or after this datetime - `filter.amount` (object) Filter options for float/number fields - `filter.amount.lessThan` (number) Less than - `filter.amount.lessThanOrEqualTo` (number) Less than or equal to - `filter.amount.greaterThan` (number) Greater than - `filter.amount.greaterThanOrEqualTo` (number) Greater than or equal to - `filter.remainingBalance` (object) Filter options for float/number fields - `filter.hasRemainingBalance` (boolean) Filter to credits with available balance - `filter.sourcePaymentGroupId` (object) Filter options for UUID fields (all operations) - `filter.createdAt` (object) Filter options for datetime fields - `filter.and` (array) - `filter.or` (array) - `filter.not` (object) - `pageSize` (integer) - `cursor` (string) ## Response 200 fields (application/json): - `data` (array, required) - `data.id` (string, required) Example: "550e8400-e29b-41d4-a716-446655440000" - `data.key` (string,null) Client-defined key - `data.reference` (string,null) Reference number Example: "CM-00001" - `data.customer` (object) Enhanced reference to a customer resource (returned in responses). Includes full customer details in addition to id/key. Note: Does NOT include nested references (paymentTerm, contacts, etc.) to prevent recursion. Maximum nesting depth: 1 level. - `data.customer.id` (string, required) Customer UUID Example: "550e8400-e29b-41d4-a716-446655440000" - `data.customer.key` (string,null) Client-defined reference ID if set Example: "ERP-CUSTOMER-ACME" - `data.customer.name` (string, required) Customer company name Example: "Acme Manufacturing Corp" - `data.customer.friendlyId` (string, required) Human-readable customer identifier Example: "A123456" - `data.customer.status` (string, required) Customer status Enum: "PROSPECT", "ACTIVE", "INACTIVE", "CHURNED" - `data.customer.phoneNumber` (string,null) Primary phone number Example: "+1-555-123-4567" - `data.customer.website` (string,null) Customer website URL Example: "https://acme-manufacturing.com" - `data.customer.createdAt` (string, required) When the customer was created Example: "2025-01-15T10:00:00Z" - `data.customer.updatedAt` (string, required) When the customer was last updated Example: "2025-01-15T14:30:00Z" - `data.customer.deletedAt` (string,null) When the customer was soft deleted (null if active) - `data.amount` (number, required) Original credit amount - `data.appliedAmount` (number) Total amount applied to invoices - `data.remainingBalance` (number, required) Available balance - `data.currency` (string,null) Currency code Example: "USD" - `data.status` (string, required) Current status of the credit memo (derived from remaining balance). - OPEN: No applications, full balance available - PARTIALLY_APPLIED: Some amount applied, balance remains - APPLIED: Fully applied to invoices - VOIDED: Credit memo cancelled Enum: "OPEN", "PARTIALLY_APPLIED", "APPLIED", "VOIDED" - `data.memoDate` (string, required) Credit memo date - `data.notes` (string,null) Notes or description - `data.sourcePaymentGroupId` (string,null) Payment that created this credit (if from overpayment) - `data.sourcePaymentKey` (string,null) - `data.applications` (array) Invoices this credit is applied to - `data.applications.invoiceId` (string, required) - `data.applications.invoiceFriendlyId` (string,null) - `data.applications.paymentId` (string) Payment through which this credit was applied - `data.applications.paymentKey` (string,null) - `data.applications.amount` (number, required) Amount applied - `data.applications.appliedAt` (string) - `data.qboId` (string,null) QuickBooks Online credit memo ID - `data.createdAt` (string, required) - `data.updatedAt` (string,null) - `data.voidedAt` (string,null) - `data.voidReason` (string,null) - `data.createdBy` (object) Enhanced reference to a user resource (returned in responses). Includes full user details in addition to id/key. Note: Does NOT include nested references (teams, etc.) to prevent recursion. Maximum nesting depth: 1 level. - `data.createdBy.id` (string, required) User UUID Example: "550e8400-e29b-41d4-a716-446655440000" - `data.createdBy.email` (string, required) User's email address Example: "john.doe@example.com" - `data.createdBy.name` (string,null) User's full name Example: "John Doe" - `data.createdBy.phone` (string,null) User's phone number Example: "+1-555-123-4567" - `data.createdBy.phoneExt` (string,null) Phone extension Example: "123" - `data.createdBy.status` (string, required) User account status Enum: "PENDING", "ACTIVE", "INACTIVE" - `data.createdBy.avatarId` (string,null) Profile avatar document ID Example: "7c9e6679-7425-40de-944b-e07fc1f90ae7" - `data.createdBy.createdAt` (string, required) When the user was created Example: "2025-01-15T10:00:00Z" - `data.createdBy.updatedAt` (string, required) When the user was last updated Example: "2025-01-15T14:30:00Z" - `data.createdBy.deletedAt` (string,null) When the user was soft deleted (null if active) - `pagination` (object, required) - `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