Catalogs

Catalogs

GET /establishments/[establishmentId]/catalogs

Retrieves a list of prize catalogs for the specified establishment. Each catalog represents a collection of prizes organized by category.

Endpoint

GET/establishments/{establishmentId}/catalogs

Parameters

AtributoDescripcionTipoUbicaciónRequerido
establishmentIdstringpath

Responses

200

Catalogs fetched successfully.

[
  {
    "establishmentId": "string"
    "catalogId": "string"
    "category": "string"
    "name": "string"
    "productCount": "integer"
  }
]

500

Failed to retrieve catalogs due to server error.

POST /establishments/[establishmentId]/catalogs

Creates a new prize catalog for the given establishment. A catalog may optionally include an array of initial product IDs.

Endpoint

POST/establishments/{establishmentId}/catalogs

Request Body

{
  "name": "string" // required
  "category": "string" // required
  "productIds": "array"
}
AtributoTipoRequeridoDescripción
namestring
categorystring
productIdsarrayNo

Parameters

AtributoDescripcionTipoUbicaciónRequerido
establishmentIdstringpath

Responses

200

Catalog created successfully.

500

Server error while creating catalog.

GET /establishments/[establishmentId]/catalogs/[catalogId]

Fetches details for a specific catalog, including associated metadata and prize relationships.

Endpoint

GET/establishments/{establishmentId}/catalogs/{catalogId}

Parameters

AtributoDescripcionTipoUbicaciónRequerido
establishmentIdstringpath
catalogIdstringpath

Responses

200

Catalog and associated products retrieved successfully.

{
  "establishmentId": "string"
  "catalogId": "string"
  "category": "string"
  "name": "string"
  "products": "array"
}

400

Invalid catalog or establishment ID.

500

Failed to retrieve catalog or associated products.

PUT /establishments/[establishmentId]/catalogs/[catalogId]

Updates the catalog name or metadata for a given catalog ID. Typically used to rename or re-categorize the catalog.

Endpoint

PUT/establishments/{establishmentId}/catalogs/{catalogId}

Request Body

{
  "name": "string" // required
}
AtributoTipoRequeridoDescripción
namestring

Parameters

AtributoDescripcionTipoUbicaciónRequerido
establishmentIdstringpath
catalogIdstringpath

Responses

200

Catalog updated successfully.

500

Server error while updating catalog.

DELETE /establishments/[establishmentId]/catalogs/[catalogId]

Deletes a catalog by its ID. This action will detach all product associations linked to the catalog.

Endpoint

DELETE/establishments/{establishmentId}/catalogs/{catalogId}

Parameters

AtributoDescripcionTipoUbicaciónRequerido
establishmentIdstringpath
catalogIdstringpath

Responses

200

Catalog deleted successfully.

500

Server error while deleting catalog.

POST /establishments/[establishmentId]/catalogs/[catalogId]/products

Adds a batch of product IDs to the specified catalog. Useful for dynamically updating prize sets or rotating inventory.

Endpoint

POST/establishments/{establishmentId}/catalogs/{catalogId}/products

Request Body

{
  "productIds": "array" // required
}
AtributoTipoRequeridoDescripción
productIdsarray

Parameters

AtributoDescripcionTipoUbicaciónRequerido
establishmentIdstringpath
catalogIdstringpath

Responses

200

Products added to catalog successfully.

500

Server error while adding products to catalog.

DELETE /establishments/[establishmentId]/catalogs/[catalogId]/products/[productId]

Removes a specific product from the given catalog. Does not delete the product itself—only the catalog linkage.

Endpoint

DELETE/establishments/{establishmentId}/catalogs/{catalogId}/products/{productId}

Parameters

AtributoDescripcionTipoUbicaciónRequerido
establishmentIdstringpath
catalogIdstringpath
productIdstringpath

Responses

200

Product removed from catalog.

500

Failed to remove product from catalog.