{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/joinways-app/json-schema/joinways-app-event-summary-schema.json",
  "title": "EventSummary",
  "description": "An event as listed (`GET /events`, and the `data` of the `event.*` webhooks). Amounts are `null` without `reports.view` or `quotes.manage`.",
  "x-generated": "2026-11-13",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/joinways-app-openapi.yml#/components/schemas/EventSummary",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "event_number": {
      "type": [
        "integer",
        "null"
      ]
    },
    "internal_reference": {
      "type": [
        "string",
        "null"
      ]
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": [
        "string",
        "null"
      ],
      "description": "Event type, e.g. dinner, wedding, seminar, cocktail."
    },
    "category": {
      "type": [
        "string",
        "null"
      ]
    },
    "status": {
      "$ref": "#/$defs/EventStatus"
    },
    "pax": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Number of guests."
    },
    "start_date": {
      "type": "string",
      "format": "date-time"
    },
    "end_date": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "selected_dates": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string",
        "format": "date"
      },
      "description": "Explicit non-contiguous days of a multi-day event that skips days. When set, `start_date` / `end_date` are the envelope; `null` means a plain contiguous range."
    },
    "day_hours": {
      "$ref": "#/$defs/DayHours"
    },
    "timezone": {
      "type": [
        "string",
        "null"
      ]
    },
    "flexible": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "Whether the client's dates are flexible."
    },
    "language": {
      "type": [
        "string",
        "null"
      ]
    },
    "budget": {
      "type": [
        "number",
        "null"
      ],
      "description": "Client budget. `null` without revenue access."
    },
    "expected_revenue": {
      "type": [
        "number",
        "null"
      ],
      "description": "Expected revenue. `null` without revenue access."
    },
    "confirmed_amount_excl_tax": {
      "type": [
        "number",
        "null"
      ],
      "description": "Confirmed amount excl. tax. `null` without revenue access."
    },
    "confirmed_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "currency": {
      "type": [
        "string",
        "null"
      ]
    },
    "venue_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid",
      "description": "The venue (internally `location_id`)."
    },
    "venue_name": {
      "type": [
        "string",
        "null"
      ]
    },
    "location_type": {
      "type": [
        "string",
        "null"
      ]
    },
    "location_city": {
      "type": [
        "string",
        "null"
      ]
    },
    "location_color": {
      "type": [
        "string",
        "null"
      ]
    },
    "company_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    },
    "company_name": {
      "type": [
        "string",
        "null"
      ]
    },
    "contact_person_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    },
    "contact_first_name": {
      "type": [
        "string",
        "null"
      ]
    },
    "contact_last_name": {
      "type": [
        "string",
        "null"
      ]
    },
    "contact_email": {
      "type": [
        "string",
        "null"
      ]
    },
    "contact_phone": {
      "type": [
        "string",
        "null"
      ]
    },
    "assigned_to_account_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid",
      "description": "The member the event is assigned to (`user_id` of `GET /team-members`)."
    },
    "assigned_to_name": {
      "type": [
        "string",
        "null"
      ]
    },
    "source": {
      "type": [
        "string",
        "null"
      ],
      "description": "Origin of the request, e.g. `platform:Kactus`, `email`, `api`."
    },
    "tags": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string"
      }
    },
    "archived_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "Set when the event is archived (read-only)."
    },
    "stage_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid",
      "description": "Custom stage of the workspace pipeline, under `status`."
    },
    "stage_name": {
      "type": [
        "string",
        "null"
      ]
    },
    "event_group_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid",
      "description": "Groups sibling events (alternative venue options for one client request)."
    },
    "created_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "updated_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    }
  },
  "$defs": {
    "DayHours": {
      "type": [
        "array",
        "null"
      ],
      "description": "Per-day hours of a multi-day event, by date: one entry per day when the days have different hours, `null` when every day has the same hours (the time of `start_date` to the time of `end_date`) or for a one-day event.",
      "items": {
        "$ref": "#/$defs/DayHoursEntry"
      }
    },
    "DayHoursEntry": {
      "type": "object",
      "required": [
        "date",
        "start",
        "end"
      ],
      "description": "The hours of one day, wall-clock in the event's `timezone`. An `end` at or before `start` ends the next morning (overnight), at 06:00 at the latest.",
      "properties": {
        "date": {
          "type": "string",
          "format": "date"
        },
        "start": {
          "type": "string",
          "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
        },
        "end": {
          "type": "string",
          "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
        }
      }
    },
    "EventStatus": {
      "type": "string",
      "enum": [
        "option",
        "confirmed",
        "lost",
        "cancelled"
      ],
      "description": "`option` = pending / tentative, `confirmed` = booked, `lost` = did not convert, `cancelled` = cancelled after booking."
    }
  }
}