The search group provides two complementary ways to discover products. The title search endpoint performs a case-insensitive regular expression match against theDocumentation 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.
title field, suitable for free-text keyword searches. The shirt-type filter endpoint accepts a numeric category code and returns only products whose typeShirt matches the corresponding label exactly. Both endpoints support pagination via optional path parameters and are accessible without authentication.
POST /api/product/search-product/:query/:pag?/:perpage?
Search the product catalog by keyword. Thequery path parameter is used as a case-insensitive regular expression pattern matched against the product title field.
Auth: Optional (token accepted but not required)
Path parameters
The search string to match against product titles. The value is interpreted as a case-insensitive regex pattern (e.g.
tee matches Classic Tee, TEE SHIRT, street-tee).Page number to retrieve. Defaults to
1 when omitted. Pages are 1-indexed.Number of results per page. Defaults to
10 when omitted.Responses
"Cargando producto" on success.true on success.Array of matching product objects, sorted by
_id descending (newest first). Each item has the same shape as a product returned by the List Products endpoint.Pagination metadata.
Error responses
| Status | Cause |
|---|---|
500 | Unexpected server error. |
Example
POST /api/product/get/by-shirt-types/:typeShirt/:pag?/:perpage?
Filter products by their shirt-type category using a numeric code. The code is mapped server-side to atypeShirt label and an exact-match database query is performed. This is useful for category landing pages or type-based navigation.
Auth: Optional (token accepted but not required)
Path parameters
A numeric code representing the shirt-type category. Valid values:
Any value outside the range
| Code | typeShirt label |
|---|---|
1 | Overside |
2 | CropTop |
3 | Regular Fit |
4 | Semi-Overside |
5 | Hoodie |
1–5 returns a 400 error.Page number to retrieve. Defaults to
1 when omitted. Pages are 1-indexed.Number of results per page. Defaults to
10 when omitted.Responses
"Cargando productos de tipo {typeShirt}" on success, where {typeShirt} is the resolved label (e.g. "Cargando productos de tipo Hoodie").true on success.Array of products whose
typeShirt field exactly matches the resolved label, sorted by _id descending (newest first). Each item has the same shape as a product returned by the List Products endpoint.Pagination metadata.
Error responses
| Status | msj | Cause |
|---|---|---|
400 | "Tipo de camiseta no válido" | The typeShirt path parameter does not map to a known category (valid range: 1–5). |
500 | (error object) | Unexpected server error. |
The
typeShirt parameter is treated as a number. Passing a non-numeric value (e.g. /get/by-shirt-types/abc) will resolve to NaN, which is not a valid key in the type map and will trigger the 400 error response.Example
5 (Hoodie):