# Filter Sales Retrieve a paginated list of sales with filtering and ordering options. Endpoint: POST /easyflow/sales/list Version: 1.0 Security: bearerAuth ## Header parameters: - `x-fingerprint-id` (string, required) Unique device or session fingerprint identifier used for security and fraud prevention. - `business-id` (string, required) Business Identifier ## Query parameters: - `page` (string, required) Page number to access - `limit` (string, required) Number of items to be loaded per page ## Request fields (application/json): - `codes` (array) Filter by one or more coupon codes. - `email` (string) Filter by buyer email. - `name` (string) Filter by buyer name. - `initialDate` (string) Filter sales created after this date. - `endDate` (string) Filter sales created before this date. - `productName` (string) Filter by product name. - `status` (array) Filter by sale status. Enum: "pending", "paid", "partially-paid", "canceled", "reversed", "refunded", "charged-back", "delayed", "failed", "charged" - `initialValue` (number) Minimum transaction value filter. - `endValue` (number) Maximum transaction value filter. - `types` (array) Filter by payment types (credit-card, pix, bank-billet). - `productIds` (array) Filter by one or more product IDs. - `field` (string) Field used for text search across multiple sale attributes, such as buyer.name, buyer.email, buyer.document.number, items.name and items.id. - `orderBy` (object) Ordering configuration for the sales list. - `orderBy.orderByField` (string) Enum: "email", "product", "createdAt" - `orderBy.orderDirection` (string) Enum: "ASC", "DESC" ## Response 200 fields (application/json): - `statusCode` (integer) Example: 200 - `data` (object) - `data.sales` (object) - `data.sales.docs` (array) - `data.sales.docs.buyer` (object) - `data.sales.docs.buyer.address` (object) - `data.sales.docs.buyer.address.zipCode` (string) - `data.sales.docs.buyer.address.street` (string) - `data.sales.docs.buyer.address.number` (string) - `data.sales.docs.buyer.address.complement` (string) - `data.sales.docs.buyer.address.neighborhood` (string) - `data.sales.docs.buyer.address.city` (string) - `data.sales.docs.buyer.address.state` (string) - `data.sales.docs.buyer.customerId` (string) - `data.sales.docs.buyer.deliveryAddress` (object) - `data.sales.docs.buyer.document` (object) - `data.sales.docs.buyer.document.type` (string) Enum: "CPF", "CNPJ" - `data.sales.docs.buyer.email` (string) - `data.sales.docs.buyer.name` (string) - `data.sales.docs.buyer.phone` (object) - `data.sales.docs.buyer.phone.areaCode` (string) - `data.sales.docs.buyer.phone.ddd` (string) - `data.sales.docs.buyer.phone.isMobile` (boolean) - `data.sales.docs.buyer.userId` (string) - `data.sales.docs.status` (string) Enum: "pending", "paid", "partially-paid", "canceled", "reversed", "refunded", "charged-back", "delayed", "failed", "charged" - `data.sales.docs.totalValueInCents` (integer) - `data.sales.docs.paymentMethod` (array) - `data.sales.docs.createdAt` (string) - `data.sales.docs.totalFineValueInCents` (integer) - `data.sales.docs.totalInterestValueInCents` (integer) - `data.sales.docs.targetId` (string) - `data.sales.docs.description` (string) - `data.sales.docs.items` (array) - `data.sales.docs.receivers` (array) - `data.sales.docs.receivers.businessId` (string) - `data.sales.docs.receivers.commissionValueInCents` (integer) - `data.sales.docs.receivers.taxValueInCents` (integer) - `data.sales.currentPage` (integer) - `data.sales.hasNext` (boolean) - `data.sales.limit` (integer) - `data.sales.nextPage` (integer) - `data.sales.totalDocs` (integer) - `data.sales.totalPages` (integer) - `data.ticketsCount` (integer) - `data.totalTransactionValue` (integer) - `data.totalCommissions` (integer) ## Response 400 fields (application/json): - `message` (string) Invalid param: [] Example: "Invalid param: []" - `error` (string) Bad Request Example: "Bad Request" - `statusCode` (integer) 400 Example: 400 ## Response 401 fields (application/json): - `message` (string) Invalid field Example: "Unauthorized" - `error` (string) Unauthorized Example: "Unauthorized" - `statusCode` (integer) 401 Example: 401 ## Response 403 fields (application/json): - `message` (string) Forbidden resource Example: "Forbidden resource" - `error` (string) Forbidden Example: "Forbidden" - `statusCode` (integer) 403 Example: 403 ## Response 500 fields (application/json): - `message` (string) Internal server error Example: "Internal server error" - `error` (string) Internal Server Error Example: "Internal Server Error" - `statusCode` (integer) 500 Example: 500