Skip to main content

Overview

Retrieve details of a specific multiplier, including its configuration and relationship to lotteries and sorteos.

Endpoint

GET /api/v1/multipliers/:id
Authorization: ADMIN only

Path Parameters

id
string
required
UUID of the multiplier

Response

success
boolean
Indicates if the request was successful
data
object
Multiplier details

Example

curl -X GET "https://api.example.com/api/v1/multipliers/550e8400-e29b-41d4-a716-446655440000" \
  -H "Authorization: Bearer YOUR_TOKEN"

Response Example

{
  "success": true,
  "data": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "loteriaId": "loteria-uuid",
    "name": "Base 80x",
    "valueX": 80,
    "kind": "NUMERO",
    "appliesToDate": null,
    "appliesToSorteoId": null,
    "isActive": true,
    "createdAt": "2025-01-01T00:00:00.000Z",
    "updatedAt": "2025-03-01T10:00:00.000Z",
    "deletedAt": null,
    "loteria": {
      "id": "loteria-uuid",
      "name": "Lotto",
      "code": "LOTTO"
    },
    "sorteo": null,
    "createdBy": {
      "id": "admin-uuid",
      "name": "Admin User",
      "username": "admin"
    }
  }
}

Error Responses

{
  "success": false,
  "error": "Multiplier not found",
  "code": "NOT_FOUND"
}

List Multipliers

View all multipliers

Update Multiplier

Modify multiplier

Create Multiplier

Create new multiplier

Implementation Details

From src/api/v1/controllers/multiplier.controller.ts:27-30:
async getById(req: AuthenticatedRequest, res: Response) {
  const r = await MultiplierService.getById(req.params.id);
  return res.json({ success: true, data: r });
}

Build docs developers (and LLMs) love