The catalog read endpoints give you flexible ways to surface products: paginated full listings, keyword search, single-product lookups, and per-seller collections. All four endpoints useDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/fredy-rizo/Ecommerce/llms.txt
Use this file to discover all available pages before exploring further.
POST and return consistent response shapes with a pagination object when multiple records are involved. No authentication is required for public browsing except the seller-specific endpoint.
1. List All Products
Retrieve every product in the catalog, sorted newest-first by_id, with pagination.
| Property | Value |
|---|---|
| Method | POST |
| Path | /api/product/get-all-product/:pag?/:perpage? |
| Auth | None required |
Path Parameters
Page number to retrieve. Defaults to
1 when omitted.Number of products per page. Defaults to
10 when omitted.Response — 200 OK
Human-readable status message. Value:
"Cargando todos los productos".true on success.Array of product objects for the requested page, sorted by
_id descending.Pagination metadata for the current result set.
Examples
2. Search Products by Title
Search the catalog using a keyword query matched case-insensitively against product titles using a regular expression.| Property | Value |
|---|---|
| Method | POST |
| Path | /api/product/search-product/:query/:pag?/:perpage? |
| Auth | None required |
Path Parameters
Search keyword or phrase. Matched against the
title field using a case-insensitive regex (e.g. oxford matches "Classic Oxford Shirt").Page number to retrieve. Defaults to
1.Number of results per page. Defaults to
10.Response — 200 OK
Human-readable status message. Value:
"Cargando producto".true on success.Array of product objects whose
title matches the query string.Pagination metadata.
The search is powered by a MongoDB regex on the
title field, so it supports partial matches. Searching linen will match "Slim Fit Linen Shirt" and "Linen Weekend Shirt".Examples
3. Get Single Product by ID
Fetch the full details of one product by its MongoDB ObjectId. This endpoint requires no authentication and is suitable for public product detail pages.| Property | Value |
|---|---|
| Method | POST |
| Path | /api/product/get/:productId/productId |
| Auth | None required |
Path Parameters
The MongoDB ObjectId of the product to retrieve.
Response — 200 OK
Human-readable status message. Value:
"Cargando producto".true on success.Reference to the Mongoose
Product model, included in the response alongside data.The complete product document retrieved by
findById.Examples
4. Get Products by Seller
Retrieve all products created by a specific user, sorted by most recently created first. Requires a valid auth token.| Property | Value |
|---|---|
| Method | POST |
| Path | /api/product/my-products/:userId/:pag?/:perpage? |
| Auth | token-access: <jwt-token> required |
Path Parameters
The
_id of the user whose products you want to retrieve. The API filters products where user._id === userId.Page number. Defaults to
1.Items per page. Defaults to
10.Response — 200 OK
Human-readable status message. Value:
"Cargando mis productos".true on success.Products belonging to the specified user, sorted by
createdAt descending.Pagination metadata.