# Filter bills Search for AP bills using filter criteria. ## Common Filters - By carrier: { "filter": { "carrierId": { "equalTo": "uuid" } } } - By vendor: { "filter": { "vendorId": { "equalTo": "uuid" } } } - Awaiting approval: { "filter": { "status": { "equalTo": "IN_REVIEW" } } } - By shipment: { "filter": { "shipmentId": { "equalTo": "uuid" } } } - Overdue: { "filter": { "overdue": true } } Endpoint: POST /bills/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.loadCarrierId` (object) Filter options for UUID fields (all operations) - `filter.vendedServiceId` (object) Filter options for UUID fields (all operations) - `filter.carrierId` (object) Filter options for UUID fields (all operations) - `filter.vendorId` (object) Filter options for UUID fields (all operations) - `filter.loadId` (object) Filter options for UUID fields (all operations) - `filter.shipmentId` (object) Filter options for UUID fields (all operations) - `filter.status` (object) - `filter.status.equalTo` (string) Current status of the bill (AP invoice). - AWAITING_INVOICE: Waiting for carrier/vendor to submit invoice - IN_REVIEW: Invoice received, under review - APPROVED_TO_PAY: Approved and ready for payment - PAID: Fully paid Enum: "AWAITING_INVOICE", "IN_REVIEW", "APPROVED_TO_PAY", "PAID" - `filter.status.notEqualTo` (string) Current status of the bill (AP invoice). - AWAITING_INVOICE: Waiting for carrier/vendor to submit invoice - IN_REVIEW: Invoice received, under review - APPROVED_TO_PAY: Approved and ready for payment - PAID: Fully paid Enum: "AWAITING_INVOICE", "IN_REVIEW", "APPROVED_TO_PAY", "PAID" - `filter.status.in` (array) Enum: "AWAITING_INVOICE", "IN_REVIEW", "APPROVED_TO_PAY", "PAID" - `filter.status.notIn` (array) Enum: "AWAITING_INVOICE", "IN_REVIEW", "APPROVED_TO_PAY", "PAID" - `filter.entityType` (object) - `filter.entityType.equalTo` (string) Type of entity the bill is for. - CARRIER: Bill for a carrier (LoadCarrier) - VENDOR: Bill for a vendor service (VendedService) Enum: "CARRIER", "VENDOR" - `filter.invoiceDate` (object) Filter options for datetime fields - `filter.invoiceDate.lessThan` (string) Before this datetime - `filter.invoiceDate.lessThanOrEqualTo` (string) On or before this datetime - `filter.invoiceDate.greaterThan` (string) After this datetime - `filter.invoiceDate.greaterThanOrEqualTo` (string) On or after this datetime - `filter.dueDate` (object) Filter options for datetime fields - `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.overdue` (boolean) Filter to overdue bills only - `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.friendlyId` (string, required) Human-readable bill ID Example: "BILL-00001" - `data.key` (string,null) Client-defined key - `data.entityType` (string, required) Type of entity the bill is for. - CARRIER: Bill for a carrier (LoadCarrier) - VENDOR: Bill for a vendor service (VendedService) Enum: "CARRIER", "VENDOR" - `data.loadCarrierId` (string,null) Associated load carrier ID (if carrier bill) - `data.vendedServiceId` (string,null) Associated vended service ID (if vendor bill) - `data.carrier` (object) Enhanced reference to a carrier resource (returned in responses). Includes full carrier details in addition to id/key. Note: Does NOT include nested references (contacts, etc.) to prevent recursion. Maximum nesting depth: 1 level. - `data.carrier.id` (string, required) Carrier UUID Example: "550e8400-e29b-41d4-a716-446655440000" - `data.carrier.key` (string,null) Client-defined reference ID if set Example: "ERP-CARRIER-SWIFT" - `data.carrier.name` (string, required) Carrier company name Example: "Swift Transportation" - `data.carrier.phoneNumber` (string,null) Primary phone number Example: "+1-555-987-6543" - `data.carrier.email` (string,null) Primary email address Example: "dispatch@swifttrans.com" - `data.carrier.createdAt` (string, required) When the carrier was created Example: "2025-01-15T10:00:00Z" - `data.carrier.updatedAt` (string, required) When the carrier was last updated Example: "2025-01-15T14:30:00Z" - `data.carrier.deletedAt` (string,null) When the carrier was soft deleted (null if active) - `data.vendor` (object) Enhanced reference to a vendor profile. Includes full vendor details in addition to id/key. - `data.vendor.id` (string, required) Vendor UUID Example: "550e8400-e29b-41d4-a716-446655440000" - `data.vendor.friendlyId` (string, required) Human-readable vendor identifier Example: "V123456" - `data.vendor.name` (string, required) Vendor legal name Example: "ABC Warehouse Services" - `data.vendor.phone` (string,null) Primary phone number Example: "+1-555-123-4567" - `data.vendor.status` (string,null) Vendor status Example: "ACTIVE" - `data.vendor.currency` (string,null) Preferred currency code (ISO 4217) Example: "USD" - `data.vendor.createdAt` (string, required) When the vendor was created Example: "2025-01-15T10:00:00Z" - `data.vendor.updatedAt` (string, required) When the vendor was last updated Example: "2025-01-15T14:30:00Z" - `data.loadId` (string,null) - `data.loadKey` (string,null) - `data.shipmentId` (string,null) - `data.shipmentKey` (string,null) - `data.status` (string, required) Current status of the bill (AP invoice). - AWAITING_INVOICE: Waiting for carrier/vendor to submit invoice - IN_REVIEW: Invoice received, under review - APPROVED_TO_PAY: Approved and ready for payment - PAID: Fully paid Enum: "AWAITING_INVOICE", "IN_REVIEW", "APPROVED_TO_PAY", "PAID" - `data.invoiceDate` (string,null) Date of carrier/vendor invoice - `data.dueDate` (string,null) Payment due date - `data.amount` (number, required) Bill amount - `data.currency` (string,null) Currency code Example: "USD" - `data.reference` (string,null) Carrier/vendor invoice reference number - `data.amountPaid` (number) Total payments received - `data.amountOwed` (number) Outstanding balance - `data.payments` (array) Payments applied to this bill - `data.payments.paymentGroupId` (string) - `data.payments.amount` (number) Amount applied to this bill - `data.payments.paymentDate` (string) - `data.payments.reference` (string,null) Check number, transaction ID, etc. - `data.paymentTerm` (object) Enhanced reference to a payment term resource (returned in responses). Includes full payment term details in addition to id/key. - `data.paymentTerm.id` (string, required) Payment term UUID Example: "550e8400-e29b-41d4-a716-446655440000" - `data.paymentTerm.name` (string, required) Payment term name Example: "Net 30" - `data.paymentTerm.description` (string,null) Payment term description or notes Example: "Payment due 30 days from invoice date" - `data.paymentTerm.days` (integer,null) Number of days until payment is due Example: 30 - `data.paymentTerm.quickPayFee` (number,null) Quick pay fee percentage (e.g., 0.05 for 5%) Example: 0.05 - `data.paymentTerm.apOnly` (boolean,null) Whether this payment term is for accounts payable only - `data.paymentTerm.doNotUse` (boolean,null) Flag to prevent using this payment term for new transactions - `data.paymentTerm.createdAt` (string, required) When the payment term was created Example: "2025-01-15T10:00:00Z" - `data.paymentTerm.updatedAt` (string, required) When the payment term was last updated Example: "2025-01-15T14:30:00Z" - `data.paymentTerm.deletedAt` (string,null) When the payment term was soft deleted (null if active) - `data.carrierFactor` (object) Enhanced reference to a carrier factor (factoring company). Includes full carrier factor details in addition to id/key. - `data.carrierFactor.id` (string, required) Carrier factor UUID Example: "550e8400-e29b-41d4-a716-446655440000" - `data.carrierFactor.companyName` (string, required) Factoring company legal name Example: "Capital Factoring Services Inc" - `data.carrierFactor.createdAt` (string, required) When the carrier factor was created Example: "2025-01-15T10:00:00Z" - `data.carrierFactor.updatedAt` (string, required) When the carrier factor was last updated Example: "2025-01-15T14:30:00Z" - `data.factorJobId` (string,null) External factoring job ID - `data.factorStatus` (string,null) Current factoring status - `data.qboId` (string,null) QuickBooks Online bill ID - `data.createdAt` (string, required) - `data.updatedAt` (string,null) - `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