Products
GET /products
Retrieves all products associated with a specific establishment. Each product includes metadata, stock levels, pricing, and categorization.
Endpoint
Parameters
Atributo | Descripcion | Tipo | Ubicación | Requerido |
---|---|---|---|---|
establishment_id | string | query | Sí |
Responses
200
Products retrieved successfully.
[
{
"catalogs": "object"
"internalPrice": "number"
"extendedDescription": "string"
"status": "string"
"reserved": "integer"
"stock": "integer"
"name": "string"
"establishmentId": "string"
"weight": "integer"
"probability": "number"
"valueInEuros": "number"
"provider": "string"
"verificationDate": "string"
"featured": "boolean"
"productId": "string"
"visible": "boolean"
"certificate": "boolean"
"order": "number"
"isAdmin": "boolean"
"digital": "boolean"
"helpLink": "string"
"providerId": "string"
"additionalDetails": "string"
"medias": "array"
"height": "integer"
"year": "integer"
"verifiedBy": "string"
"category": "string"
"prizeCategory": "string"
"description": "string"
"price": "number"
"type": "string"
}
]
500
Server error while retrieving products.
POST /products
Creates a new product within the context of a given establishment. Products include detailed information such as name, price, category, verification metadata, and display configuration.
Endpoint
Request Body
{
"establishmentId": "string" // required
"stock": "integer" // required
"price": "number" // required
"internalPrice": "number"
"valueInEuros": "number" // required
"height": "integer"
"weight": "integer"
"name": "string" // required
"status": "string"
"description": "string" // required
"extendedDescription": "string" // required
"additionalDetails": "string" // required
"verificationDate": "string" // required
"verifiedBy": "string"
"providerId": "string"
"provider": "string"
"category": "string"
"type": "string"
"certificate": "boolean"
"isAdmin": "boolean"
"helpLink": "string"
"prizeCategory": "string" // required
"imageUrl": "string"
"featuredImageUrl": "string"
"featured": "boolean"
"digital": "boolean"
"medias": "array"
"year": "integer" // required
}
Atributo | Tipo | Requerido | Descripción |
---|---|---|---|
establishmentId | string | Sí | |
stock | integer | Sí | |
price | number | Sí | |
internalPrice | number | No | |
valueInEuros | number | Sí | |
height | integer | No | |
weight | integer | No | |
name | string | Sí | |
status | string (available, unavailable, booked, hidden, sold) | No | |
description | string | Sí | |
extendedDescription | string | Sí | |
additionalDetails | string | Sí | |
verificationDate | string | Sí | |
verifiedBy | string | No | |
providerId | string | No | |
provider | string | No | |
category | string | No | |
type | string | No | |
certificate | boolean | No | |
isAdmin | boolean | No | |
helpLink | string | No | |
prizeCategory | string (legendary, epic, rare, uncommon, common, virtual) | Sí | |
imageUrl | string | No | |
featuredImageUrl | string | No | |
featured | boolean | No | |
digital | boolean | No | |
medias | array | No | |
year | integer | Sí |
Responses
200
Product created successfully.
400
Invalid or incomplete product definition.
500
Failed to create product.
GET /products/[productId]
Retrieves the details of a specific product by its ID. Returns complete metadata, including category, availability, and configuration.
Endpoint
Parameters
Atributo | Descripcion | Tipo | Ubicación | Requerido |
---|---|---|---|---|
productId | string | path | Sí |
Responses
200
Product retrieved successfully.
{
"internalPrice": "number"
"visible": "boolean"
"extendedDescription": "string"
"certificate": "boolean"
"status": "string"
"reserved": "integer"
"stock": "integer"
"order": "number"
"name": "string"
"weight": "integer"
"establishmentId": "string"
"probability": "number"
"additionalDetails": "string"
"medias": "array"
"valueInEuros": "number"
"height": "integer"
"year": "integer"
"verifiedBy": "string"
"category": "string"
"verificationDate": "string"
"description": "string"
"price": "number"
"productId": "string"
"type": "string"
"isOwned": "boolean"
}
400
Invalid product ID.
404
Product not found.
500
Error retrieving product details.
PUT /products/[productId]
Updates a product by ID. Fields such as price, stock, and descriptions can be modified. Only valid product data should be submitted to avoid data integrity issues.
Endpoint
Request Body
{
"stock": "integer" // required
"price": "integer" // required
"internalPrice": "integer"
"valueInEuros": "number" // required
"height": "integer"
"weight": "integer"
"name": "string" // required
"status": "string"
"description": "string" // required
"extendedDescription": "string" // required
"additionalDetails": "string" // required
"verificationDate": "string" // required
"verifiedBy": "string"
"providerId": "string"
"provider": "string"
"category": "string"
"type": "string"
"certificate": "boolean"
"isAdmin": "boolean"
"helpLink": "string"
"prizeCategory": "string" // required
"imageUrl": "string"
"featuredImageUrl": "string"
"featured": "boolean"
"digital": "boolean"
"medias": "array"
"year": "integer" // required
}
Atributo | Tipo | Requerido | Descripción |
---|---|---|---|
stock | integer | Sí | |
price | integer | Sí | |
internalPrice | integer | No | |
valueInEuros | number | Sí | |
height | integer | No | |
weight | integer | No | |
name | string | Sí | |
status | string (available, unavailable, booked, hidden, sold) | No | |
description | string | Sí | |
extendedDescription | string | Sí | |
additionalDetails | string | Sí | |
verificationDate | string | Sí | |
verifiedBy | string | No | |
providerId | string | No | |
provider | string | No | |
category | string | No | |
type | string | No | |
certificate | boolean | No | |
isAdmin | boolean | No | |
helpLink | string | No | |
prizeCategory | string (legendary, epic, rare, uncommon, common, virtual) | Sí | |
imageUrl | string | No | |
featuredImageUrl | string | No | |
featured | boolean | No | |
digital | boolean | No | |
medias | array | No | |
year | integer | Sí |
Parameters
Atributo | Descripcion | Tipo | Ubicación | Requerido |
---|---|---|---|---|
productId | string | path | Sí |
Responses
200
Product updated successfully.
404
Product not found.
500
Failed to update product.
DELETE /products/[productId]
Deletes a product by its ID. This operation is irreversible and will remove the product from all associated catalogs and listings.
Endpoint
Parameters
Atributo | Descripcion | Tipo | Ubicación | Requerido |
---|---|---|---|---|
productId | string | path | Sí |
Responses
200
Product deleted successfully.
400
Invalid product ID.
404
Product not found.
500
Server error during deletion.
POST /exclusive
Requests an exclusive product lock or reservation for a limited time period. This may be used to provide VIP-only availability or time-sensitive rewards.
Endpoint
Request Body
{
"days": "number" // required
}
Atributo | Tipo | Requerido | Descripción |
---|---|---|---|
days | number | Sí |
Responses
200
Exclusive access granted or acknowledged.
400
Invalid exclusivity request.
500
Failed to process exclusivity request.