Skip to main content
GET
/
api
/
v1
/
ventanas
List Ventanas
curl --request GET \
  --url https://api.example.com/api/v1/ventanas
{
  "success": true,
  "data": [
    {
      "id": "660e8400-e29b-41d4-a716-446655440000",
      "bancaId": "550e8400-e29b-41d4-a716-446655440000",
      "name": "Ventana Norte",
      "code": "VN001",
      "commissionMarginX": 1.5,
      "address": "789 North Avenue",
      "phone": "+1-234-567-8910",
      "email": "[email protected]",
      "isActive": true,
      "settings": {
        "print": {
          "width": 58
        },
        "theme": "light"
      },
      "createdAt": "2024-03-15T11:00:00Z",
      "updatedAt": "2024-03-15T11:00:00Z"
    }
  ],
  "meta": {
    "page": 1,
    "pageSize": 20,
    "total": 1,
    "totalPages": 1
  }
}

Overview

Retrieves a paginated list of ventanas (betting windows) with optional filtering.

Authorization

Required: Valid JWT token (all authenticated users)

Query Parameters

page
number
default:"1"
Page number (must be positive integer)
pageSize
number
default:"20"
Number of items per page (1-100)
Search term to filter ventanas (1-100 characters). Searches across name, code, email, phone, and address fields.
isActive
boolean
Filter by active status

Response

success
boolean
Indicates if the request was successful
data
array
Array of ventana objects
meta
object
Pagination metadata
{
  "success": true,
  "data": [
    {
      "id": "660e8400-e29b-41d4-a716-446655440000",
      "bancaId": "550e8400-e29b-41d4-a716-446655440000",
      "name": "Ventana Norte",
      "code": "VN001",
      "commissionMarginX": 1.5,
      "address": "789 North Avenue",
      "phone": "+1-234-567-8910",
      "email": "[email protected]",
      "isActive": true,
      "settings": {
        "print": {
          "width": 58
        },
        "theme": "light"
      },
      "createdAt": "2024-03-15T11:00:00Z",
      "updatedAt": "2024-03-15T11:00:00Z"
    }
  ],
  "meta": {
    "page": 1,
    "pageSize": 20,
    "total": 1,
    "totalPages": 1
  }
}

Notes

  • Search performs fuzzy matching using PostgreSQL trigram indexes
  • Soft-deleted ventanas are excluded from results
  • Response includes nested banca information
  • Implementation: src/api/v1/controllers/ventana.controller.ts:31-38

Build docs developers (and LLMs) love