Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/fredy-rizo/tukit/llms.txt

Use this file to discover all available pages before exploring further.

The Get Product endpoint fetches a single product document from the database by its MongoDB ObjectId. Any authenticated user (not just admins) may call this endpoint to load a complete product record including its file URLs, pricing, category, creator snapshot, and Mongoose timestamps. If the product exists, it is returned in the data field. If the lookup fails — for example because the ID is malformed or the document has been deleted — the server returns HTTP 203 with a descriptive error message. Unexpected infrastructure errors return 500. POST /api/product/get/:productId/productId

Authentication

Every request must include a valid JWT in the token-access header. This endpoint does not require admin privileges, but authentication is still mandatory.
HeaderValueRequired
token-access<your JWT token>✅ Yes

Path Parameters

productId
string
required
The MongoDB ObjectId of the product to retrieve. This value is the _id returned when the product was created or when products are listed.

Request Body

No request body is required or expected for this endpoint.

Response

200 — Product Loaded

msj
string
"Cargando producto..."
status
boolean
true on a successful lookup.
data
object
The full product document for the requested ID.

Error Responses

StatusConditionstatus
203Product not found or MongoDB lookup failedfalse
500Unexpected server error
203 — Error Loading Product
{
  "msj": "Error al cargar producto",
  "status": false
}

Example

Replace <YOUR_TOKEN> with a valid JWT and <PRODUCT_ID> with the MongoDB ObjectId of the product you want to retrieve.
cURL
curl -X POST https://your-api-domain.com/api/product/get/665a1f2e8c4b2a001e3d9f01/productId \
  -H "token-access: <YOUR_TOKEN>"
Success Response
{
  "msj": "Cargando producto...",
  "status": true,
  "data": {
    "_id": "665a1f2e8c4b2a001e3d9f01",
    "title": "Club Deportivo Tigres 2025",
    "description": "Kit completo de uniforme para temporada 2025.",
    "category": "Uniforme",
    "price": 12.99,
    "archivoUrl": ["storage/product/23design.ai"],
    "imageUrl": ["storage/product/7preview.png"],
    "format": "AI",
    "shirtGif": ["storage/product/12shirt.gif"],
    "shortsGif": ["storage/product/45shorts.gif"],
    "typeProduct": "Pago",
    "discount": "Sin descuento",
    "discountPrice": "",
    "minCant": 1,
    "date": "2025-06-01T14:30:00.000Z",
    "user": {
      "_id": "664f0a1c3b2e1a001d2c8e00",
      "userName": "adminuser",
      "email": "admin@tukit.com",
      "roles": [{ "name": "admin", "value": "2" }],
      "activate": [{ "name": "active", "value": "true" }]
    },
    "createdAt": "2025-06-01T14:30:00.000Z",
    "updatedAt": "2025-06-02T09:15:00.000Z"
  }
}

Build docs developers (and LLMs) love