This page covers the four endpoints used to retrieve and export sales data. A buyer can list their own orders, admins can view and filter all sales across the platform, a dedicated search endpoint supports lookup by status name or customer identification, and an export endpoint generates a downloadableDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/fredy-rizo/ecommerce-delivery/llms.txt
Use this file to discover all available pages before exploring further.
.xlsx report using the same filters as the admin list.
1. List Own Sales
Returns a paginated list of sales belonging to the currently authenticated user.Endpoint
Authentication
Requires a valid user Token.Path Parameters
Page number to retrieve (optional, defaults to
1).Number of results per page (optional, uses server default if omitted).
Response — 200
Example Request
2. List All Sales (Admin)
Returns a paginated list of all sales across all users. Supports optional text search and month-based date filtering.Endpoint
Authentication
Requires a valid user Token.Path Parameters
Page number to retrieve (optional).
Number of results per page (optional).
Request Body (Optional Filters)
Free-text search string. Performs a case-insensitive regex match across the following fields:
name_client, lastName_client, typeIdentification, identification, phone_number, address, email, codeseller, zipCode, city, products.title, deliveryStatus.description, and status.name.Month filter in
"YYYY/MM" format (e.g., "2024/05"). Returns all sales whose createdAt timestamp falls within that calendar month.Response — 200
Example Request
3. Search Sales
Searches all sales by payment status name or customer identification number.Endpoint
Authentication
Requires a valid user Token and an admin TokenAdmin role.Path Parameters
The search string. Matched case-insensitively against
status.name and identification fields.Page number to retrieve (optional).
Number of results per page (optional).
Response — 200
Example Request
4. Export Sales to XLSX
Applies the same filters as the List All Sales endpoint and returns a downloadable Excel (.xlsx) file containing the full matching sales dataset.
Endpoint
Authentication
Requires a valid user Token.Request Body (Optional Filters)
Free-text search string (see List All Sales for matched fields).
Month filter in
"YYYY/MM" format.Response
Returns a binary file with content typeapplication/vnd.openxmlformats-officedocument.spreadsheetml.sheet.
The exported workbook contains a sheet named Sales Report with the following columns:
| Column Header | Source Field |
|---|---|
| Estado | status.name |
| Total | total |
| Domicilio | address |
| Ciudad | city |
| Codigo postal | zipCode |
| Fecha | createdAt |
| Correo | email |
| Tipo de identificacion | typeIdentification |
| Identification | identification |
| Nombre | name_client |
| Apellido | lastName_client |
| Telefono | phone_number |
The
.xlsx file is written to a temporary path (private/temp/{userId}/Sales_report.xlsx) on the server and is automatically deleted 60 seconds after it is sent. Download the file promptly after receiving the response.Example Request
Sale Response Object
Thedata array returned by the listing endpoints contains Sale documents. The full structure is described below.
Array of sale objects.
Pagination metadata.