Skip to main content
The portals module provides read-only APIs for building client-facing event portals. Clients can list all their active events (including zone configuration) and look up individual events by ID.

Functions

FunctionDescription
list_events_clientsList all active events for a given client ID
list_events_idLook up a specific event by its Firestore document ID

list_events_clients

Returns all active events (where status: true) owned by the given client, including full zone configuration from events/{id}/setup/zones.

Endpoint

POST https://{region}-{project}.cloudfunctions.net/list_events_clients

Request

data.client_id
string
required
The client’s ID. Events are filtered by client_id == client_id.
{
  "data": {
    "client_id": "client_abc"
  }
}

Response

data.eventos
array
Array of active event objects.
{
  "message": "Eventos del Cliente",
  "status": 200,
  "data": {
    "valido": true,
    "eventos": [
      {
        "event_id": "abc123",
        "client_id": "client_abc",
        "event_name": "Caracas Live 2025",
        "date_start": "2025-06-01T20:00:00Z",
        "date_end": "2025-06-02T00:00:00Z",
        "venue_name": "Poliedro de Caracas",
        "status": true,
        "zones": { "zone": [] }
      }
    ]
  }
}
No events found:
{
  "message": "Sin Eventos",
  "status": 400,
  "data": { "valido": false }
}

list_events_id

Looks up a single event by its Firestore document ID, returning full event details and zone configuration. Unlike list_events_clients, this scans all events and matches by document ID.

Endpoint

POST https://{region}-{project}.cloudfunctions.net/list_events_id

Request

data.event_id
string
required
The Firestore document ID of the event to look up.
{
  "data": {
    "event_id": "abc123"
  }
}

Response fields

Same fields as list_events_clients, but without type_metadata_main_activity / type_metadata_secondary_activity. Instead returns type_metadata_artist. Found:
{
  "message": "Evento encontrado",
  "status": 200,
  "data": {
    "valido": true,
    "eventos": [
      {
        "event_id": "abc123",
        "event_name": "Caracas Live 2025",
        "venue_name": "Poliedro de Caracas",
        "zones": { "zone": [] }
      }
    ]
  }
}
Not found:
{
  "message": "Evento no encotrado",
  "status": 400,
  "data": { "valido": false }
}
list_events_id performs a full collection scan and then filters in memory. For large event collections, list_events_clients with a client_id filter is more efficient.

Build docs developers (and LLMs) love