openapi: "3.1.1"
servers:
  - url: https://api.tickettailor.com
    description: Default server
info:
  title: "Ticket Tailor API"
  version: "1.0"
tags:
  - name: Bundles
  - name: Check ins
  - name: Checkout forms
  - name: Discount codes
  - name: Events
  - name: Event series
  - name: Holds
  - name: Issued memberships
  - name: Issued tickets
  - name: Membership types
  - name: Orders
  - name: Overrides
  - name: Overview
  - name: Ping
  - name: Products
  - name: Stores
  - name: Ticket groups
  - name: Ticket types
  - name: Vouchers
  - name: Voucher codes
  - name: Waitlist Signups
paths:
  /v1/event_series:
    get:
      tags:
        - "Event series"
      operationId: getAllEventSeries
      summary: "List event series"
      description: "Returns all paginated event series"
      parameters:
        - $ref: "#/components/parameters/CreatedAt"
        - $ref: "#/components/parameters/CreatedAtGt"
        - $ref: "#/components/parameters/CreatedAtGte"
        - $ref: "#/components/parameters/CreatedAtLt"
        - $ref: "#/components/parameters/CreatedAtLte"
        - $ref: "#/components/parameters/Limit"
        - in: query
          name: status
          description: "A comma separated list of event series status. (e.g. draft, published)"
          schema:
            type: string
            enum: ["published", "draft", "sales_closed"]
        - $ref: "#/components/parameters/Name"
        - $ref: "#/components/parameters/Venue"
      responses:
        "200":
          description: "A successfully returned list of event series"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: "#/components/schemas/EventSeries"
                  links:
                    type: object
                    properties:
                      next:
                        type: string
                        nullable: true
                      previous:
                        type: string
                        nullable: true
                    example:
                      next: "/v1/event_series?starting_after=es_120"
                      previous: "/v1/event_series?ending_before=es_100"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []
    post:
      tags:
        - "Event series"
      operationId: createEventSeries
      summary: "Create an event series"
      description: "Creates a new event series"
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - name
              properties:
                access_code:
                  description: "Code to access a protected event series"
                  type: string
                  example: "password"
                country:
                  description: Country of the venue in ISO 3166 format
                  type: string
                  nullable: true
                  example: "GB"
                currency:
                  description: "Information about the currency the event series is configured to use"
                  type: string
                  enum:
                    [
                      gbp,
                      usd,
                      eur,
                      aud,
                      brl,
                      cad,
                      czk,
                      dkk,
                      hkd,
                      huf,
                      ils,
                      myr,
                      mxn,
                      nok,
                      nzd,
                      php,
                      pln,
                      sgd,
                      rub,
                      sek,
                      chf,
                      thb,
                      try,
                      aed,
                      all,
                      amd,
                      ang,
                      awg,
                      azn,
                      bam,
                      bbd,
                      bdt,
                      bgn,
                      bmd,
                      bnd,
                      bsd,
                      bwp,
                      bzd,
                      cdf,
                      cny,
                      dop,
                      dzd,
                      egp,
                      etb,
                      fjd,
                      gel,
                      gip,
                      gmd,
                      gyd,
                      htg,
                      idr,
                      inr,
                      jmd,
                      kes,
                      kgs,
                      khr,
                      kyd,
                      kzt,
                      lbp,
                      lkr,
                      lrd,
                      lsl,
                      mad,
                      mdl,
                      mkd,
                      mmk,
                      mnt,
                      mop,
                      mvr,
                      mwk,
                      mzn,
                      nad,
                      ngn,
                      npr,
                      pgk,
                      pkr,
                      qar,
                      ron,
                      rsd,
                      sar,
                      sbd,
                      scr,
                      sle,
                      sos,
                      szl,
                      tjs,
                      top,
                      ttd,
                      tzs,
                      uah,
                      uzs,
                      wst,
                      xcd,
                      yer,
                      zar,
                      zmw,
                    ]
                  example: "gbp"
                description:
                  description: "Description of the event series"
                  type: string
                  nullable: true
                  example: null
                max_tickets_sold_per_occurrence:
                  description: "Maximum quantity of tickets that can be sold across all ticket types"
                  type: integer
                  example: 10
                name:
                  description: "Name of the event series"
                  type: string
                  example: "Hackney Downs 2020 Tulip Festival"
                postal_code:
                  description: "Event series postal code"
                  type: string
                  example: "SW1 3BR"
                tickets_available_at:
                  description: Timestamp in UTC in seconds when tickets become available for purchase
                  type: integer
                  example: 1893511380
                tickets_available_at_message:
                  description: Message to show when tickets are not yet available to purchase. {countdown} is replaced with time remaining until tickets become available
                  type: string
                  example: Tickets are available in {countdown}
                tickets_unavailable_at:
                  description: Timestamp in UTC in seconds when tickets become unavailable for purchase
                  type: integer
                  example: 1893511380
                tickets_unavailable_at_message:
                  description: Message to show when tickets are unavailable to purchase
                  type: string
                  example: Tickets are no longer available
                online_platform:
                  description: "Specify the name of the online platform used when the event is held online-only. This enables each event occurrence to include a link to the online event."
                  type: string
                  example: "Zoom"
                  nullable: true
                venue:
                  description: "Venue name"
                  type: string
                  example: "Hackney Downs gardens"
                voucher_ids:
                  description: "List of applicable voucher IDs"
                  type: array
                  items:
                    description: "Voucher ID"
                    type: string
                  example: ["vo_123", "vo_345"]
                waitlist_active:
                  description: "Indicates whether waitlist is enabled for the event series"
                  type: string
                  enum: ["true", "no_tickets_available", "false"]
                  example: "true"
                waitlist_call_to_action:
                  description: "The text displayed on event action buttons and as a title above the waitlist format"
                  type: string
                  example: "Join waiting list"
                waitlist_event_page_text:
                  description: "Description above ticket waitlist form"
                  type: string
                  example: "Join our waiting list to be notified when tickets become available."
                waitlist_confirmation_message:
                  description: "Text shown to the user after they have signed up to the waitlist"
                  type: string
                  example: "Done! You are on the waiting list."
      responses:
        "201":
          description: "Successfully created a new event series"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/EventSeries"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []
  /v1/event_series/{event_series_id}:
    get:
      tags:
        - "Event series"
      operationId: getEventSeriesById
      summary: "Get a single event series"
      description: "Returns existing event series by ID"
      parameters:
        - in: path
          description: "The unique identifier for the existing event series"
          name: event_series_id
          required: true
          schema:
            type: string
      responses:
        "200":
          description: "Successfully returned the event series"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/EventSeries"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []
    post:
      tags:
        - "Event series"
      operationId: updateEventSeriesById
      summary: "Update an event series"
      description: "Updates an existing event series"
      parameters:
        - in: path
          description: "The unique identifier for event series"
          name: event_series_id
          required: true
          schema:
            type: string
      requestBody:
        required: false
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                access_code:
                  description: "Code to access a protected event series"
                  type: string
                  example: "password"
                call_to_action:
                  description: Call to action text used on the event series page
                  type: string
                country:
                  description: Country of the venue in ISO 3166 format
                  type: string
                  nullable: true
                currency:
                  description: Information about the currency the event series is configured to use
                  type: string
                  enum:
                    [
                      gbp,
                      usd,
                      eur,
                      aud,
                      brl,
                      cad,
                      czk,
                      dkk,
                      hkd,
                      huf,
                      ils,
                      myr,
                      mxn,
                      nok,
                      nzd,
                      php,
                      pln,
                      sgd,
                      rub,
                      sek,
                      chf,
                      thb,
                      try,
                      aed,
                      all,
                      amd,
                      ang,
                      awg,
                      azn,
                      bam,
                      bbd,
                      bdt,
                      bgn,
                      bmd,
                      bnd,
                      bsd,
                      bwp,
                      bzd,
                      cdf,
                      cny,
                      dop,
                      dzd,
                      egp,
                      etb,
                      fjd,
                      gel,
                      gip,
                      gmd,
                      gyd,
                      htg,
                      idr,
                      inr,
                      jmd,
                      kes,
                      kgs,
                      khr,
                      kyd,
                      kzt,
                      lbp,
                      lkr,
                      lrd,
                      lsl,
                      mad,
                      mdl,
                      mkd,
                      mmk,
                      mnt,
                      mop,
                      mvr,
                      mwk,
                      mzn,
                      nad,
                      ngn,
                      npr,
                      pgk,
                      pkr,
                      qar,
                      ron,
                      rsd,
                      sar,
                      sbd,
                      scr,
                      sle,
                      sos,
                      szl,
                      tjs,
                      top,
                      ttd,
                      tzs,
                      uah,
                      uzs,
                      wst,
                      xcd,
                      yer,
                      zar,
                      zmw,
                    ]
                  nullable: true
                description:
                  description: Description of the event series
                  type: string
                  nullable: true
                max_tickets_sold_per_occurrence:
                  description: "Maximum quantity of tickets that can be sold across all ticket types"
                  type: integer
                  example: 10
                name:
                  description: Name of the event series
                  type: string
                  nullable: true
                postal_code:
                  description: Postal code of the venue
                  type: string
                  nullable: true
                tickets_available_at:
                  description: Timestamp in UTC in seconds when tickets become available for purchase
                  type: integer
                tickets_available_at_message:
                  description: Message to show when tickets are not yet available to purchase. {countdown} is replaced with time remaining until tickets become available
                  type: string
                tickets_unavailable_at:
                  description: Timestamp in UTC in seconds when tickets become unavailable for purchase
                  type: integer
                  example: 1893511380
                tickets_unavailable_at_message:
                  description: Message to show when tickets are unavailable to purchase
                  type: string
                  example: Tickets are no longer available
                online_platform:
                  description: "Specify the name of the online platform used when the event is held online-only. This enables each event occurrence to include a link to the online event."
                  type: string
                  nullable: true
                venue:
                  description: Name of the venue
                  type: string
                  nullable: true
                voucher_ids:
                  description: An array of associated voucher ids.
                  type: object
                  nullable: true
                  additionalProperties:
                    type: string
                    properties:
                      voucher_id:
                        type: string
                      voucher_association:
                        description: "'1' = add to event series, '0' = remove from event series, '' = do nothing"
                        type: string
                  example: { "vo_123": 1, "vo_345": 1, "vo_567": 1 }
                waitlist_active:
                  description: "Indicates whether waitlist is enabled for the event series"
                  type: string
                  enum: ["true", "no_tickets_available", "false"]
                  example: "true"
                waitlist_call_to_action:
                  description: "The text displayed on event action buttons and as a title above the waitlist format"
                  type: string
                  example: "Join waiting list"
                waitlist_event_page_text:
                  description: "Description above ticket waitlist form"
                  type: string
                  example: "Join our waiting list to be notified when tickets become available."
                waitlist_confirmation_message:
                  description: "Text shown to the user after they have signed up to the waitlist"
                  type: string
                  example: "Done! You are on the waiting list."
              example:
                access_code: "password"
                call_to_action: "Buy tickets / Join the guestlist"
                country: "GB"
                currency: "gbp"
                description: "Event series description"
                name: "Event series name"
                postal_code: "SW1 3XY"
                tickets_available_at: 1893511380
                tickets_available_at_message: "Tickets are available in {countdown}"
                tickets_unavailable_at: 1893511381
                tickets_unavailable_at_message: "Tickets are no longer available"
                online_platform: "Zoom"
                venue: "Test venue name"
                voucher_ids: { "vo_123": "1", "vo_345": "0", "vo_567": "" }
                waitlist_active: "true"
                waitlist_call_to_action: "Join waiting list"
                waitlist_event_page_text: "Description above ticket waitlist form"
                waitlist_confirmation_message: "Done! You are on the waiting list."
      responses:
        "200":
          description: "Successfully update the event series"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/EventSeries"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []
    delete:
      tags:
        - "Event series"
      operationId: deleteEventSeriesById
      summary: "Delete an event series"
      description: "Delete event series and its associated events. This action is irreversible. The event series and its events will be permanently removed."
      parameters:
        - in: path
          description: "The unique identifier for event series"
          name: event_series_id
          required: true
          schema:
            type: string
      responses:
        "200":
          $ref: "#/components/responses/DeletedEventSeries"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []
  /v1/event_series/{event_series_id}/status:
    post:
      operationId: changeEventSeriesStatus
      summary: "Change event series status"
      description: "For the given event series ID, change its status"
      tags:
        - Event series
      parameters:
        - in: path
          name: event_series_id
          required: true
          schema:
            type: string
          description: "The unique identifier for the event series"
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - status
              properties:
                status:
                  description: "New event series status"
                  type: string
                  enum: ["DRAFT", "PUBLISHED", "CLOSE_SALES"]
      responses:
        "200":
          description: "Successfully updated the event series status"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/EventSeries"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []

  /v1/event_series/{event_series_id}/events:
    get:
      operationId: getAllEventOccurrences
      summary: "List event occurrences"
      description: "For the given event series ID, find all the associated events and list them"
      tags:
        - Event series
      parameters:
        - $ref: "#/components/parameters/StartAt"
        - $ref: "#/components/parameters/StartAtGt"
        - $ref: "#/components/parameters/StartAtGte"
        - $ref: "#/components/parameters/StartAtLt"
        - $ref: "#/components/parameters/StartAtLte"
        - $ref: "#/components/parameters/EndAt"
        - $ref: "#/components/parameters/EndAtGt"
        - $ref: "#/components/parameters/EndAtGte"
        - $ref: "#/components/parameters/EndAtLt"
        - $ref: "#/components/parameters/EndAtLte"
        - $ref: "#/components/parameters/StartingAfter"
        - $ref: "#/components/parameters/EndingBefore"
        - $ref: "#/components/parameters/Limit"
        - $ref: "#/components/parameters/OverrideId"
      responses:
        "200":
          description: "Successfully returned list of event occurrences"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: "#/components/schemas/EventOccurrence"
                  links:
                    type: object
                    properties:
                      next:
                        type: string
                        nullable: true
                      previous:
                        type: string
                        nullable: true
                    example:
                      next: "/v1/event_series/es_123/events?starting_after=ev_120"
                      previous: "/v1/event_series/es_123/events?ending_before=ev_100"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []
    post:
      operationId: createEventSeriesEvent
      summary: "Create an event occurrence"
      description: "For the given event series ID, create an event"
      tags:
        - Event series
      parameters:
        - in: path
          name: event_series_id
          required: true
          schema:
            type: string
          description: "The unique identifier for the event series"
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - start_date
                - end_date
              properties:
                end_date:
                  description: "Event end date in the YYYY-MM-dd format"
                  type: string
                  example: "2022-10-22"
                end_time:
                  description: "Event end time in the HH:ii:ss format"
                  type: string
                  example: "23:15:00"
                hidden:
                  description: "True, if the event is set to hidden. False otherwise"
                  type: boolean
                  enum: [true, false]
                  example: false
                online_link:
                  description: "URL of the online event"
                  type: string
                  example: "https://www.tickettailor.com"
                override_id:
                  description: "The ID of the override that needs to be applied against the event occurrence"
                  type: string
                  example: "ov_123"
                start_date:
                  description: "Event start date in the YYYY-MM-dd format"
                  type: string
                  example: "2022-10-21"
                start_time:
                  description: "Event start time in the HH:ii:ss format"
                  type: string
                  example: "19:15:00"
                unavailable:
                  description: "True, if the event is set to unavailable. False otherwise"
                  type: boolean
                  enum: [true, false]
                  example: true
                unavailable_status:
                  description: "Optional custom status message when the event is set to unavailable"
                  type: string
                  example: "This event is not available yet"
      responses:
        "201":
          description: "Successfully created a new event"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/EventOccurrence"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []
  /v1/event_series/{event_series_id}/events/{event_occurrence_id}:
    get:
      operationId: getEventOccurrenceById
      summary: "Get a single event occurrence"
      description: "Returns existing event occurrence by ID"
      tags:
        - Event series
      parameters:
        - in: path
          description: "The unique identifier for the existing event series"
          name: event_series_id
          required: true
          schema:
            type: string
        - in: path
          description: "The unique identifier for the existing event occurrence"
          name: event_occurrence_id
          required: true
          schema:
            type: string
      responses:
        "200":
          description: "Successfully returned the event occurrence"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/EventOccurrence"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []
    post:
      operationId: updateEventOccurrenceById
      summary: "Update an event occurrence"
      description: "Updates an existing event occurrence"
      tags:
        - Event series
      parameters:
        - in: path
          description: "The unique identifier for the existing event series"
          name: event_series_id
          required: true
          schema:
            type: string
        - in: path
          description: "The unique identifier for the existing event occurrence"
          name: event_occurrence_id
          required: true
          schema:
            type: string
      requestBody:
        required: false
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                end_date:
                  description: "Event end date in the YYYY-MM-dd format"
                  type: string
                  example: "2022-10-22"
                end_time:
                  description: "Event end time in the HH:ii:ss format"
                  type: string
                  example: "23:15:00"
                hidden:
                  description: "True, if the event is set to hidden. False otherwise"
                  type: boolean
                  enum: [true, false]
                  example: false
                online_link:
                  description: "URL of the online event"
                  type: string
                  example: "https://www.tickettailor.com"
                override_id:
                  description: "The ID of the override that needs to be applied against the event occurrence"
                  type: string
                  example: "ov_123"
                start_date:
                  description: "Event start date in the YYYY-MM-dd format"
                  type: string
                  example: "2022-10-21"
                start_time:
                  description: "Event start time in the HH:ii:ss format"
                  type: string
                  example: "19:15:00"
                unavailable:
                  description: "True, if the event is set to unavailable. False otherwise"
                  type: boolean
                  enum: [true, false]
                  example: true
                unavailable_status:
                  description: "Optional custom status message when the event is set to unavailable"
                  type: string
                  example: "This event is not available yet"
      responses:
        "200":
          description: "Successfully updated an event occurrence"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/EventOccurrence"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []
    delete:
      operationId: deleteEventOccurrenceById
      summary: "Delete an event occurrence"
      description: "Delete event occurrence, only if there are no associated orders. Otherwise, set it as hidden. This action is irreversible. The event occurrence will be permanentrly removed."
      tags:
        - Event series
      parameters:
        - in: path
          description: "The unique identifier for the existing event series"
          name: event_series_id
          required: true
          schema:
            type: string
        - in: path
          description: "The unique identifier for the existing event occurrence"
          name: event_occurrence_id
          required: true
          schema:
            type: string
      responses:
        "200":
          $ref: "#/components/responses/DeletedEventOccurrence"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []

  /v1/event_series/{event_series_id}/ticket_types:
    post:
      operationId: createTicketTypeForEventSeries
      summary: "Create a ticket type"
      description: "For the given event series ID, create a ticket type"
      tags:
        - Ticket types
      parameters:
        - in: path
          name: event_series_id
          required: true
          schema:
            type: string
          description: "The unique identifier for the event series"
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - name
                - price
                - quantity
              properties:
                access_code:
                  description: "Code to access a hidden ticket"
                  type: string
                  example: "secret_code_123"
                booking_fee:
                  description: "Optional booking fee which is charged per ticket type to the customer and the funds are paid to you. We would recommend charging no more than 10% of the ticket price."
                  type: integer
                  example: 155
                description:
                  description: "Description of the ticket type"
                  type: string
                  example: "General admission ticket"
                discounts:
                  description: "List of associated discount IDs"
                  type: array
                  items:
                    type: string
                  example: ["di_123", "di_456"]
                hide_after:
                  description: "Timestamp in seconds when the ticket type should be hidden until."
                  type: integer
                  example: 1744001007
                hide_until:
                  description: "Timestamp in seconds when the ticket type should be hidden after."
                  type: integer
                  example: 1744001007
                hide_when_sold_out:
                  description: "Hide the ticket when it has sold out"
                  type: boolean
                  example: ["true", "false"]
                max_per_order:
                  description: "Maximum number of tickets allowed per order"
                  type: integer
                  example: 20
                min_per_order:
                  description: "Minimum number of tickets allowed per order"
                  type: integer
                  example: 1
                name:
                  description: "Name of the ticket type"
                  type: string
                  example: "General Admission"
                price:
                  description: "Cost of the ticket type"
                  type: integer
                  example: 600
                quantity:
                  description: "Number of ticket types available for purchase"
                  type: integer
                  example: 55
                show_quantity_remaining:
                  type: string
                  enum: ["true", "false"]
                  description: Specifies whether to show the number of tickets still available
                show_quantity_remaining_less_than:
                  type: integer
                  description: Only show number of tickets still available when the available quantity is equal to or lower than this threshold
                status:
                  description: "Event series status"
                  type: string
                  enum:
                    [
                      "ON_SALE",
                      "SOLD_OUT",
                      "UNAVAILABLE",
                      "HIDDEN",
                      "ADMIN_ONLY",
                      "LOCKED",
                    ]
                group_id:
                  description: "ID of the group this ticket type belongs to"
                  type: string
                  example: "gt_54434"
      responses:
        "201":
          description: "Successfully created a ticket type"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TicketType"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []
  /v1/event_series/{event_series_id}/ticket_types/{ticket_type_id}:
    post:
      operationId: updateTicketTypeById
      summary: "Update a ticket type"
      description: "Update existing ticket type"
      tags:
        - Ticket types
      parameters:
        - in: path
          name: event_series_id
          description: "The unique identifier for the event series"
          required: true
          schema:
            type: string
        - in: path
          name: ticket_type_id
          description: "The unique identifier for the ticket type"
          required: true
          schema:
            type: string
      requestBody:
        required: false
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                access_code:
                  description: "Code to access a hidden ticket"
                  type: string
                  example: "secret_code_123"
                booking_fee:
                  description: "Optional booking fee which is charged per ticket type to the customer and the funds are paid to you. We would recommend charging no more than 10% of the ticket price."
                  type: integer
                  example: 155
                description:
                  description: "Description of the ticket type"
                  type: string
                  example: "General admission ticket"
                discounts:
                  description: An array of associated discount ids.
                  type: object
                  nullable: true
                  additionalProperties:
                    type: string
                    properties:
                      discount_id:
                        type: string
                      discount_association:
                        description: "'1' = add to ticket type, '0' = remove from ticket type, '' = do nothing"
                        type: string
                  example: { "di_123": "1", "di_456": "1" }
                hide_after:
                  description: "Timestamp in seconds when the ticket type should be hidden until."
                  type: integer
                  example: 1744001007
                hide_until:
                  description: "Timestamp in seconds when the ticket type should be hidden after."
                  type: integer
                  example: 1744001007
                hide_when_sold_out:
                  description: "Hide the ticket when it has sold out"
                  type: boolean
                  example: ["true", "false"]
                max_per_order:
                  description: "Maximum number of tickets allowed per order"
                  type: integer
                  example: 20
                min_per_order:
                  description: "Minimum number of tickets allowed per order"
                  type: integer
                  example: 1
                modify_quantity:
                  description: "Number of ticket types to add or remove. The number should be preceded by a + or - sign"
                  type: string
                  example: +10
                name:
                  description: "Name of the ticket type"
                  type: string
                  example: "General Admission"
                price:
                  description: "Cost of the ticket type"
                  type: integer
                  example: 600
                show_quantity_remaining:
                  type: string
                  enum: ["true", "false"]
                  description: Specifies whether to show the number of tickets still available
                show_quantity_remaining_less_than:
                  type: integer
                  description: Only show number of tickets still available when the available quantity is equal to or lower than this threshold
                status:
                  description: "Event series status"
                  type: string
                  enum:
                    [
                      "ON_SALE",
                      "SOLD_OUT",
                      "UNAVAILABLE",
                      "HIDDEN",
                      "ADMIN_ONLY",
                      "LOCKED",
                    ]
                zero_tickets:
                  description: "Set the number of available tickets to zero"
                  type: string
                  enum: ["true", "false"]
                group_id:
                  description: "ID of the group this ticket type belongs to"
                  type: string
                  example: "gt_54434"
      responses:
        "200":
          description: "Successfully updated the ticket type"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TicketType"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []
    delete:
      operationId: deleteTicketTypeById
      summary: "Delete a ticket type"
      description: "Delete a ticket type. This action is irreversible. The event occurrence will be permanentrly removed."
      tags:
        - Ticket types
      parameters:
        - in: path
          name: event_series_id
          description: "The unique identifier for the event series"
          required: true
          schema:
            type: string
        - in: path
          name: ticket_type_id
          description: "The unique identifier for the ticket type"
          required: true
          schema:
            type: string
      responses:
        "200":
          $ref: "#/components/responses/DeletedTicketType"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []
  /v1/event_series/{event_series_id}/ticket_groups:
    post:
      operationId: createTicketGroupForEventSeries
      summary: "Create a ticket group"
      description: "For the given event series ID, create a ticket group"
      tags:
        - Ticket groups
      parameters:
        - in: path
          name: event_series_id
          required: true
          schema:
            type: string
          description: "The unique identifier for the event series"
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - name
              properties:
                bundle_ids:
                  type: array
                  nullable: true
                  items:
                    type: string
                  example: ["bu_123", "bu_456"]
                  description: "An array of bundle ids that are in the group"
                name:
                  description: "Name of the ticket group"
                  type: string
                  example: "Family ticket group"
                max_per_order:
                  description: "Maximum number of tickets allowed per order"
                  type: integer
                  nullable: true
                  example: 20
                max_quantity:
                  type: integer
                  description: "Maximum quantity of tickets that are allowed to be sold for the tickets in the group"
                  nullable: true
                  example: 100
                min_per_order:
                  type: integer
                  description: "Minimum number of tickets allowed per order"
                  nullable: true
                  example: 1
                ticket_type_ids:
                  type: array
                  items:
                    type: string
                  example: ["tt_123", "tt_456"]
                  nullable: true
                  description: "An array of ticket type ids that are in the group"
      responses:
        "201":
          description: "Successfully created a ticket group"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TicketGroup"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []
  /v1/event_series/{event_series_id}/ticket_groups/{ticket_group_id}:
    post:
      operationId: updateTicketGroupById
      summary: "Update a ticket group"
      description: "Update existing ticket group"
      tags:
        - Ticket groups
      parameters:
        - in: path
          name: event_series_id
          description: "The unique identifier for the event series"
          required: true
          schema:
            type: string
        - in: path
          name: ticket_group_id
          description: "The unique identifier for the ticket group"
          required: true
          schema:
            type: string
      requestBody:
        required: false
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                bundle_ids:
                  type: array
                  items:
                    type: string
                  example: ["bu_123", "bu_456"]
                  nullable: true
                  description: "An array of bundle ids that are in the group"
                name:
                  type: string
                  description: "Name of the ticket group"
                  nullable: true
                  example: "Family ticket group"
                max_per_order:
                  description: "Maximum number of tickets allowed per order"
                  type: integer
                  nullable: true
                  example: 20
                max_quantity:
                  type: integer
                  description: "Maximum quantity of tickets that are allowed to be sold for the tickets in the group"
                  nullable: true
                  example: 100
                min_per_order:
                  type: integer
                  description: "Minimum number of tickets allowed per order"
                  nullable: true
                  example: 1
                ticket_type_ids:
                  type: array
                  items:
                    type: string
                  example: ["tt_123", "tt_456"]
                  nullable: true
                  description: "An array of ticket type ids that are in the group"
      responses:
        "200":
          description: "Successfully updated the ticket group"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TicketGroup"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []
    delete:
      operationId: deleteTicketGroupById
      summary: "Delete a ticket group"
      description: "Delete a ticket group. This action is irreversible. Any ticket types and bundles in the group will be removed from the group."
      tags:
        - Ticket groups
      parameters:
        - in: path
          name: event_series_id
          description: "The unique identifier for the event series"
          required: true
          schema:
            type: string
        - in: path
          name: ticket_group_id
          description: "The unique identifier for the ticket group"
          required: true
          schema:
            type: string
      responses:
        "200":
          $ref: "#/components/responses/DeletedTicketGroup"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []
  /v1/event_series/{event_series_id}/bundles:
    post:
      operationId: createEventSeriesBundle
      summary: "Create a bundle"
      description: "For the given event series ID, create a bundle"
      tags:
        - Bundles
      parameters:
        - in: path
          name: event_series_id
          required: true
          schema:
            type: string
          description: "The unique identifier for the event series"
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - name
                - price
                - description
                - ticket_type_ids
              properties:
                access_code:
                  description: "Code to access a bundle"
                  type: string
                  example: secret_code_123
                booking_fee:
                  description: "Optional booking fee which is charged per bundle to the customer and the funds are paid to you. We would recommend charging no more than 10% of the bundle price."
                  type: integer
                  example: 155
                description:
                  description: "Bundle description"
                  type: string
                  example: "This is a family bundle"
                name:
                  description: "Bundle name"
                  type: string
                  example: "Family bundle"
                price:
                  description: "Cost of the bundle"
                  type: integer
                  example: 600
                product_ids:
                  description: "An array of associated product IDs and quantities"
                  type: object
                  additionalProperties:
                    properties:
                      product_id:
                        type: string
                      quantity:
                        type: integer
                  example: { "pr_1": 1, "pr_2": 3 }
                status:
                  description: "Bundle status"
                  enum:
                    [ADMIN_ONLY, HIDDEN, LOCKED, SOLD_OUT, ON_SALE, UNAVAILABLE]
                  example: "ON_SALE"
                ticket_type_ids:
                  description: "An array of associated ticket type IDs and quantities"
                  type: object
                  additionalProperties:
                    properties:
                      ticket_type_id:
                        type: string
                      quantity:
                        type: integer
                  example: { "tt_1": 1, "tt_2": 12 }
      responses:
        "201":
          description: "Successfully created a bundle"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Bundle"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []
  /v1/event_series/{event_series_id}/bundles/{bundle_id}:
    post:
      operationId: updateEventSeriesBundle
      summary: "Update a bundle"
      description: "Update existing bundle"
      tags:
        - Bundles
      parameters:
        - in: path
          name: event_series_id
          description: "The unique identifier for the event series"
          required: true
          schema:
            type: string
        - in: path
          name: bundle_id
          description: "The unique identifier for the bundle"
          required: true
          schema:
            type: string
      requestBody:
        required: false
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                access_code:
                  description: "Code to access a bundle"
                  type: string
                  example: secret_code_123
                booking_fee:
                  description: "Optional booking fee which is charged per bundle to the customer and the funds are paid to you. We would recommend charging no more than 10% of the bundle price."
                  type: integer
                  example: 155
                description:
                  description: "Bundle description"
                  type: string
                  example: "This is a family bundle"
                name:
                  description: "Bundle name"
                  type: string
                  example: "Family bundle"
                price:
                  description: "Cost of the bundle"
                  type: integer
                  example: 600
                product_ids:
                  description: "An array of associated product IDs and quantities"
                  type: object
                  additionalProperties:
                    properties:
                      product_id:
                        type: string
                      quantity:
                        type: integer
                  example: { "pr_1": 1, "pr_2": 3 }
                status:
                  description: "Bundle status"
                  enum:
                    [ADMIN_ONLY, HIDDEN, LOCKED, SOLD_OUT, ON_SALE, UNAVAILABLE]
                  example: "ON_SALE"
                ticket_type_ids:
                  description: "An array of associated ticket type IDs and quantities"
                  type: object
                  additionalProperties:
                    properties:
                      ticket_type_id:
                        type: string
                      quantity:
                        type: integer
                  example: { "tt_1": 1, "tt_2": 12 }
      responses:
        "200":
          description: "Successfully updated the bundle"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Bundle"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []
    delete:
      operationId: deleteEventSeriesBundle
      summary: "Delete a bundle"
      description: "Delete a bundle. This action is irreversible. The bundle will be permanently removed."
      tags:
        - Bundles
      parameters:
        - in: path
          name: event_series_id
          description: "The unique identifier for the event series"
          required: true
          schema:
            type: string
        - in: path
          name: bundle_id
          description: "The unique identifier for the bundle"
          required: true
          schema:
            type: string
      responses:
        "200":
          $ref: "#/components/responses/DeletedBundle"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []
  /v1/event_series/{event_series_id}/overrides:
    get:
      operationId: getEventSeriesOverrideList
      summary: "List event series overrides"
      description: "Returns a paginated list of overrides"
      tags:
        - Overrides
      parameters:
        - $ref: "#/components/parameters/Limit"
        - $ref: "#/components/parameters/CreatedAt"
        - $ref: "#/components/parameters/CreatedAtGt"
        - $ref: "#/components/parameters/CreatedAtGte"
        - $ref: "#/components/parameters/CreatedAtLt"
        - $ref: "#/components/parameters/CreatedAtLte"
        - $ref: "#/components/parameters/OverrideReferenceId"
        - $ref: "#/components/parameters/OverrideReferenceType"
        - $ref: "#/components/parameters/OverrideStatus"
      responses:
        "200":
          description: "A successfully returned list of overrides"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: "#/components/schemas/Override"
                  links:
                    type: object
                    properties:
                      next:
                        type: string
                        nullable: true
                      previous:
                        type: string
                        nullable: true
                    example:
                      next: "/v1/event_series/es_123/overrides?starting_after=ov_120"
                      previous: "/v1/event_series/es_123/overrides?ending_before=ov_100"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []
    post:
      operationId: createEventSeriesOverride
      summary: "Create an override"
      description: "For the given event series ID, create an override"
      tags:
        - Overrides
      parameters:
        - in: path
          name: event_series_id
          required: true
          schema:
            type: string
          description: "The unique identifier for the event series"
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - name
                - override_lines
              properties:
                max_sellable_tickets:
                  description: "Maximum number of sellable tickets"
                  type: integer
                  example: 15
                name:
                  description: "Override name"
                  type: string
                  example: "Test override"
                override_lines:
                  description: 'An array of associated ticket types (prefix id with "tt_"), ticket groups (prefix id with "tg_") or bundles (prefix id with "bu_").'
                  type: object
                  properties:
                    "{{id}}":
                      type: object
                      properties:
                        price:
                          type: integer
                          description: "Price in cents"
                        quantity:
                          type: integer
                          description: "Quantity of tickets"
                        status:
                          type: string
                          enum:
                            [
                              "ON_SALE",
                              "HIDDEN",
                              "SOLD_OUT",
                              "UNAVAILABLE",
                              "ADMIN_ONLY",
                            ]
              example:
                max_sellable_tickets: 1
                name: test
                override_lines:
                  tt_123:
                    price: 599
                    quantity: 45
                  tg_345:
                    status: "ON_SALE"
      responses:
        "201":
          description: "Successfully created an override"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Override"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []
  /v1/event_series/{event_series_id}/overrides/{override_id}:
    post:
      operationId: updateEventSeriesOverride
      summary: "Update an override"
      description: "Update existing override"
      tags:
        - Overrides
      parameters:
        - in: path
          name: event_series_id
          description: "The unique identifier for the event series"
          required: true
          schema:
            type: string
        - in: path
          name: override_id
          description: "The unique identifier for the override"
          required: true
          schema:
            type: string
      requestBody:
        required: false
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                max_sellable_tickets:
                  description: "Maximum number of sellable tickets"
                  type: integer
                  example: 15
                name:
                  description: "Override name"
                  type: string
                  example: "Test override"
                override_lines:
                  description: 'An array of associated ticket types (prefix id with "tt_"), ticket groups (prefix id with "tg_") or bundles (prefix id with "bu_").'
                  type: object
                  properties:
                    "{{id}}":
                      type: object
                      properties:
                        price:
                          type: integer
                          description: "Price in cents"
                        quantity:
                          type: integer
                          description: "Quantity of tickets"
                        status:
                          type: string
                          enum:
                            [
                              "ON_SALE",
                              "HIDDEN",
                              "SOLD_OUT",
                              "UNAVAILABLE",
                              "ADMIN_ONLY",
                            ]
              example:
                max_sellable_tickets: 1
                name: test
                override_lines:
                  tt_123:
                    price: 599
                    quantity: 45
                  tg_345:
                    status: "ON_SALE"
      responses:
        "200":
          description: "Successfully updated the override"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Override"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []
  /v1/event_series/{event_series_id}/waitlist_signups:
    get:
      operationId: getEventSeriesWaitlistList
      summary: "List event series waitlist signups"
      description: "Returns a paginated list of waitlist signups"
      tags:
        - Waitlist Signups
      parameters:
        - $ref: "#/components/parameters/Limit"
        - $ref: "#/components/parameters/CreatedAt"
        - $ref: "#/components/parameters/CreatedAtGt"
        - $ref: "#/components/parameters/CreatedAtGte"
        - $ref: "#/components/parameters/CreatedAtLt"
        - $ref: "#/components/parameters/CreatedAtLte"
        - $ref: "#/components/parameters/Notified"
        - $ref: "#/components/parameters/Email"
        - $ref: "#/components/parameters/EventIds"
      responses:
        "200":
          description: "A successfully returned list of waitlist signups"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: "#/components/schemas/WaitlistSignup"
                  links:
                    type: object
                    properties:
                      next:
                        type: string
                        nullable: true
                      previous:
                        type: string
                        nullable: true
                    example:
                      next: "/v1/event_series/es_123/waitlist_signups?starting_after=ws_120"
                      previous: "/v1/event_series/es_123/overrides?waitlist_signups=ws_100"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []
  /v1/event_series/{event_series_id}/waitlist_signup/{waitlist_signup_id}:
    delete:
      operationId: deleteEventSeriesWaitlist
      summary: "Delete event series waitlist signup"
      description: "Deletes a waitlist signup. This action is irreversible."
      tags:
        - Waitlist Signups
      parameters:
        - in: path
          name: event_series_id
          description: "The unique identifier for the event series that the waitlist signup is part of"
          required: true
          schema:
            type: string
        - in: path
          name: waitlist_signup_id
          description: "The unique identifier for the waitlist signup"
          required: true
          schema:
            type: string
      responses:
        "200":
          $ref: "#/components/responses/DeletedWaitlistSignup"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []

  /v1/orders:
    get:
      operationId: getAllOrders
      summary: "List orders"
      description: "Returns a list of orders belonging to box office"
      tags:
        - Orders
      parameters:
        - $ref: "#/components/parameters/CreatedAt"
        - $ref: "#/components/parameters/CreatedAtGt"
        - $ref: "#/components/parameters/CreatedAtGte"
        - $ref: "#/components/parameters/CreatedAtLt"
        - $ref: "#/components/parameters/CreatedAtLte"
        - $ref: "#/components/parameters/StartingAfter"
        - $ref: "#/components/parameters/EndingBefore"
        - $ref: "#/components/parameters/Limit"
        - in: query
          name: name
          schema:
            type: string
          description: "The first, last or full name of the buyer"
        - in: query
          name: email
          schema:
            type: string
          description: "The email of the buyer"
        - in: query
          name: txn_id
          schema:
            type: string
          description: "The transaction id"
        - in: query
          name: barcode
          schema:
            type: string
          description: "The ticket barcode"
        - in: query
          name: event_id
          schema:
            type: string
          description: "Comma separated list of event ids"
        - in: query
          name: event_series_id
          schema:
            type: string
          description: "Comma separated list of event series ids"
        - in: query
          name: status
          schema:
            type: string
            enum: ["completed", "pending", "canceled"]
          description: "The order status"
        - in: query
          name: store_id
          schema:
            type: string
          description: "The store id prefixed with 'st_'"
        - in: query
          name: referral_tag
          schema:
            type: string
          description: "The tag that tracks where sales originated"
      responses:
        "200":
          description: "A successfully returned list of orders"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: "#/components/schemas/Order"
                  links:
                    type: object
                    properties:
                      next:
                        type: string
                        nullable: true
                      previous:
                        type: string
                        nullable: true
                    example:
                      next: "/v1/orders?starting_after=or_120"
                      previous: "/v1/orders?ending_before=or_100"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []
  /v1/orders/{order_id}:
    get:
      operationId: getOrderById
      summary: "Get a single order"
      description: "Returns an order belonging to the box office"
      tags:
        - Orders
      parameters:
        - in: path
          name: order_id
          schema:
            type: string
          required: true
          description: "The unique identifier for the order"
      responses:
        "200":
          description: "A successfully returned order"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Order"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []
    post:
      operationId: updateOrderById
      summary: "Update an order"
      description: "Updates an existing order"
      tags:
        - Orders
      parameters:
        - in: path
          name: order_id
          schema:
            type: string
          required: true
          description: "The unique identifier for the order"
      requestBody:
        required: false
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                address_1:
                  description: The first line of the address.
                  type: string
                  nullable: true
                address_2:
                  description: The second line of the address.
                  type: string
                  nullable: true
                address_3:
                  description: The third line of the address.
                  type: string
                  nullable: true
                email:
                  description: Buyer email address
                  type: string
                  nullable: true
                first_name:
                  description: Buyer first name
                  type: string
                  nullable: true
                last_name:
                  description: Buyer last name
                  type: string
                  nullable: true
                phone:
                  description: Buyer phone number
                  type: string
                  nullable: true
                postal_code:
                  description: Postal code, zip code or postcode
                  type: string
                  nullable: true
              example:
                address_1: "Test address 1"
                email: "test@test.com"
                first_name: "Test"
                last_name: "User"
                phone: "+44123456789"
                postal_code: "SW1 4RT"
      responses:
        "200":
          description: "Successfully updated the order"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Order"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []
  /v1/orders/{order_id}/confirm-payment-received:
    post:
      operationId: confirmPaymentRecieved
      summary: "Confirm an offline payment has been paid"
      description: "Confirm an offline payment has been paid"
      tags:
        - Orders
      parameters:
        - in: path
          name: order_id
          schema:
            type: string
          required: true
          description: "The unique identifier for the order"
      requestBody:
        required: false
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                transaction_id:
                  description: The transaction ID of the payment.
                  type: string
                  nullable: true
              example:
                transaction_id: "OFF_PLATFORM_12345678"
      responses:
        "200":
          $ref: "#/components/responses/ConfirmPaymentReceived"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []

  /v1/overview:
    get:
      operationId: getOverview
      summary: "Displays an overview for the Box Office"
      description: "This endpoint will show statistics information on the user's Box Office"
      tags:
        - Overview
      parameters:
      responses:
        "200":
          description: "Successfully returned statistics information"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Overview"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []

  /v1/issued_tickets:
    get:
      operationId: getAllIssuedTickets
      summary: "List issued tickets"
      description: "Returns all issued tickets"
      tags:
        - Issued tickets
      parameters:
        - in: query
          name: event_id
          schema:
            type: string
          description: "The ID of the event to filter issued tickets for"
        - in: query
          name: event_series_id
          schema:
            type: string
          description: "The ID of the event series to filter issued tickets for"
        - in: query
          name: order_id
          schema:
            type: string
          description: "The ID of the order to filter issued tickets for"
        - in: query
          name: barcode
          schema:
            type: string
          description: "The barcode of the issued ticket"
        - in: query
          name: name
          schema:
            type: string
          description: "The name of the person attending an event"
        - in: query
          name: email
          schema:
            type: string
          description: "The email of the person attending an event"
        - in: query
          name: reference
          schema:
            type: string
          description: "The imported reference of the ticket"
        - in: query
          name: status
          schema:
            type: string
            enum: ["valid", "voided"]
          description: "The status of the issued ticket"
        - $ref: "#/components/parameters/CreatedAt"
        - $ref: "#/components/parameters/CreatedAtGt"
        - $ref: "#/components/parameters/CreatedAtGte"
        - $ref: "#/components/parameters/CreatedAtLt"
        - $ref: "#/components/parameters/CreatedAtLte"
        - $ref: "#/components/parameters/StartingAfter"
        - $ref: "#/components/parameters/EndingBefore"
        - $ref: "#/components/parameters/Limit"
      responses:
        "200":
          description: "A successfully returned issued ticket"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: "#/components/schemas/IssuedTicket"
                  links:
                    type: object
                    properties:
                      next:
                        type: string
                        nullable: true
                      previous:
                        type: string
                        nullable: true
                    example:
                      next: "/v1/events/{event_id}/issued_tickets?starting_after=it_120"
                      previous: "/v1/events/{event_id}/issued_tickets?ending_before=it_100"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []
    post:
      operationId: createIssuedTicket
      summary: "Create an issued ticket"
      description: >

        Creates a new issued ticket for an event occurrence from the available inventory. Issuing tickets via the API is charged at one credit per issued ticket, even if the ticket is free. Send the event_id and ticket_type_id to create the issued ticket from an event occurrence's ticket type allocation. Alternatively, send the hold_id to create the issued ticket from a pre-existing hold. The issued ticket is not associated to an order. The request will fail if no tickets are available to fulfil the request, or the ticket type is a 'seated' type (uses a seating chart).
      tags:
        - Issued tickets
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - full_name
              properties:
                event_id:
                  type: string
                  description: Event occurrence ID (required if creating from ticket type inventory)
                ticket_type_id:
                  type: string
                  description: Ticket type ID (required if creating from ticket type inventory)
                hold_id:
                  type: string
                  description: Hold ID to create the issued ticket from (required if creating from hold)
                full_name:
                  type: string
                  description: The full name of the person attending the event
                email:
                  type: string
                  description: The email of the person attending the event
                send_email:
                  type: boolean
                  description: |
                    When set to `true`, Ticket Tailor will attempt to send an email to the attendee with their ticket and event information. However, please note that setting `send_email` to `true` does not guarantee that an email will be successfully sent. The following conditions must be met for the email to be dispatched:
                      1. **A valid** `email` must be provided in the request payload.
                      2. **The box office must be configured to use separate event confirmation emails** and order confirmation emails.
                      3. **The event series to which the event belongs must be approved by Ticket Tailor staff**.

                    <br/>If any of these conditions are not satisfied, the email will not be sent — even if `send_email` is set to `true`.
                barcode:
                  type: string
                  description: The barcode (ticket code) of the issued ticket (if empty, a barcode will be generated).
                reference:
                  type: string
                  description: An external reference for this issued ticket (e.g order number in external system)
              example:
                event_id: "ev_1"
                ticket_type_id: "tt_230656"
                email: "john@example.com"
                full_name: "John Doe"
      responses:
        "201":
          description: "Successfully issued ticket"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: "#/components/schemas/IssuedTicket"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []
  /v1/issued_tickets/{issued_ticket_id}:
    get:
      operationId: getIssuedTicketById
      summary: "Get a single issued ticket"
      description: "Returns an issued ticket"
      tags:
        - Issued tickets
      parameters:
        - in: path
          name: issued_ticket_id
          required: true
          schema:
            type: string
          description: "The unique identifier for the issued ticket"
      responses:
        "200":
          description: "A successfully returned issued ticket"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/IssuedTicket"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []
  /v1/issued_tickets/{issued_ticket_id}/void:
    post:
      operationId: voidIssuedTicketById
      summary: "Void an issued ticket"
      description: >
        Mark an issued ticket as voided. This action is irreversible. This will only mark the ticket as voided (no longer valid) and will not cancel an entire order or issue a refund. [Learn more about voiding an issued ticket.](https://help.tickettailor.com/en/articles/2116551-how-to-void-individual-tickets-on-an-order)
        You can also void an issued ticket to a hold, which will create a hold from the issued ticket and not put the allocation back on sale.
      tags:
        - Issued tickets
      parameters:
        - in: path
          name: issued_ticket_id
          required: true
          schema:
            type: string
          description: "The unique identifier for the issued ticket"
      requestBody:
        required: false
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                void_to_hold:
                  type: string
                  enum: ["true", "false"]
                  description: Indicate whether to turn the existing issued ticket into a hold
                  example: "true"
      responses:
        "200":
          $ref: "#/components/responses/VoidedIssuedTicket"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []

  /v1/discounts:
    get:
      operationId: getDiscountList
      summary: "List discounts"
      description: "Returns a list of paginated discounts"
      tags:
        - Discount codes
      parameters:
        - $ref: "#/components/parameters/Limit"
        - $ref: "#/components/parameters/DiscountCode"
      responses:
        "200":
          description: "Successfully returned the list of discounts"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: "#/components/schemas/DiscountResponse"
                  links:
                    type: object
                    properties:
                      next:
                        type: string
                        nullable: true
                      previous:
                        type: string
                        nullable: true
                    example:
                      next: "/v1/discounts?starting_after=di_123"
                      previous: "/v1/discounts?ending_before=di_234"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []
    post:
      operationId: createDiscountCode
      summary: "Create a discount code"
      description: "Creates a discount code that can be used on checkout."
      tags:
        - Discount codes
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - name
                - code
                - type
              properties:
                booking_fee:
                  description: Booking fee amount in cents. Could be null.
                  type: integer
                  nullable: true
                booking_fee_percent:
                  description: Percent of the booking fee. Could be null.
                  type: integer
                  minimum: 0
                  maximum: 100
                  nullable: true
                code:
                  description: Discount code
                  type: string
                expires:
                  description: Discount code's expiry date as Unix timestamp
                  type: integer
                  nullable: true
                max_redemptions:
                  description: The maximum number of times this discount can be used.
                  type: integer
                  nullable: true
                name:
                  description: A descriptive name given to the discount
                  type: string
                price:
                  description: Price in cents. Could be null.
                  type: integer
                  nullable: true
                price_percent:
                  description: Percent of the price. Could be null.
                  type: integer
                  minimum: 0
                  maximum: 100
                  nullable: true
                ticket_types:
                  description: An array of associated ticket types.
                  type: array
                  items:
                    type: string
                products:
                  description: An array of associated products.
                  type: array
                  items:
                    type: string
                type:
                  description: Type of discount. Either a fixed amount or a percentage
                  type: string
                  enum: [fixed_amount, percentage]
              example:
                code: "discount_test123"
                expires: 1588368600
                max_redemptions: 5
                name: "Test discount"
                price: 540
                ticket_types: ["tt_123", "tt_456", "tt_78"]
                products: ["pr_123", "pr_456", "pr_78"]
                type: "fixed_amount"
      responses:
        "201":
          description: "Successfully created a new discount"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DiscountResponse"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []
  /v1/discounts/{discount_id}:
    get:
      operationId: getDiscountById
      summary: "Get a single discount"
      description: "Returns existing discount by ID"
      tags:
        - Discount codes
      parameters:
        - in: path
          description: "The unique identifier for the existing discount"
          name: discount_id
          required: true
          schema:
            type: string
      responses:
        "200":
          description: "Successfully returned the discount"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DiscountResponse"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []
    post:
      operationId: updateDiscountById
      summary: "Update a discount"
      description: "Updates an existing discount"
      tags:
        - Discount codes
      parameters:
        - in: path
          description: "The unique identifier for the existing discount"
          name: discount_id
          required: true
          schema:
            type: string
      requestBody:
        required: false
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                booking_fee:
                  description: Booking fee amount in cents. Could be null.
                  type: integer
                  nullable: true
                booking_fee_percent:
                  description: Percent of the booking fee. Could be null.
                  type: integer
                  minimum: 0
                  maximum: 100
                  nullable: true
                code:
                  description: Discount code
                  type: string
                expires:
                  description: Discount code's expiry date as Unix timestamp
                  type: integer
                  nullable: true
                max_redemptions:
                  description: The maximum number of times this discount can be used.
                  type: integer
                  nullable: true
                name:
                  description: A descriptive name given to the discount
                  type: string
                price:
                  description: Price in cents. Could be null.
                  type: integer
                  nullable: true
                price_percent:
                  description: Percent of the price. Could be null.
                  type: integer
                  minimum: 0
                  maximum: 100
                  nullable: true
                ticket_types:
                  description: An array of associated ticket types.
                  type: object
                  additionalProperties:
                    type: string
                    properties:
                      ticket_type_id:
                        type: string
                      discount_association:
                        description: "'1' = add to discount, '0' = remove from discount, '' = do nothing"
                        type: string
                products:
                  description: An array of associated products.
                  type: object
                  additionalProperties:
                    type: string
                    properties:
                      product_id:
                        type: string
                      discount_association:
                        description: "'1' = add to discount, '0' = remove from discount, '' = do nothing"
                        type: string
                type:
                  description: Type of discount. Either a fixed amount or a percentage
                  type: string
                  enum: [fixed_amount, percentage]
              example:
                code: "discount_test123"
                expires: 1588368600
                max_redemptions: 5
                name: "Test discount"
                price: 540
                ticket_types: { "tt_123": "1", "tt_456": "0", "tt_78": "" }
                products: { "pr_123": "1", "pr_456": "0", "pr_78": "" }
                type: "fixed_amount"
      responses:
        "200":
          description: "Successfully updated the discount"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DiscountResponse"
              example:
                object: "discount"
                id: "di_123"
                code: "discount_test123"
                expires: "2022-10-22 14:15:16"
                face_value_amount: 540
                max_redemptions: 5
                name: "Test discount"
                ticket_types: ["tt_123", "tt_78"]
                products: ["pr_123", "pr_456", "pr_78"]
                times_redeemed: 3
                type: "fixed_amount"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []
    delete:
      operationId: deleteDiscountById
      summary: "Delete a discount"
      description: "Delete a discount. This action is irreversible. The discount will be permanently removed."
      tags:
        - Discount codes
      parameters:
        - in: path
          description: "The unique identifier for the existing discount"
          name: discount_id
          required: true
          schema:
            type: string
      responses:
        "200":
          $ref: "#/components/responses/DeletedDiscount"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []

  /v1/vouchers:
    get:
      operationId: getVoucherList
      summary: "List vouchers"
      description: "Returns a list of paginated vouchers"
      tags:
        - Vouchers
      parameters:
        - $ref: "#/components/parameters/Limit"
        - $ref: "#/components/parameters/ExpiryDate"
        - $ref: "#/components/parameters/ExpiryDateGt"
        - $ref: "#/components/parameters/ExpiryDateGte"
        - $ref: "#/components/parameters/ExpiryDateLt"
        - $ref: "#/components/parameters/ExpiryDateLte"
        - $ref: "#/components/parameters/CreatedAt"
        - $ref: "#/components/parameters/CreatedAtGt"
        - $ref: "#/components/parameters/CreatedAtGte"
        - $ref: "#/components/parameters/CreatedAtLt"
        - $ref: "#/components/parameters/CreatedAtLte"
      responses:
        "200":
          description: "Successfully returned the list of vouchers"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: "#/components/schemas/Voucher"
                  links:
                    type: object
                    properties:
                      next:
                        type: string
                        nullable: true
                      previous:
                        type: string
                        nullable: true
                    example:
                      next: "/v1/vouchers?starting_after=vo_123"
                      previous: "/v1/vouchers?ending_before=vo_234"
      security:
        - BasicAuth: []
    post:
      operationId: createVoucher
      summary: "Create a voucher and its voucher codes"
      description: "Creates a new voucher and the associated voucher codes, if given."
      tags:
        - Vouchers
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - name
                - value
              properties:
                codes:
                  description: Only available when voucher_type is 'PROMO'. An array of associated voucher codes.
                  type: array
                  items:
                    type: string
                event_series_ids:
                  description: An array of associated event series IDs
                  type: array
                  items:
                    type: string
                expiry:
                  description: Voucher's expiry date as Unix timestamp.
                  type: integer
                  nullable: true
                interval:
                  description: Only available when voucher_type is GIFT_CARD. Voucher's expiry date is calculated from this number of days on day of issue.
                  type: integer
                  enum: [30, 90, 365]
                  nullable: true
                name:
                  description: A descriptive name given to the voucher
                  type: string
                partial_redemption:
                  description: Indicates whether voucher can be partially redeemed
                  type: string
                  enum: ["true", "false"]
                  nullable: true
                usable_on_any_event:
                  description: Indicates whether voucher can be used on any event
                  type: string
                  enum: ["true", "false"]
                  nullable: true
                voucher_type:
                  description: Indicates whether voucher is for promotional codes or gift vouchers.  If null then it will default to "PROMO"
                  type: string
                  enum: ["PROMO", "GIFT_CARD"]
                  nullable: true
                value:
                  description: Voucher value in cents.
                  type: integer
              example:
                codes: ["testCode1", "testCode2"]
                event_series_ids: ["es_1", "es_2"]
                expiry: 1588368600
                name: "Test voucher with codes"
                partial_redemption: "false"
                usable_on_any_event: "true"
                voucher_type: "PROMO"
                value: 540
      responses:
        "201":
          description: "Successfully created a new voucher"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Voucher"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []
  /v1/vouchers/{voucher_id}:
    get:
      operationId: getVoucherById
      summary: "Get a single voucher"
      description: "Returns existing voucher by ID"
      tags:
        - Vouchers
      parameters:
        - in: path
          description: "The unique identifier for the existing voucher"
          name: voucher_id
          required: true
          schema:
            type: string
      responses:
        "200":
          description: "Successfully returned the voucher"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Voucher"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []
    post:
      operationId: updateVoucherById
      summary: "Update a voucher"
      description: "Update an exiting voucher's name. If any voucher codes are given, create new voucher codes and associate them with the voucher"
      tags:
        - Vouchers
      parameters:
        - in: path
          description: "The unique identifier for the existing voucher"
          name: voucher_id
          required: true
          schema:
            type: string
      requestBody:
        required: false
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                codes:
                  description: An array of associated voucher codes.
                  type: array
                  items:
                    type: string
                  nullable: true
                event_series_ids:
                  description: An array of associated event series IDs
                  type: object
                  additionalProperties:
                    type: string
                    properties:
                      event_series_id:
                        type: string
                      voucher_association:
                        description: "'1' = add to voucher, '0' = remove from voucher, '' = do nothing"
                        type: string
                expiry:
                  description: Voucher's expiry date as Unix timestamp.
                  type: integer
                  nullable: true
                interval:
                  description: Only available when voucher_type is gift_card. Voucher's expiry date is calculated from this number of days on day of issue.
                  type: integer
                  enum: [30, 90, 365]
                  nullable: true
                name:
                  description: A descriptive name given to the voucher
                  type: string
                  nullable: true
                usable_on_any_event:
                  description: Indicates whether voucher can be used on any event
                  type: string
                  enum: ["true", "false"]
                  nullable: true
                value:
                  description: Voucher value in cents.
                  type: integer
                  nullable: true
              example:
                codes: ["testCode1", "testCode2"]
                event_series_ids: { "es_1": "1", "es_2": "0", "es_3": "" }
                expiry: 1588368600
                name: "Test voucher with codes"
                usable_on_any_event: "true"
                value: 540
      responses:
        "201":
          description: "Successfully updated the voucher"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Voucher"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []
    delete:
      operationId: deleteVoucherById
      summary: "Delete a voucher"
      description: "Delete voucher and its associated voucher codes. This action is irreversible. The voucher and its voucher codes will be permanently removed."
      tags:
        - Vouchers
      parameters:
        - in: path
          description: "The unique identifier for the existing voucher"
          name: voucher_id
          required: true
          schema:
            type: string
      responses:
        "200":
          $ref: "#/components/responses/DeletedVoucher"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []

  /v1/vouchers/{voucher_id}/codes:
    get:
      operationId: getVoucherCodeList
      summary: "List voucher codes"
      description: "Returns a list of paginated voucher codes"
      tags:
        - Voucher codes
      parameters:
        - in: path
          description: "The unique identifier for the existing voucher"
          name: voucher_id
          required: true
          schema:
            type: string
        - $ref: "#/components/parameters/Limit"
        - $ref: "#/components/parameters/ExpiryDate"
        - $ref: "#/components/parameters/ExpiryDateGt"
        - $ref: "#/components/parameters/ExpiryDateGte"
        - $ref: "#/components/parameters/ExpiryDateLt"
        - $ref: "#/components/parameters/ExpiryDateLte"
        - $ref: "#/components/parameters/CreatedAt"
        - $ref: "#/components/parameters/CreatedAtGt"
        - $ref: "#/components/parameters/CreatedAtGte"
        - $ref: "#/components/parameters/CreatedAtLt"
        - $ref: "#/components/parameters/CreatedAtLte"
      responses:
        "200":
          description: "Successfully returned the list of voucher codes"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: "#/components/schemas/VoucherCode"
                  links:
                    type: object
                    properties:
                      next:
                        type: string
                        nullable: true
                      previous:
                        type: string
                        nullable: true
                    example:
                      next: "/v1/vouchers/vo_123456/codes?starting_after=vc_123"
                      previous: "/v1/vouchers/vo_123456/codes?ending_before=vc_321"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []
  /v1/vouchers/{voucher_id}/codes/{voucher_code_id}/void:
    post:
      operationId: voidVoucherCodeById
      summary: "Void a voucher code"
      description: "Mark a voucher code as voided. This action is irreversible. This will only mark one voucher code as voided, and will not impact the other related codes."
      tags:
        - Voucher codes
      parameters:
        - in: path
          name: voucher_id
          required: true
          schema:
            type: string
          description: "The unique identifier for the voucher"
        - in: path
          name: voucher_code_id
          required: true
          schema:
            type: string
          description: "The unique identifier for the voucher code"
      responses:
        "200":
          $ref: "#/components/responses/VoidedVoucherCode"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []

  /v1/check_ins:
    get:
      operationId: getCheckInList
      summary: "List check ins"
      description: "Returns a paginated list of checkins"
      tags:
        - Check ins
      parameters:
        - $ref: "#/components/parameters/Limit"
        - $ref: "#/components/parameters/EventId"
        - $ref: "#/components/parameters/EventSeriesId"
        - $ref: "#/components/parameters/IssuedTicketId"
        - $ref: "#/components/parameters/CreatedAt"
        - $ref: "#/components/parameters/CreatedAtGt"
        - $ref: "#/components/parameters/CreatedAtGte"
        - $ref: "#/components/parameters/CreatedAtLt"
        - $ref: "#/components/parameters/CreatedAtLte"
        - $ref: "#/components/parameters/CheckInAt"
        - $ref: "#/components/parameters/CheckInAtGt"
        - $ref: "#/components/parameters/CheckInAtGte"
        - $ref: "#/components/parameters/CheckInAtLt"
        - $ref: "#/components/parameters/CheckInAtLte"
      responses:
        "200":
          description: "Successfully returned the list of check ins"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: "#/components/schemas/CheckIn"
                  links:
                    type: object
                    properties:
                      next:
                        type: string
                        nullable: true
                      previous:
                        type: string
                        nullable: true
                    example:
                      next: "/v1/check_ins?starting_after=ci_123"
                      previous: "/v1/check_ins?ending_before=ci_234"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []
    post:
      operationId: createCheckIn
      summary: "Create a check in"
      description: "Creates a check in"
      tags:
        - Check ins
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - issued_ticket_id
                - quantity
              properties:
                check_in_at:
                  description: Unix timestamp for when the device checked the issued ticket. If not provided, our system will default to the current Unix timestamp.
                  type: integer
                  example: 1657204364
                issued_ticket_id:
                  description: Issued ticket identifier
                  type: string
                  example: it_123
                local_unique_id:
                  description: Used for safely retrying a check in without creating it multiple times. If not provided, it will be generated automatically.
                  type: string
                  example: 4c2eae10-2dd7-11ed-a261-0242ac120002-b3fd6e91-334e-4d99-8cb3-322452a54b2a
                quantity:
                  description: -1 for check out, 1 for check in
                  type: integer
                  enum: [-1, 1]
                  example: 1
      responses:
        "201":
          description: "Successfully created a new check in"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CheckIn"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []

  /v1/checkout_forms:
    get:
      tags:
        - "Checkout forms"
      operationId: getCheckoutFormList
      summary: "List all checkout forms"
      description: "Returns existing checkout forms"
      responses:
        "200":
          description: "Successfully returned the list of checkout forms"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: "#/components/schemas/CheckoutForm"
                  links:
                    type: object
                    properties:
                      next:
                        type: string
                        nullable: true
                        example: "/v1/checkout_forms?starting_after=cf_123"
                      previous:
                        type: string
                        nullable: true
                        example: "/v1/checkout_forms?ending_before=cf_234"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []

  /v1/checkout_forms/{checkout_form_id}/elements:
    get:
      tags:
        - "Checkout forms"
      operationId: getCheckoutFormElementsByCustomFormId
      summary: "List all checkout form elements"
      description: "Returns existing checkout form elements by custom form ID"
      parameters:
        - in: path
          description: "The unique identifier for the custom form"
          name: checkout_form_id
          required: true
          schema:
            type: string
      responses:
        "200":
          description: "Successfully returned the list of checkout form elements"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: "#/components/schemas/CheckoutFormElement"
                  links:
                    type: object
                    properties:
                      next:
                        type: string
                        nullable: true
                        example: "/v1/checkout_forms/cf_123/elements?starting_after=ce_123"
                      previous:
                        type: string
                        nullable: true
                        example: "/v1/checkout_forms/cf_123/elements?ending_before=ce_234"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []
  /v1/checkout_forms/{checkout_form_id}/elements/{checkout_form_element_id}:
    get:
      tags:
        - "Checkout forms"
      operationId: getCheckoutFormElementById
      summary: "Get a single checkout form element"
      description: "Returns existing checkout form element by ID"
      parameters:
        - in: path
          description: "The unique identifier for the custom form"
          name: checkout_form_id
          required: true
          schema:
            type: string
        - in: path
          description: "The unique identifier for the checkout form element"
          name: checkout_form_element_id
          required: true
          schema:
            type: string
      responses:
        "200":
          description: "Successfully returned the checkout form element"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CheckoutFormElement"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []
    post:
      tags:
        - Checkout forms
      operationId: updateCheckoutFormElementsById
      summary: "Update a checkout form element"
      description: "Updates an existing checkout form element"
      parameters:
        - in: path
          description: "The unique identifier for the checkout form"
          name: checkout_form_id
          required: true
          schema:
            type: string
        - in: path
          description: "The unique identifier for the checkout form element"
          name: checkout_form_element_id
          required: true
          schema:
            type: string
      requestBody:
        required: false
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                options:
                  description: "The list of answers for the checkout form element"
                  type: array
                  items:
                    type: string
                question:
                  description: "The question for the checkout form element"
                  type: string
                per_ticket:
                  description: "Whether the checkout form element is asked globally or per ticket"
                  type: boolean
                  example: true
                required:
                  description: "Whether the checkout form element is required to answer"
                  type: boolean
                  example: true
                type:
                  description: "The type of the checkout form element"
                  type: string
                  enum: ["multiCheckbox", "radio", "select", "termsCheckbox", "termsSignature"]
                terms_and_conditions:
                  description: "The HTML content for Terms & Conditions elements (termsCheckbox and termsSignature types only). Send empty string to clear."
                  type: string
                  nullable: true
                  maxLength: 65535
              example:
                options: ["Yes", "No"]
                question: "Do you have any dietary requirements?"
                per_ticket: true
                required: true
                type: "radio"
      responses:
        "200":
          description: "Successfully updated the checkout form element"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CheckoutFormElement"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []

  /v1/holds:
    get:
      operationId: getHoldList
      summary: "List holds"
      description: "Returns a paginated list of holds"
      tags:
        - Holds
      parameters:
        - $ref: "#/components/parameters/Limit"
        - $ref: "#/components/parameters/EventId"
        - $ref: "#/components/parameters/CreatedAt"
        - $ref: "#/components/parameters/CreatedAtGt"
        - $ref: "#/components/parameters/CreatedAtGte"
        - $ref: "#/components/parameters/CreatedAtLt"
        - $ref: "#/components/parameters/CreatedAtLte"
        - $ref: "#/components/parameters/UpdatedAt"
        - $ref: "#/components/parameters/UpdatedAtGt"
        - $ref: "#/components/parameters/UpdatedAtGte"
        - $ref: "#/components/parameters/UpdatedAtLt"
        - $ref: "#/components/parameters/UpdatedAtLte"
      responses:
        "200":
          description: "A successfully returned list of holds"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: "#/components/schemas/Hold"
                  links:
                    type: object
                    properties:
                      next:
                        type: string
                        nullable: true
                      previous:
                        type: string
                        nullable: true
                    example:
                      next: "/v1/holds?starting_after=ho_120"
                      previous: "/v1/holds?ending_before=ho_100"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []
    post:
      operationId: createHold
      summary: "Create a hold"
      description: "Creates a new hold"
      tags:
        - Holds
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - event_id
                - note
                - ticket_type_id
              properties:
                event_id:
                  description: "The ID of the associated event for which to create the hold"
                  type: string
                  example: "ev_123"
                note:
                  description: "A string that gives more information about the created hold"
                  type: string
                  example: "This hold contains 5 General Admission tickets"
                ticket_type_id:
                  description: "List of ticket types and their quantities"
                  type: object
                  additionalProperties:
                    type: string
                    properties:
                      ticket_type_id:
                        type: string
                      quantity:
                        type: integer
                  example: { "tt_1": 1, "tt_2": 5 }
      responses:
        "201":
          description: "Successfully created a hold"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Hold"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []
  /v1/holds/{hold_id}:
    get:
      operationId: getHoldById
      summary: "Get a single hold"
      description: "Returns existing hold by ID"
      tags:
        - Holds
      parameters:
        - in: path
          name: hold_id
          schema:
            type: string
          required: true
          description: "The unique identifier for the hold"
      responses:
        "200":
          description: "A successfully returned hold"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Hold"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []
    post:
      operationId: updateHold
      summary: "Update a hold"
      description: "Updates an existing hold"
      tags:
        - Holds
      parameters:
        - in: path
          name: hold_id
          schema:
            type: string
          required: true
          description: "The unique identifier for the hold"
      requestBody:
        required: false
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                note:
                  description: "A string that gives more information about the created hold"
                  type: string
                  example: "This hold contains 5 General Admission tickets"
                ticket_type_id:
                  description: An array of associated ticket type IDs
                  type: object
                  additionalProperties:
                    properties:
                      ticket_type_id:
                        type: string
                      association:
                        description: 0 = remove from hold reservation, any other integer = keep or add
                        type: integer
                  example: { "tt_1": 1, "tt_2": 0 }
      responses:
        "200":
          description: "Successfully updated the hold"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Hold"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []
    delete:
      operationId: deleteHoldById
      summary: "Delete a hold"
      description: "Delete a hold. This action is irreversible. The hold will be permanently removed."
      tags:
        - Holds
      parameters:
        - in: path
          description: "The unique identifier for the hold"
          name: hold_id
          required: true
          schema:
            type: string
      responses:
        "200":
          $ref: "#/components/responses/DeletedHold"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []

  /v1/events:
    get:
      operationId: getAllEvents
      summary: "List all events"
      description: "Returns a list of events belonging to the box office."
      tags:
        - Events
      parameters:
        - $ref: "#/components/parameters/StartAt"
        - $ref: "#/components/parameters/StartAtGt"
        - $ref: "#/components/parameters/StartAtGte"
        - $ref: "#/components/parameters/StartAtLt"
        - $ref: "#/components/parameters/StartAtLte"
        - $ref: "#/components/parameters/EndAt"
        - $ref: "#/components/parameters/EndAtGt"
        - $ref: "#/components/parameters/EndAtGte"
        - $ref: "#/components/parameters/EndAtLt"
        - $ref: "#/components/parameters/EndAtLte"
        - $ref: "#/components/parameters/StartingAfter"
        - $ref: "#/components/parameters/EndingBefore"
        - $ref: "#/components/parameters/Limit"
        - in: query
          name: status
          schema:
            type: string
            enum: ["published", "draft", "sales_closed"]
          description: "A comma separated list of event series status. (e.g. draft,published)"
        - $ref: "#/components/parameters/Name"
        - $ref: "#/components/parameters/Venue"
      responses:
        "200":
          description: "A successfully returned list of events"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: "#/components/schemas/Event"
                  links:
                    type: object
                    properties:
                      next:
                        type: string
                        nullable: true
                      previous:
                        type: string
                        nullable: true
                    example:
                      next: "/v1/events?starting_after=ev_123"
                      previous: "/v1/events?ending_before=ev_100"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []
  /v1/events/{event_id}:
    get:
      operationId: getEventById
      summary: "Retrieve an event"
      description: "Returns an event belonging to the box office."
      tags:
        - Events
      parameters:
        - in: path
          name: event_id
          schema:
            type: string
          required: true
          description: "The unique identifier for the event"
      responses:
        "200":
          description: "A successfully returned event"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Event"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []

  /v1/ping:
    get:
      operationId: ping
      summary: "Ping server"
      description: "Checks if server is responsive"
      tags:
        - Ping
      responses:
        "200":
          description: "The server is responding correctly."
          content:
            application/json:
              schema:
                type: object
                properties:
                  version:
                    type: string
                example:
                  version: "pong"
        default:
          $ref: "#/components/responses/ErrorModel"

  /v1/products:
    get:
      operationId: getProductList
      summary: "List products"
      description: "Returns a paginated list of products"
      tags:
        - Products
      parameters:
        - $ref: "#/components/parameters/Limit"
        - $ref: "#/components/parameters/EventSeriesId"
        - $ref: "#/components/parameters/AddOnStatus"
        - $ref: "#/components/parameters/CreatedAt"
        - $ref: "#/components/parameters/CreatedAtGt"
        - $ref: "#/components/parameters/CreatedAtGte"
        - $ref: "#/components/parameters/CreatedAtLt"
        - $ref: "#/components/parameters/CreatedAtLte"
        - $ref: "#/components/parameters/UpdatedAt"
        - $ref: "#/components/parameters/UpdatedAtGt"
        - $ref: "#/components/parameters/UpdatedAtGte"
        - $ref: "#/components/parameters/UpdatedAtLt"
        - $ref: "#/components/parameters/UpdatedAtLte"
      responses:
        "200":
          description: "A successfully returned list of products"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: "#/components/schemas/Product"
                  links:
                    type: object
                    properties:
                      next:
                        type: string
                        nullable: true
                      previous:
                        type: string
                        nullable: true
                    example:
                      next: "/v1/products?starting_after=pr_120"
                      previous: "/v1/products?ending_before=pr_100"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []
    post:
      operationId: createProduct
      summary: "Create a product"
      description: "Create a new product"
      tags:
        - Products
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - name
                - price
              properties:
                booking_fee:
                  description: "Optional booking fee in cents which is charged per product to the customer and the funds are paid to you. We would recommend charging no more than 10% of the product price."
                  type: integer
                  example: 100
                currency:
                  description: "Currency that the product can be purchased in. Defaults to the box office currency."
                  type: string
                  example: "gbp"
                description:
                  description: "Description of the product"
                  type: string
                  example: "High quality print of the event poster"
                event_series_ids:
                  description: "List of event series IDs that have the product"
                  type: array
                  items:
                    type: string
                  example: ["es_123", "es_456"]
                image:
                  description: "Raw image file data"
                  type: string
                instructions:
                  description: "Instructions on how to purchase the product"
                  type: string
                  example: "Buy the poster at the venue"
                issue_ticket_voucher:
                  description: "Indicate whether the QR code is to be issued for the product. Mutually exclusive with voucher_id and membership_type_id."
                  type: string
                  example: "true"
                linked_to_all_event_series:
                  description: "Indicate whether the product is linked to all event series"
                  type: string
                  example: "false"
                membership_type_id:
                  description: "The ID of a membership type to associate with the product. Must start with 'mt_' prefix. Mutually exclusive with issue_ticket_voucher and voucher_id."
                  type: string
                  example: "mt_123"
                name:
                  description: "Name of the product"
                  type: string
                  example: "Event poster"
                price:
                  description: "Cost of the product in cents"
                  type: integer
                  example: 599
                quantity:
                  description: "Number of products available for purchase"
                  type: integer
                  example: 50
                quantity_per_event:
                  description: "Number of products available for purchase per event"
                  type: integer
                  example: 10
                status:
                  description: "product status: on_sale, hidden or sold_out"
                  type: string
                  example: "on_sale"
                voucher_id:
                  description: "The ID of a voucher of type gift card to associate with the product. Must start with 'vo_' prefix. Mutually exclusive with issue_ticket_voucher and membership_type_id."
                  type: string
                  example: "vo_123"
      responses:
        "201":
          description: "Successfully created a new product"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Product"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []
  /v1/products/{product_id}:
    get:
      operationId: getProductById
      summary: "Get a single product"
      description: "Returns a single product by ID"
      tags:
        - Products
      parameters:
        - in: path
          name: product_id
          schema:
            type: string
          required: true
          description: "The unique identifier for the product"
      responses:
        "200":
          description: "Successfully returned the add-on"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Product"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []
    post:
      operationId: updateProductById
      summary: "Update a product"
      description: "Updates an existing product"
      tags:
        - Products
      parameters:
        - in: path
          name: product_id
          schema:
            type: string
          required: true
          description: "The unique identifier for the product"
      requestBody:
        required: false
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                booking_fee:
                  description: "Optional booking fee in cents which is charged per product to the customer and the funds are paid to you. We would recommend charging no more than 10% of the product price."
                  type: integer
                  nullable: true
                currency:
                  description: "Currency that the product can be purchased in. Defaults to the box office currency."
                  type: string
                  nullable: true
                description:
                  description: "Description of the product"
                  type: string
                  nullable: true
                event_series_ids:
                  description: "List of event series IDs that have the product"
                  type: object
                  additionalProperties:
                    type: string
                    properties:
                      event_series_id:
                        type: string
                      event_series_id_association:
                        description: "'1' = add to product, '0' = remove from product, '' = do nothing"
                        type: string
                image:
                  description: "Raw image file data"
                  type: string
                  nullable: true
                instructions:
                  description: "Instructions on how to purchase the product"
                  type: string
                  nullable: true
                issue_ticket_voucher:
                  description: "Indicate whether the QR code is to be issued for the product. Mutually exclusive with voucher_id and membership_type_id. Cannot be changed for existing products."
                  type: string
                  nullable: true
                linked_to_all_event_series:
                  description: "Indicate whether the product is linked to all event series"
                  type: string
                  nullable: true
                membership_type_id:
                  description: "The ID of a membership type to associate with the product. Must start with 'mt_' prefix. Mutually exclusive with issue_ticket_voucher and voucher_id. Cannot be changed for existing products."
                  type: string
                  nullable: true
                modify_quantity:
                  description: "Number of products to add or remove. The number should be preceded by a + or - sign"
                  type: string
                  nullable: true
                name:
                  description: "Name of the product"
                  type: string
                  nullable: true
                price:
                  description: "Cost of the product in cents"
                  type: integer
                  nullable: true
                quantity:
                  description: "Number of products available for purchase"
                  type: integer
                  nullable: true
                quantity_per_event:
                  description: "Number of products available for purchase per event"
                  type: integer
                  nullable: true
                quantity_unlimited:
                  description: "If set to 'true', the quantity will be set to unlimited. Otherwise, it will be set to the quantity given"
                  type: string
                  enum: ["true", "false"]
                status:
                  description: "Product status: on_sale, hidden or sold_out"
                  type: string
                  nullable: true
                voucher_id:
                  description: "The ID of a voucher of type gift card to associate with the product. Must start with 'vo_' prefix. Mutually exclusive with issue_ticket_voucher and membership_type_id. Cannot be changed for existing products."
                  type: string
                  nullable: true
              example:
                booking_fee: 50
                currency: "gbp"
                description: "Longer product description"
                event_series_ids: { "es_123": "1", "es_456": "0" }
                instructions: "Buy the poster at the venue"
                issue_ticket_voucher: "false"
                linked_to_all_event_series: "true"
                modify_quantity: "+5"
                name: "Test product"
                price: 599
                status: "sold_out"
      responses:
        "200":
          description: "Successfully updated the product"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Product"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []
    delete:
      operationId: deleteProductById
      summary: "Delete a product"
      description: "Delete a product. This action is irreversible. The product will be permanently removed."
      tags:
        - Products
      parameters:
        - in: path
          name: product_id
          schema:
            type: string
          required: true
          description: "The unique identifier for the product"
      responses:
        "200":
          $ref: "#/components/responses/DeletedProduct"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []

  /v1/stores:
    get:
      operationId: getStoreList
      summary: "List stores"
      description: "Returns a list of stores"
      tags:
        - Stores
      responses:
        "200":
          description: "Successfully returned list of stores"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: "#/components/schemas/Store"
                  links:
                    type: object
                    properties:
                      next:
                        type: string
                        nullable: true
                      previous:
                        type: string
                        nullable: true
                    example:
                      next: "/v1/stores?starting_after=st_120"
                      previous: "/v1/stores?ending_before=st_100"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []

  /v1/stores/{store_id}:
    get:
      operationId: getStoreById
      summary: "Get store information"
      description: "Returns the current store configuration"
      tags:
        - Stores
      responses:
        "200":
          description: "Successfully returned store information"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Store"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []
    post:
      operationId: updateStoreById
      summary: "Update store information"
      description: "Updates the store configuration"
      tags:
        - Stores
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                currency:
                  description: "The currency code used by the store"
                  type: string
                  enum:
                    [
                      gbp,
                      usd,
                      eur,
                      sgd,
                      aud,
                      brl,
                      cad,
                      czk,
                      dkk,
                      hkd,
                      huf,
                      ils,
                      jpy,
                      myr,
                      mxn,
                      nok,
                      nzd,
                      php,
                      pln,
                      rub,
                      sek,
                      chf,
                      twd,
                      thb,
                      try,
                    ]
                  example: "EUR"
                  nullable: true
                name:
                  description: "Name of the store"
                  type: string
                  example: "Example store name"
                  nullable: true
                products:
                  description: "Array of product IDs that are sold in the store. Empty array will remove all products from the store."
                  type: array
                  items:
                    type: string
                    description: "Product ID prefixed with 'pr_'"
                  example: ["pr_105676"]
                  nullable: true
      responses:
        "200":
          description: "Successfully updated store information"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Store"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []

  /v1/issued_memberships:
    get:
      tags:
        - "Issued memberships"
      operationId: getAllIssuedMemberships
      summary: "List issued memberships"
      description: "Returns paginated issued memberships"
      parameters:
        - $ref: "#/components/parameters/Limit"
        - in: query
          name: starting_after
          schema:
            type: string
          description: "Cursor for pagination. Returns records after this ID (e.g. im_123)"
        - in: query
          name: ending_before
          schema:
            type: string
          description: "Cursor for pagination (previous page). Returns records before this ID (e.g. im_123)"
        - in: query
          name: first_name
          schema:
            type: string
          description: "Filter by first name (contains)"
        - in: query
          name: last_name
          schema:
            type: string
          description: "Filter by last name (contains)"
        - in: query
          name: email
          schema:
            type: string
          description: "Filter by email (contains)"
        - in: query
          name: search
          schema:
            type: string
          description: "Search by first name, last name or email (contains)"
        - in: query
          name: issued_membership_code
          schema:
            type: string
          description: "Filter by exact membership code"
        - in: query
          name: memberships_status
          schema:
            type: string
            enum: [valid, invalid, both]
            default: valid
          description: "Filter by membership validity status. 'valid' returns only currently valid memberships, 'invalid' returns expired or voided memberships, 'both' returns all."
        - in: query
          name: order_by
          schema:
            type: string
            enum: [first_name, last_name]
          description: "Order results by member's first_name or last_name"
        - in: query
          name: order
          schema:
            type: string
            enum: [asc, desc]
            default: asc
          description: "Sort direction when order_by is specified"
        - in: query
          name: issued_after
          schema:
            type: integer
          description: "Unix timestamp filter that returns issued memberships issued on or after the given value."
        - in: query
          name: issued_before
          schema:
            type: integer
          description: "Unix timestamp filter that returns issued memberships issued before the given value."
        - in: query
          name: valid_from_after
          schema:
            type: integer
          description: "Unix timestamp filter that returns issued memberships whose `valid_from` is on or after the given value."
        - in: query
          name: valid_from_before
          schema:
            type: integer
          description: "Unix timestamp filter that returns issued memberships whose `valid_from` is before the given value."
        - in: query
          name: valid_to_after
          schema:
            type: integer
          description: "Unix timestamp filter that returns issued memberships whose `valid_to` is on or after the given value."
        - in: query
          name: valid_to_before
          schema:
            type: integer
          description: "Unix timestamp filter that returns issued memberships whose `valid_to` is before the given value."
      responses:
        "200":
          description: "A successfully returned list of issued memberships"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: "#/components/schemas/IssuedMembership"
                  links:
                    type: object
                    properties:
                      next:
                        type: string
                        nullable: true
                      previous:
                        type: string
                        nullable: true
                    example:
                      next: "/v1/issued_memberships?starting_after=im_120"
                      previous: "/v1/issued_memberships?ending_before=im_100"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []
    post:
      tags:
        - "Issued memberships"
      operationId: createIssuedMembership
      summary: "Create an issued membership"
      description: "Creates a new issued membership for membership type"
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - membership_type_id
                - first_name
                - last_name
                - email
              properties:
                membership_type_id:
                  description: "The ID of the membership type (e.g. mt_123)"
                  type: string
                  example: "mt_123"
                first_name:
                  description: "First name"
                  type: string
                  example: "John"
                last_name:
                  description: "Last name"
                  type: string
                  example: "Doe"
                email:
                  description: "Email address"
                  type: string
                  format: email
                  example: "john.doe@example.com"
                photo:
                  description: "Photo (max 5MB)"
                  type: string
                  format: binary
                valid_from_type:
                  description: "Type of valid from date. 'fixed' uses valid_from_date, 'relative' uses the date of issue. When not provided, the membership type's default is used."
                  type: string
                  enum: [fixed, relative]
                valid_from_date:
                  description: "Unix timestamp (UTC) for when the issued membership becomes valid. Required if valid_from_type is 'fixed'. When not provided, the membership type's default is used."
                  type: integer
                  example: 1704067200
                valid_to_type:
                  description: "Type of valid to date. 'fixed' uses valid_to_date, 'relative' uses valid_to_interval_days from issue date. When not provided, the membership type's default is used."
                  type: string
                  enum: [fixed, relative]
                valid_to_date:
                  description: "Unix timestamp (UTC) for when the membership expires. Required if valid_to_type is 'fixed'. When not provided, the membership type's default is used."
                  type: integer
                  example: 1735689600
                valid_to_interval_days:
                  description: "Number of days the membership is valid for from the issue date. Used when valid_to_type is 'relative'. Must be between 1 and 1095. When not provided, the membership type's default is used."
                  type: integer
                  minimum: 1
                  maximum: 1095
                  example: 365
                max_redemptions:
                  description: "Maximum number of times the issued membership can be redeemed. If not provided, the membership type's default is used. Provide empty string to set unlimited redemptions."
                  type: string
                  example: "10"
      responses:
        "201":
          description: "Successfully created an issued membership"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/IssuedMembership"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []

  /v1/issued_memberships/{issued_membership_id}:
    get:
      tags:
        - "Issued memberships"
      operationId: getIssuedMembershipById
      summary: "Get a single issued membership"
      description: "Returns an existing issued membership by ID"
      parameters:
        - in: path
          description: "The unique identifier for the issued membership (e.g. im_123)"
          name: issued_membership_id
          required: true
          schema:
            type: string
      responses:
        "200":
          description: "Successfully returned the issued membership"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/IssuedMembership"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []
    post:
      tags:
        - "Issued memberships"
      operationId: updateIssuedMembershipById
      summary: "Update an issued membership"
      description: "Updates an existing issued membership. Only fixed date types are allowed when updating."
      parameters:
        - in: path
          description: "The unique identifier for the issued membership (e.g. im_123)"
          name: issued_membership_id
          required: true
          schema:
            type: string
      requestBody:
        required: false
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                first_name:
                  description: "First name"
                  type: string
                  example: "John"
                last_name:
                  description: "Last name"
                  type: string
                  example: "Doe"
                email:
                  description: "Email address"
                  type: string
                  format: email
                  example: "john.doe@example.com"
                photo:
                  description: "Photo (max 5MB)"
                  type: string
                  format: binary
                valid_from_date:
                  description: "Unix timestamp (UTC) for when the issued membership becomes valid"
                  type: integer
                  example: 1704067200
                valid_to_date:
                  description: "Unix timestamp (UTC) for when the issued membership expires"
                  type: integer
                  example: 1735689600
                max_redemptions:
                  description: "Maximum number of times the issued membership can be redeemed. Provide empty string to set unlimited redemptions."
                  type: string
                  example: "10"
      responses:
        "200":
          description: "Successfully updated the issued membership"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/IssuedMembership"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []

  /v1/issued_memberships/{issued_membership_id}/void:
    post:
      tags:
        - "Issued memberships"
      operationId: voidIssuedMembershipById
      summary: "Void an issued membership"
      description: "Voids an existing issued membership. A voided membership cannot be used for redemptions."
      parameters:
        - in: path
          description: "The unique identifier for the issued membership (e.g. im_123)"
          name: issued_membership_id
          required: true
          schema:
            type: string
      responses:
        "200":
          description: "Successfully voided the issued membership"
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: "The issued membership ID"
                    example: "im_123"
                  object:
                    type: string
                    example: "issued_membership"
                  voided:
                    type: string
                    enum: ["true", "false"]
                    example: "true"
        "400":
          $ref: "#/components/responses/ErrorModel"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []

  /v1/issued_membership_redemptions/{event_id}:
    post:
      tags:
        - "Issued memberships"
      operationId: createIssuedMembershipRedemption
      summary: "Create an issued membership redemption"
      description: "Creates a redemption for an issued membership at a specific event. This records that the issued membership was used for entry to the event."
      parameters:
        - in: path
          description: "The unique identifier for the event (e.g. ev_123)"
          name: event_id
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - code
              properties:
                code:
                  description: "The issued membership code to redeem"
                  type: string
                  example: "MMABC123"
      responses:
        "201":
          description: "Successfully created an issued membership redemption"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/IssuedMembershipRedemption"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []

  /v1/membership_photo_share:
    get:
      tags:
        - "Issued memberships"
      operationId: getMembershipPhotoShare
      summary: "Get issued membership photo URL"
      description: "Returns a temporary signed URL for the issued membership photo."
      parameters:
        - in: query
          name: issued_membership_code
          required: true
          schema:
            type: string
          description: "The unique code of the issued membership"
      responses:
        "200":
          description: "Successfully returned the membership photo URL"
          content:
            application/json:
              schema:
                type: object
                properties:
                  object:
                    type: string
                    example: "membership_photo"
                  photo_expiry_date:
                    type: integer
                    description: "Unix timestamp when the photo URL expires"
                    example: 1704067260
                  photo_url:
                    type: string
                    description: "Temporary signed URL to access the issued membership photo"
                    example: "https://example.com/photos/abc123?signature=xyz"
        "404":
          $ref: "#/components/responses/ErrorModel"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []

  /v1/membership_types:
    get:
      tags:
        - "Membership types"
      operationId: getAllMembershipTypes
      summary: "List membership types"
      description: "Returns paginated membership types"
      parameters:
        - $ref: "#/components/parameters/Limit"
        - in: query
          name: starting_after
          schema:
            type: string
          description: "Cursor for pagination. Returns records after this ID (e.g. mt_123)"
        - in: query
          name: ending_before
          schema:
            type: string
          description: "Cursor for pagination (previous page). Returns records before this ID (e.g. mt_123)"
      responses:
        "200":
          description: "A successfully returned list of membership types"
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: "#/components/schemas/MembershipType"
                  links:
                    type: object
                    properties:
                      next:
                        type: string
                        nullable: true
                      previous:
                        type: string
                        nullable: true
                    example:
                      next: "/v1/membership_types?starting_after=mt_120"
                      previous: "/v1/membership_types?ending_before=mt_100"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []
    post:
      tags:
        - "Membership types"
      operationId: createMembershipType
      summary: "Create a membership type"
      description: "Creates a new membership type"
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - name
                - valid_from_type
                - valid_to_type
              properties:
                name:
                  description: "Name of the membership type"
                  type: string
                  example: "Annual Pass"
                valid_from_type:
                  description: "Type of valid from date. 'fixed' uses valid_from_date for all issued memberships, 'relative' uses the date of issue."
                  type: string
                  enum: [fixed, relative]
                  example: "relative"
                valid_from_date:
                  description: "Unix timestamp (UTC) for when memberships of this type become valid. Required if valid_from_type is 'fixed'."
                  type: integer
                  example: 1704067200
                valid_to_type:
                  description: "Type of valid to date. 'fixed' uses valid_to_date, 'relative' uses valid_to_interval_days from issue date."
                  type: string
                  enum: [fixed, relative]
                  example: "relative"
                valid_to_date:
                  description: "Unix timestamp (UTC) for when memberships of this type expire. Required if valid_to_type is 'fixed'."
                  type: integer
                  example: 1735689600
                valid_to_interval_days:
                  description: "Number of days the membership is valid for from the issue date. Required if valid_to_type is 'relative'. Must be between 1 and 1095."
                  type: integer
                  minimum: 1
                  maximum: 1095
                  example: 365
                max_redemptions:
                  description: "Maximum number of times memberships of this type can be redeemed. If not provided, redemptions are unlimited."
                  type: string
                  example: "10"
                conditions_and_benefits:
                  description: "Array of conditions and benefits for this membership type"
                  type: array
                  items:
                    type: string
                  example:
                    ["Free entry to all events", "10% discount on merchandise"]
                photo_required:
                  description: "Whether a photo is required when issuing memberships of this type"
                  type: string
                  enum: ["true", "false"]
                  example: "false"
      responses:
        "201":
          description: "Successfully created a membership type"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MembershipType"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []

  /v1/membership_types/{membership_type_id}:
    get:
      tags:
        - "Membership types"
      operationId: getMembershipTypeById
      summary: "Get a single membership type"
      description: "Returns an existing membership type by ID"
      parameters:
        - in: path
          description: "The unique identifier for the membership type (e.g. mt_123)"
          name: membership_type_id
          required: true
          schema:
            type: string
      responses:
        "200":
          description: "Successfully returned the membership type"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MembershipType"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []
    post:
      tags:
        - "Membership types"
      operationId: updateMembershipTypeById
      summary: "Update a membership type"
      description: "Updates an existing membership type"
      parameters:
        - in: path
          description: "The unique identifier for the membership type (e.g. mt_123)"
          name: membership_type_id
          required: true
          schema:
            type: string
      requestBody:
        required: false
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                name:
                  description: "Name of the membership type"
                  type: string
                  example: "Annual Pass"
                valid_from_type:
                  description: "Type of valid from date. 'fixed' uses valid_from_date for all issued memberships, 'relative' uses the date of issue."
                  type: string
                  enum: [fixed, relative]
                valid_from_date:
                  description: "Unix timestamp (UTC) for when memberships of this type become valid. Required if valid_from_type is 'fixed'."
                  type: integer
                  example: 1704067200
                valid_to_type:
                  description: "Type of valid to date. 'fixed' uses valid_to_date, 'relative' uses valid_to_interval_days from issue date."
                  type: string
                  enum: [fixed, relative]
                valid_to_date:
                  description: "Unix timestamp (UTC) for when memberships of this type expire. Required if valid_to_type is 'fixed'."
                  type: integer
                  example: 1735689600
                valid_to_interval_days:
                  description: "Number of days the membership is valid for from the issue date. Required if valid_to_type is 'relative'. Must be between 1 and 1095."
                  type: integer
                  minimum: 1
                  maximum: 1095
                  example: 365
                max_redemptions:
                  description: "Maximum number of times memberships of this type can be redeemed. Provide empty string to set unlimited redemptions."
                  type: string
                  example: "10"
                conditions_and_benefits:
                  description: "Array of conditions and benefits for this membership type"
                  type: array
                  items:
                    type: string
                  example:
                    ["Free entry to all events", "10% discount on merchandise"]
                photo_required:
                  description: "Whether a photo is required when issuing memberships of this type"
                  type: string
                  enum: ["true", "false"]
      responses:
        "200":
          description: "Successfully updated the membership type"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MembershipType"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []
    delete:
      tags:
        - "Membership types"
      operationId: deleteMembershipTypeById
      summary: "Delete a membership type"
      description: "Deletes a membership type. A membership type can only be deleted if it has no issued memberships and no linked products."
      parameters:
        - in: path
          description: "The unique identifier for the membership type (e.g. mt_123)"
          name: membership_type_id
          required: true
          schema:
            type: string
      responses:
        "200":
          description: "Successfully deleted the membership type"
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: "The membership type ID"
                    example: "mt_123"
                  object:
                    type: string
                    example: "membership_type"
                  deleted:
                    type: string
                    enum: ["true", "false"]
                    example: "true"
        "422":
          $ref: "#/components/responses/ErrorModel"
        default:
          $ref: "#/components/responses/ErrorModel"
      security:
        - BasicAuth: []

webhooks:
  newOrder:
    post:
      summary: New order
      description: ORDER.CREATED webhook triggered when new order is created.
      operationId: newOrderWebhook
      tags:
        - Orders
      requestBody:
        content:
          application/json:
            schema:
              properties:
                id:
                  type: string
                  description: A unique identifier for the webhook history
                  example: wh_15
                created_at:
                  type: string
                  description: Datetime of the webhook request
                  example: "2025-01-01 10:00:00"
                event:
                  type: string
                  description: Webhook subscription event
                  example: "ORDER.CREATED"
                resource_url:
                  type: string
                  description: API link to the order
                  example: "https://api.tickettailor.com/v1/orders/or_737352"
                payload:
                  $ref: "#/components/schemas/Order"
      responses:
        "200":
          $ref: "#/components/responses/WebhookOk"
  updatedOrder:
    post:
      summary: Updated order
      description: ORDER.UPDATED webhook triggered when existing order is updated.
      operationId: updatedOrderWebhook
      tags:
        - Orders
      requestBody:
        content:
          application/json:
            schema:
              properties:
                id:
                  type: string
                  description: A unique identifier for the webhook history
                  example: wh_15
                created_at:
                  type: string
                  description: Datetime of the webhook request
                  example: "2025-01-01 10:00:00"
                event:
                  type: string
                  description: Webhook subscription event
                  example: "ORDER.UPDATED"
                resource_url:
                  type: string
                  description: API link to the order
                  example: "https://api.tickettailor.com/v1/orders/or_737352"
                payload:
                  $ref: "#/components/schemas/Order"
      responses:
        "200":
          $ref: "#/components/responses/WebhookOk"
  newIssuedTicket:
    post:
      summary: New issued ticket
      description: ISSUED_TICKET.CREATED webhook triggered when new issued ticket is created.
      operationId: newIssuedTicketWebhook
      tags:
        - Issued tickets
      requestBody:
        content:
          application/json:
            schema:
              properties:
                id:
                  type: string
                  description: A unique identifier for the webhook history
                  example: wh_15
                created_at:
                  type: string
                  description: Datetime of the webhook request
                  example: "2025-01-01 10:00:00"
                event:
                  type: string
                  description: Webhook subscription event
                  example: "ISSUED_TICKET.CREATED"
                resource_url:
                  type: string
                  description: API link to the issued ticket
                  example: "https://api.tickettailor.com/v1/issued_tickets/it_50198"
                payload:
                  $ref: "#/components/schemas/IssuedTicket"
      responses:
        "200":
          $ref: "#/components/responses/WebhookOk"
  updatedIssuedTicket:
    post:
      summary: Updated issued ticket
      description: ISSUED_TICKET.UPDATED webhook triggered when existing issued ticket is updated.
      operationId: updatedIssuedTicketWebhook
      tags:
        - Issued tickets
      requestBody:
        content:
          application/json:
            schema:
              properties:
                id:
                  type: string
                  description: A unique identifier for the webhook history
                  example: wh_15
                created_at:
                  type: string
                  description: Datetime of the webhook request
                  example: "2025-01-01 10:00:00"
                event:
                  type: string
                  description: Webhook subscription event
                  example: "ISSUED_TICKET.UPDATED"
                resource_url:
                  type: string
                  description: API link to the issued ticket
                  example: "https://api.tickettailor.com/v1/issued_tickets/it_50198"
                payload:
                  $ref: "#/components/schemas/IssuedTicket"
      responses:
        "200":
          $ref: "#/components/responses/WebhookOk"
  newIssuedMembership:
    post:
      summary: New issued membership
      description: ISSUED_MEMBERSHIP.CREATED webhook triggered when new issued membership is created.
      operationId: newIssuedMembershipWebhook
      tags:
        - "Issued memberships"
      requestBody:
        content:
          application/json:
            schema:
              properties:
                id:
                  type: string
                  description: A unique identifier for the webhook history
                  example: wh_15
                created_at:
                  type: string
                  description: Datetime of the webhook request
                  example: "2025-01-01 10:00:00"
                event:
                  type: string
                  description: Webhook subscription event
                  example: "ISSUED_MEMBERSHIP.CREATED"
                resource_url:
                  type: string
                  description: API link to the issued membership
                  example: "https://api.tickettailor.com/v1/issued_memberships/im_123"
                payload:
                  $ref: "#/components/schemas/IssuedMembership"
      responses:
        "200":
          $ref: "#/components/responses/WebhookOk"
  updatedIssuedMembership:
    post:
      summary: Updated issued membership
      description: ISSUED_MEMBERSHIP.UPDATED webhook triggered when existing issued membership is updated. This includes voiding issued memberships.
      operationId: updatedIssuedMembershipWebhook
      tags:
        - "Issued memberships"
      requestBody:
        content:
          application/json:
            schema:
              properties:
                id:
                  type: string
                  description: A unique identifier for the webhook history
                  example: wh_15
                created_at:
                  type: string
                  description: Datetime of the webhook request
                  example: "2025-01-01 10:00:00"
                event:
                  type: string
                  description: Webhook subscription event
                  example: "ISSUED_MEMBERSHIP.UPDATED"
                resource_url:
                  type: string
                  description: API link to the issued membership
                  example: "https://api.tickettailor.com/v1/issued_memberships/im_123"
                payload:
                  $ref: "#/components/schemas/IssuedMembership"
      responses:
        "200":
          $ref: "#/components/responses/WebhookOk"
  newEvent:
    post:
      summary: New event
      description: EVENT.CREATED webhook triggered when new event is created.
      operationId: newEventWebhook
      tags:
        - Events
      requestBody:
        content:
          application/json:
            schema:
              properties:
                id:
                  type: string
                  description: A unique identifier for the webhook history
                  example: wh_15
                created_at:
                  type: string
                  description: Datetime of the webhook request
                  example: "2025-01-01 10:00:00"
                event:
                  type: string
                  description: Webhook subscription event
                  example: "EVENT.CREATED"
                resource_url:
                  type: string
                  description: API link to the event
                  example: "https://api.tickettailor.com/v1/events/ev_1"
                payload:
                  $ref: "#/components/schemas/Event"
      responses:
        "200":
          $ref: "#/components/responses/WebhookOk"
  updatedEvent:
    post:
      summary: Updated event
      description: EVENT.UPDATED webhook triggered when existing event is updated.
      operationId: updatedEventWebhook
      tags:
        - Events
      requestBody:
        content:
          application/json:
            schema:
              properties:
                id:
                  type: string
                  description: A unique identifier for the webhook history
                  example: wh_15
                created_at:
                  type: string
                  description: Datetime of the webhook request
                  example: "2025-01-01 10:00:00"
                event:
                  type: string
                  description: Webhook subscription event
                  example: "EVENT.UPDATED"
                resource_url:
                  type: string
                  description: API link to the event
                  example: "https://api.tickettailor.com/v1/events/ev_1"
                payload:
                  $ref: "#/components/schemas/Event"
      responses:
        "200":
          $ref: "#/components/responses/WebhookOk"
  deletedEvent:
    post:
      summary: Deleted event
      description: EVENT.DELETED webhook triggered when event is deleted.
      operationId: deletedEventWebhook
      tags:
        - Events
      requestBody:
        content:
          application/json:
            schema:
              properties:
                id:
                  type: string
                  description: A unique identifier for the webhook history
                  example: wh_15
                created_at:
                  type: string
                  description: Datetime of the webhook request
                  example: "2025-01-01 10:00:00"
                event:
                  type: string
                  description: Webhook subscription event
                  example: "EVENT.DELETED"
                resource_url:
                  type: string
                  description: API link to the event
                  example: "https://api.tickettailor.com/v1/events/ev_1"
                payload:
                  $ref: "#/components/schemas/Event"
      responses:
        "200":
          $ref: "#/components/responses/WebhookOk"
  newWaitlistSignup:
    post:
      summary: New waitlist signup
      description: WAITLIST_SIGNUP.CREATED webhook triggered when waitlist signup is created.
      operationId: newWaitlistSignup
      tags:
        - Waitlist Signups
      requestBody:
        content:
          application/json:
            schema:
              properties:
                id:
                  type: string
                  description: A unique identifier for the webhook history
                  example: wh_15
                created_at:
                  type: string
                  description: Datetime of the webhook request
                  example: "2025-01-01 10:00:00"
                event:
                  type: string
                  description: Webhook subscription event
                  example: "WAITLIST_SIGNUP.CREATED"
                resource_url:
                  type: string
                  description: API link to the waitlist signup
                  example: "https://api.tickettailor.com/v1/event_series/es_1000/waitlist_signups?event_id=ev_15&email=email@example.com"
                payload:
                  $ref: "#/components/schemas/WaitlistSignup"
      responses:
        "200":
          $ref: "#/components/responses/WebhookOk"

components:
  parameters:
    AddOnStatus:
      name: status
      in: query
      description: A string representing the add-on status
      schema:
        type: string
        enum: ["ON_SALE", "HIDDEN", "SOLD_OUT"]
    StartingAfter:
      name: starting_after
      in: query
      description: A paginator cursor value of object id (e.g. "or_123") that defines place in the list. To fetch next page of results, use the last object id from the current result list, e.g. starting_after=or_223.
      schema:
        type: string
    EndingBefore:
      name: ending_before
      in: query
      description: A paginator cursor value of object id (e.g. "or_123") that defines place in the list. To fetch previous page of results, use the first object id from the current result list, e.g. ending_before=or_123.
      schema:
        type: string
    Limit:
      name: limit
      in: query
      description: The number of items to retrieve
      schema:
        type: string
    Name:
      name: name
      in: query
      description: A string representing the event name
      schema:
        type: string
    Venue:
      name: venue
      in: query
      description: A string representing the event venue
      schema:
        type: string
    CreatedAt:
      name: created_at
      in: query
      description: Unix timestamp filter that returns items with matched `created_at` value.
      schema:
        type: integer
    CreatedAtGt:
      name: created_at.gt
      in: query
      description: Unix timestamp filter that returns items with `created_at` greater than given value.
      schema:
        type: integer
    CreatedAtGte:
      name: created_at.gte
      in: query
      description: Unix timestamp filter that returns items with `created_at` greater than or equal given value.
      schema:
        type: integer
    CreatedAtLt:
      name: created_at.lt
      in: query
      description: Unix timestamp filter that returns items with `created_at` less than given value.
      schema:
        type: integer
    CreatedAtLte:
      name: created_at.lte
      in: query
      description: Unix timestamp filter that returns items with `created_at` less than or equal given value.
      schema:
        type: integer
    StartAt:
      name: start_at
      in: query
      description: Unix timestamp filter that returns items with matched `start_at` value.
      schema:
        type: integer
    StartAtGt:
      name: start_at.gt
      in: query
      description: Unix timestamp filter that returns items with `start_at` greater than given value.
      schema:
        type: integer
    StartAtGte:
      name: start_at.gte
      in: query
      description: Unix timestamp filter that returns items with `start_at` greater than or equal given value.
      schema:
        type: integer
    StartAtLt:
      name: start_at.lt
      in: query
      description: Unix timestamp filter that returns items with `start_at` less than given value.
      schema:
        type: integer
    StartAtLte:
      name: start_at.lte
      in: query
      description: Unix timestamp filter that returns items with `start_at` less than or equal given value.
      schema:
        type: integer
    EndAt:
      name: end_at
      in: query
      description: Unix timestamp filter that returns items with matched `end_at` value.
      schema:
        type: integer
    EndAtGt:
      name: end_at.gt
      in: query
      description: Unix timestamp filter that returns items with `end_at` greater than given value.
      schema:
        type: integer
    EndAtGte:
      name: end_at.gte
      in: query
      description: Unix timestamp filter that returns items with `end_at` greater than or equal given value.
      schema:
        type: integer
    EndAtLt:
      name: end_at.lt
      in: query
      description: Unix timestamp filter that returns items with `end_at` less than given value.
      schema:
        type: integer
    EndAtLte:
      name: end_at.lte
      in: query
      description: Unix timestamp filter that returns items with `end_at` less than or equal given value.
      schema:
        type: integer
    DiscountCode:
      name: code
      in: query
      description: A string representing the discount code filter
      schema:
        type: string
    ExpiryDate:
      name: expiry_date
      in: query
      description: Unix timestamp filter that returns items with matched `expiry_date` value.
      schema:
        type: integer
    ExpiryDateGt:
      name: expiry_date.gt
      in: query
      description: Unix timestamp filter that returns items with `expiry_date` greater than the given value.
      schema:
        type: integer
    ExpiryDateGte:
      name: expiry_date.gte
      in: query
      description: Unix timestamp filter that returns items with `expiry_date` greater than or equal to the given value.
      schema:
        type: integer
    ExpiryDateLt:
      name: expiry_date.lt
      in: query
      description: Unix timestamp filter that returns items with `expiry_date` less than given value.
      schema:
        type: integer
    ExpiryDateLte:
      name: expiry_date.lte
      in: query
      description: Unix timestamp filter that returns items with `expiry_date` less than or equal given value.
      schema:
        type: integer
    EventId:
      name: event_id
      in: query
      description: A string representing the event ID
      schema:
        type: string
    EventSeriesId:
      name: event_series_id
      in: query
      description: A string representing the event series ID
      schema:
        type: string
    IssuedTicketId:
      name: issued_ticket_id
      in: query
      description: A string representing the issued ticket ID
      schema:
        type: string
    CheckInAt:
      name: check_in_at
      in: query
      description: Unix timestamp filter that returns items with matched `check_in_at` value.
      schema:
        type: integer
    CheckInAtGt:
      name: check_in_at.gt
      in: query
      description: Unix timestamp filter that returns items with `check_in_at` greater than the given value.
      schema:
        type: integer
    CheckInAtGte:
      name: check_in_at.gte
      in: query
      description: Unix timestamp filter that returns items with `check_in_at` greater than or equal to the given value.
      schema:
        type: integer
    CheckInAtLt:
      name: check_in_at.lt
      in: query
      description: Unix timestamp filter that returns items with `check_in_at` less than given value.
      schema:
        type: integer
    CheckInAtLte:
      name: check_in_at.lte
      in: query
      description: Unix timestamp filter that returns items with `check_in_at` less than or equal given value.
      schema:
        type: integer
    UpdatedAt:
      name: updated_at
      in: query
      description: Unix timestamp filter that returns items with matched `updated_at` value.
      schema:
        type: integer
    UpdatedAtGt:
      name: updated_at.gt
      in: query
      description: Unix timestamp filter that returns items with `updated_at` greater than the given value.
      schema:
        type: integer
    UpdatedAtGte:
      name: updated_at.gte
      in: query
      description: Unix timestamp filter that returns items with `updated_at` greater than or equal to the given value.
      schema:
        type: integer
    UpdatedAtLt:
      name: updated_at.lt
      in: query
      description: Unix timestamp filter that returns items with `updated_at` less than given value.
      schema:
        type: integer
    UpdatedAtLte:
      name: updated_at.lte
      in: query
      description: Unix timestamp filter that returns items with `updated_at` less than or equal given value.
      schema:
        type: integer
    OverrideId:
      name: override_id
      in: query
      description: A string representing the event override ID
      schema:
        type: string
    OverrideReferenceId:
      name: reference_id
      in: query
      description: A string representing the referenced ticket typ or ticket group
      schema:
        type: string
    OverrideReferenceType:
      name: reference_type
      in: query
      description: A string representing the reference type, either ticket or ticket_group
      schema:
        type: string
        enum: ["ticket", "ticket_group"]
    OverrideStatus:
      name: status
      in: query
      description: A string representing override status
      schema:
        type: string
        enum:
          [
            "ON_SALE",
            "SOLD_OUT",
            "UNAVAILABLE",
            "HIDDEN",
            "ADMIN_ONLY",
            "LOCKED",
          ]
    Notified:
      name: is_notified
      in: query
      description: Used for filtering notified waitlist signups
      schema:
        type: integer
    Email:
      name: email
      in: query
      description: Used for filtering waitlist signups by email
      schema:
        type: integer
    EventIds:
      name: event_ids
      in: query
      description: Used for filtering waitlist signups by events they belong to
      schema:
        type: string

  responses:
    ErrorModel:
      description: "Error schema"
      content:
        application/json:
          schema:
            type: object
            required:
              - status
              - error_code
              - message
            properties:
              status:
                type: integer
                description: "Http status code"
                example: 400
              error_code:
                type: string
                description: "Readable error code"
                example: "VALIDATION_ERROR"
              message:
                type: string
                description: "Detailed error message"
                example: "One or more fields failed validation"
              errors:
                type: array
                description: "Validation errors if `POST` request was sent. Otherwise not present."
                items:
                  type: object
                  properties:
                    field:
                      type: string
                      description: "Field name that failed validation"
                      example: "name"
                    value:
                      type: string
                      description: "Value of the field that failed validation"
                      nullable: true
                      example: null
                    messages:
                      type: array
                      description: "Validation error message"
                      items:
                        type: string
                      example: ["Value is required and can't be empty"]
                    expected:
                      type: array
                      description: "Expected value of the field. Can be an empty array if no specific validation rules apply."
                      example: []
                      minItems: 0
                      items:
                        oneOf:
                          - type: object
                            properties:
                              type:
                                type: string
                                enum: ["enum"]
                                description: "Type of validation rule"
                              allowedValues:
                                type: array
                                description: "Array of allowed values for the field"
                                items:
                                  oneOf:
                                    - type: string
                                    - type: number
                                    - type: integer
                                    - type: boolean
                            required:
                              - type
                              - allowedValues

    WebhookOk:
      description: Return a 200 status to indicate that the data was received successfully

    VoidedIssuedTicket:
      description: Successfully voided ticket
      content:
        application/json:
          schema:
            type: object
            properties:
              id:
                description: ID of the voided ticket
                type: string
                example: it_123
              hold_id:
                description: ID of the associated hold, if applicable, 'null' if not
                type: string
                nullable: true
                example: ho_345
              object:
                type: string
                example: issued_ticket
              voided:
                description: Voiding operation successful or not
                type: string
                example: "true"

    ConfirmPaymentReceived:
      description: Successfully confirmed payment received
      content:
        application/json:
          schema:
            type: object
            properties:
              id:
                description: ID of the order
                type: string
                example: or_123
              object:
                type: string
                example: order
              payment_received:
                description: Payment received status of the order
                type: string
                example: "true"

    DeletedDiscount:
      description: Successfully deleted the given discount
      content:
        application/json:
          schema:
            type: object
            properties:
              id:
                description: ID of the deleted discount
                type: string
                example: di_123
              object:
                type: string
                example: discount
              deleted:
                description: Delete operation successful
                type: string
                example: true

    VoidedVoucherCode:
      description: Successfully voided voucher code
      content:
        application/json:
          schema:
            type: object
            properties:
              id:
                description: ID of the voided voucher code
                type: string
                example: vc_123
              object:
                type: string
                example: voucher_code
              voided:
                description: Voiding operation successful or not
                type: string
                example: true

    DeletedVoucher:
      description: Successfully deleted the given voucher and its voucher codes
      content:
        application/json:
          schema:
            type: object
            properties:
              id:
                description: ID of the deleted voucher
                type: string
                example: vo_123
              object:
                type: string
                example: voucher
              deleted:
                description: Delete operation successful
                type: string
                example: true

    DeletedEventSeries:
      description: Successfully deleted the given event series and its events
      content:
        application/json:
          schema:
            type: object
            properties:
              id:
                description: ID of the deleted event series
                type: string
                example: es_123
              object:
                type: string
                example: event_series
              deleted:
                description: Delete operation successful
                type: string
                example: true

    DeletedEventOccurrence:
      description: Successfully deleted the given event occurrence
      content:
        application/json:
          schema:
            type: object
            properties:
              id:
                description: ID of the deleted event series
                type: string
                example: es_123
              object:
                type: string
                example: event
              deleted:
                description: Delete operation successful if the event occurrence has no orders
                type: string
                enum: ["true", "false"]
                example: "true"
              hidden:
                description: The event occurrence is hidden if it has orders
                type: string
                enum: ["true", "false"]
                example: "false"

    DeletedTicketType:
      description: Successfully deleted the given ticket type
      content:
        application/json:
          schema:
            type: object
            properties:
              id:
                description: ID of the deleted ticket type
                type: string
                example: tt_123
              object:
                type: string
                example: ticket_type
              deleted:
                description: Delete operation successful
                type: string
                enum: ["true", "false"]
                example: "false"

    DeletedTicketGroup:
      description: Successfully deleted the given ticket group
      content:
        application/json:
          schema:
            type: object
            properties:
              id:
                description: ID of the deleted ticket group
                type: string
                example: tg_123
              object:
                type: string
                example: ticket_group
              deleted:
                description: Delete operation successful
                type: string
                enum: ["true", "false"]
                example: "true"

    DeletedHold:
      description: Successfully deleted the given hold
      content:
        application/json:
          schema:
            type: object
            properties:
              id:
                description: ID of the deleted hold
                type: string
                example: ho_123
              object:
                type: string
                example: hold
              deleted:
                description: Delete operation successful
                type: string
                enum: ["true", "false"]
                example: "true"

    DeletedProduct:
      description: Successfully deleted the given product
      content:
        application/json:
          schema:
            type: object
            properties:
              id:
                description: ID of the deleted product
                type: string
                example: pr_123
              object:
                type: string
                example: product
              deleted:
                description: Delete operation successful
                type: string
                enum: ["true", "false"]
                example: "true"

    DeletedBundle:
      description: Successfully deleted the given bundle
      content:
        application/json:
          schema:
            type: object
            properties:
              id:
                description: ID of the deleted bundle
                type: string
                example: bu_123
              object:
                type: string
                example: bundle
              deleted:
                description: Delete operation successful
                type: string
                enum: ["true", "false"]
                example: "true"

    DeletedWaitlistSignup:
      description: Successfully deleted the given waitlist signup
      content:
        application/json:
          schema:
            type: object
            properties:
              id:
                description: ID of the deleted waitlist signup
                type: string
                example: wa_123
              object:
                type: string
                example: waitlist_signup
              deleted:
                description: Delete operation successful
                type: string
                enum: ["true", "false"]
                example: "true"

  securitySchemes:
    BasicAuth:
      description: >
        Use base64 encoded api key created in Ticket Tailor dashboard.
      type: http
      scheme: basic

  headers:
    X-Rate-Limit-Limit:
      description: "The number of requests allowed for the current period"
      schema:
        format: int32
        type: integer
    X-Rate-Limit-Remaining:
      description: "The number of requests remaining for the current period"
      schema:
        format: int32
        type: integer
    X-Rate-Limit-Reset:
      description: "The number of seconds left for the current period"
      schema:
        format: int32
        type: integer

  schemas:
    CheckIn:
      type: object
      properties:
        object:
          type: string
        id:
          type: string
        check_in_at:
          description: "Timestamp of when the ticket is checked in or out"
          type: integer
        created_at:
          description: "Check in creation timestamp"
          type: integer
        event_id:
          description: "The ID of the associated event"
          type: string
        issued_ticket_id:
          description: "The ID of the associated ticket that is to be checked in or out"
          type: string
        local_unique_id:
          description: "The optional unique ID that safegards from accidentally checking in multiple times"
          type: string
        quantity:
          description: "in=1, out=-1"
          type: integer
      example:
        object: "check_in"
        id: "ci_123"
        check_in_at: 1580211492
        created_at: 1580211492
        event_id: "ev_40980"
        issued_ticket_id: "it_50199"
        local_unique_id: "4c2eae10-2dd7-11ed-a261-0242ac120002-b3fd6e91-334e-4d99-8cb3-322452a54b2a"
        quantity: 1

    Device:
      type: object
      properties:
        object:
          type: string
        id:
          type: string
        unique_device_id:
          type: string
        device_name:
          type: string
        device_details:
          type: object
          additionalProperties: true
        created_at:
          type: integer
          description: "Device creation timestamp"
        updated_at:
          type: integer
          description: "Timestamp of when the device was last updated"
      example:
        object: "device"
        id: "de_1"
        user_id: "ak_1"
        unique_device_id: "123e4567-e89b-12d3-a456-426655440000"
        device_name: "Alfies iPhone"
        device_details:
          app_version: "1.4"
        created_at: 1263559247
        updated_at: 1263559247

    Event:
      type: object
      properties:
        object:
          type: string
        id:
          type: string
          description: A unique identifier for the event
        available_status:
          description: Optional custom status message when event is set to be available
          type: string
          nullable: true
        chk:
          description: Used for Ticket Tailor checkout chk value
          type: string
        access_code:
          type: string
          nullable: true
          description: Code to access a protected event
        call_to_action:
          type: string
          description: Call to action text used on the event page
        checkout_url:
          type: string
          description: Event checkout URL
        created_at:
          type: integer
        currency:
          description: Information about the currency the event is configured to use
          type: string
          enum:
            [
              gbp,
              usd,
              eur,
              sgd,
              aud,
              brl,
              cad,
              czk,
              dkk,
              hkd,
              huf,
              ils,
              jpy,
              myr,
              mxn,
              nok,
              nzd,
              php,
              pln,
              rub,
              sek,
              chf,
              twd,
              thb,
              try,
            ]
        description:
          type: string
          description: Description of the event
          nullable: true
        end:
          properties:
            date:
              type: string
              description: ISO-8601 date for the end of the event
            formatted:
              type: string
              description: A formatted date string for the end of the event
            iso:
              type: string
              description: ISO-8601 date and time for the end of the event
            time:
              type: string
              description: Time of the end of the event
            timezone:
              type: string
              description: Timezone offset for the end of the event
            unix:
              type: integer
              description: Unix timestamp for for the end of the event
        event_series_id:
          type: string
          description: Recurring events are grouped by an event_series_id
        hidden:
          type: string
          enum: [true, false]
          description: True, if event is set to hidden
        images:
          description: Images that have been uploaded to this event
          properties:
            header:
              type: string
              description: Image URL of the header image used on your event page
            thumbnail:
              type: string
              description: Image URL of the thumbnail used on your event page
        max_tickets_sold_per_occurrence:
          type: integer
          description: Maximum quantity of tickets that can be sold across all ticket types
          nullable: true
        name:
          type: string
          description: Name of the event
        online_event:
          type: string
          enum: [true, false]
          description: Returns whether or not the event is online
        online_link:
          type: string
          description: URL of the online event
          nullable: true
        override_id:
          type: integer
          description: A unique identifier for the associated override
          nullable: true
        payment_methods:
          description: An array of payment methods
          type: array
          items:
            properties:
              external_id:
                type: string
                description: A unique identifier for the payment method
              id:
                type: string
                description: A unique identifier for internal payment methods
              type:
                type: string
                enum: [stripe, paypal, offline]
                description: The type of payment method
              name:
                type: string
                description: Name of the payment method
              instructions:
                type: string
                description: Instructions for the customer on how to pay. Used for offline payments.
        private:
          type: string
          enum: [true, false]
          description: Returns whether or not the event is private
        revenue:
          type: number
          description: Total revenue of the event
        sales_tax_label:
          description: The label for the sales tax
          type: string
          nullable: true
        sales_tax_percentage:
          description: The percentage of the sales tax
          type: integer
          nullable: true
        sales_tax_treatment:
          description: The treatment of the sales tax
          type: string
          enum: ["inclusive", "exclusive"]
          nullable: true
        show_map:
          description: Returns whether or not the map should be shown on the event page. It depends if venue location is set and if the event is not online and hide map is not set in the event series.
          type: string
          enum: [true, false]
        start:
          properties:
            date:
              type: string
              description: ISO-8601 date for the start of the event
            formatted:
              type: string
              description: A formatted date string for the start of the event
            iso:
              type: string
              description: ISO-8601 date and time for the start of the event
            time:
              type: string
              description: Time of the start of the event
            timezone:
              type: string
              description: Timezone offset for the start of the event
            unix:
              type: integer
              description: Unix timestamp for the start of the event
        status:
          type: string
          description: Status of the event
          enum: [draft, published, sales_closed]
        ticket_groups:
          type: array
          items:
            $ref: "#/components/schemas/TicketGroup"
          nullable: true
        ticket_types:
          type: array
          items:
            $ref: "#/components/schemas/TicketType"
          nullable: true
        tickets_available:
          type: string
          enum: [true, false]
          description: Are there any ticket types available?
          nullable: true
        tickets_available_at:
          description: Timestamp in UTC in seconds when tickets become available for purchase
          type: integer
          example: 1893511380
          nullable: true
        tickets_available_at_message:
          description: Message to show when tickets are not yet available to purchase. {countdown} is replaced with time remaining until tickets become available
          type: string
        tickets_unavailable_at:
          description: Timestamp in UTC in seconds when tickets become unavailable for purchase
          type: integer
          example: 1893511380
          nullable: true
        tickets_unavailable_at_message:
          description: Message to show when tickets are unavailable to purchase
          type: string
        timezone:
          type: string
          description: TZ format timezone string
        total_holds:
          type: integer
          description: Total number of holds
        total_issued_tickets:
          type: integer
          description: Total number of issued tickets
        total_orders:
          type: integer
          description: Total number of orders
        transaction_fee_fixed_amount:
          description: Fixed amount of the transaction fee
          type: integer
          nullable: true
        transaction_fee_percentage:
          description: Percentage of the transaction fee
          type: integer
          nullable: true
        unavailable:
          type: string
          enum: [true, false]
          description: True, if event is set to unavailable
        unavailable_status:
          type: string
          description: optional custom status message when event is set to be unavailable
          nullable: true
        url:
          type: string
          description: Event page URL
        venue:
          properties:
            country:
              type: string
              nullable: true
              description: Country of the venue
            name:
              type: string
              nullable: true
              description: Name of the venue
            postal_code:
              type: string
              nullable: true
              description: Postal code of the venue
        voucher_ids:
          description: List of voucher IDs
          type: array
          items:
            type: string
        waitlist_active:
          description: "Indicates whether waitlist is enabled for the event series"
          type: string
          enum: ["true", "no_tickets_available", "false"]
        waitlist_call_to_action:
          description: "The text displayed on event action buttons and as a title above the waitlist format"
          type: string
        waitlist_event_page_text:
          description: "Description above ticket waitlist form"
          type: string
        waitlist_confirmation_message:
          description: "Text shown to the user after they have signed up to the waitlist"
          type: string
      example:
        object: event
        id: ev_1
        available_status: "This event is available"
        chk: "da99"
        access_code:
        call_to_action: "Buy tickets / Join the guestlist"
        checkout_url: "https://www.tickettailor.com/checkout/view-event/id/1/chk/da99/"
        created_at: 1583771084
        currency: "gbp"
        description:
        end:
          date: "2020-05-01"
          formatted: "Fri 1 May 2020 10:30 PM"
          iso: "2020-05-01T22:30:00+01:00"
          time: "22:30"
          timezone: "+01:00"
          unix: 1588368600
        hidden: "false"
        images:
          header: "https://d37ecpm5it19bz.cloudfront.net/c_crop,dpr_1.0,h_1921,q_100,w_1922,x_479,y_0/c_scale,g_center,h_326,q_85,w_1024/v1/stitching/userfiles/acfi9eknr1vur6wguu5s.jpg"
          thumbnail: "https://d37ecpm5it19bz.cloudfront.net/c_crop,dpr_1.0,h_1921,q_100,w_1922,x_479,y_0/c_scale,h_108,q_85,w_108/v1/stitching/userfiles/acfi9eknr1vur6wguu5s.jpg"
        max_tickets_sold_per_occurrence: null
        name: "Hackney Downs 2020 Tulip Festival"
        online_event: "false"
        online_link: null
        override_id: null
        payment_methods:
          - external_id:
            id: pm_6687
            instructions: "Pay when you arrive to festival"
            name: "Pay on the door"
            type: offline
          - external_id: seller222@example.com
            id: pm_6691
            instructions:
            name:
            type: paypal
        private: "false"
        revenue: 0
        show_map: "true"
        sales_tax_label: "VAT"
        sales_tax_percentage: 20
        sales_tax_treatment: "exclusive"
        start:
          date: "2020-05-01"
          formatted: "Fri 1 May 2020 6:00 PM"
          iso: "2020-05-01T18:00:00+01:00"
          time: "18:00"
          timezone: "+01:00"
          unix: 1588352400
        status: "published"
        ticket_groups:
          - object: ticket_group
            id: tg_21099
            bundle_ids: []
            max_per_order: 10
            max_quantity: 100
            min_per_order: 1
            name: "April 20th"
            sort_order: 50050
            ticket_ids: [tt_230625, tt_230626]
          - object: ticket_group
            id: tg_21100
            bundle_ids: []
            max_per_order: 10
            max_quantity: 100
            min_per_order: 1
            name: "April 21st"
            sort_order: 50100
            ticket_ids: [tt_230631, tt_230632]
        ticket_types:
          - object: ticket_type
            id: tt_230625
            access_code:
            booking_fee: 0
            description:
            group_id: tg_21099
            max_per_order: 100
            min_per_order: 1
            name: "4.20 Adult (13-61) - Presale"
            price: 800
            status: hidden
            sort_order: 50050
            type: paid
            quantity: 10000
            quantity_held: 0
            quantity_issued: 5000
            quantity_total: 15000
          - object: ticket_type
            id: tt_230626
            access_code:
            booking_fee: 0
            description:
            group_id: tg_21099
            max_per_order: 100
            min_per_order: 1
            name: "4.20 Senior (62+) - Presale"
            price: 600
            status: on_sale
            sort_order: 50051
            type: paid
            quantity: 10000
            quantity_held: 0
            quantity_issued: 2000
            quantity_total: 12000
          - object: ticket_type
            id: tt_230631
            access_code:
            booking_fee: 0
            description:
            group_id: tg_21100
            max_per_order: 100
            min_per_order: 1
            name: "4.21 Adult (13-61) - Presale"
            price: 800
            status: on_sale
            sort_order: 50100
            type: paid
            quantity: 10000
            quantity_held: 0
            quantity_issued: 4000
            quantity_total: 14000
          - object: ticket_type
            id: tt_230632
            access_code:
            booking_fee: 0
            description:
            group_id: tg_21100
            max_per_order: 100
            min_per_order: 1
            name: "4.21 Senior (62+) - Presale"
            price: 600
            status: on_sale
            sort_order: 50101
            type: paid
            quantity: 10000
            quantity_held: 0
            quantity_issued: 1000
            quantity_total: 11000
        tickets_available: "true"
        tickets_available_at: 1893511380
        tickets_available_at_message: "Tickets are available in {countdown}"
        tickets_unavailable_at: 1893511381
        tickets_unavailable_at_message: "Tickets are no longer available"
        timezone: "Europe/London"
        total_holds: 0
        total_issued_tickets: 2
        total_orders: 1
        transaction_fee_fixed_amount: null
        transaction_fee_percentage: 10
        unavailable: "false"
        unavailable_status:
        url: "https://www.tickettailor.com/events/flowerfestival/40980"
        venue:
          country: "GB"
          name: "Flower festival gardens"
          postal_code: SW1 3BR
        voucher_ids: ["vo_123", "vo_345"]
        waitlist_active: "true"
        waitlist_call_to_action: "Join waiting list"
        waitlist_event_page_text: "Description above ticket waitlist form"
        waitlist_confirmation_message: "Done! You are on the waiting list."

    Hold:
      type: object
      properties:
        object:
          type: string
        id:
          type: string
          description: A unque identifier for the hold
        created_at:
          properties:
            date:
              type: string
              description: ISO-8601 date for the created timestamp of the hold
            formatted:
              type: string
              description: A formatted date string for the created timestamp of the hold
            iso:
              type: string
              description: ISO-8601 date and time for the created timestamp of the hold
            time:
              type: string
              description: Time of the created timestamp of the hold
            timezone:
              type: string
              description: Timezone offset for the created timestamp of the hold
            unix:
              type: integer
              description: Unix timestamp for when the hold was created
        event_id:
          type: string
          description: ID of the event that the hold belongs to
        note:
          type: string
          description: A note for the hold
        total_on_hold:
          type: integer
          description: Total number of tickets on hold
        updated_at:
          properties:
            date:
              type: string
              description: ISO-8601 date for the updated timestamp of the hold
            formatted:
              type: string
              description: A formatted date string for the updated timestamp of the hold
            iso:
              type: string
              description: ISO-8601 date and time for the updated timestamp of the hold
            time:
              type: string
              description: Time of the updated timestamp of the hold
            timezone:
              type: string
              description: Timezone offset for the updated timestamp of the hold
            unix:
              type: integer
              description: Unix timestamp for when the hold was updated
        quantities:
          type: array
          description: Hold quantities for each of the associated ticket type ID
          items:
            type: object
            properties:
              ticket_type_id:
                type: string
                description: Ticket type ID
              quantity:
                type: integer
                description: Number of held tickets of this type
      example:
        object: "hold"
        id: "ho_1"
        created_at:
          date: "2020-05-01"
          formatted: "Fri 1 May 2020 10:30 PM"
          iso: "2020-05-01T22:30:00+01:00"
          time: "22:30"
          timezone: "+01:00"
          unix: 1588368600
        note: "This is the note about the hold"
        total_on_hold: 6
        update_at:
          date: "2020-05-01"
          formatted: "Fri 1 May 2020 10:30 PM"
          iso: "2020-05-01T22:30:00+01:00"
          time: "22:30"
          timezone: "+01:00"
          unix: 1588368600
        quantities:
          [
            { "ticket_type_id": "tt_1", "quantity": 1 },
            { "ticket_type_id": "tt_2", "quantity": 5 },
          ]

    MembershipType:
      type: object
      properties:
        object:
          type: string
          description: Object type identifier
          example: "membership_type"
        id:
          type: string
          description: A unique identifier for the membership type
          example: "mt_123"
        conditions_and_benefits:
          type: array
          description: List of conditions and benefits for this membership type
          items:
            type: string
          example: ["Free entry to all events", "10% discount on merchandise"]
        max_redemptions:
          type: integer
          nullable: true
          description: Maximum number of redemptions allowed per issued membership. Null means unlimited.
          example: 10
        name:
          type: string
          description: Name of the membership type
          example: "Annual Pass"
        photo_required:
          type: string
          enum: ["true", "false"]
          description: Whether a photo is required when issuing memberships of this type
          example: "false"
        valid_from_date:
          type: object
          nullable: true
          description: Fixed date when memberships of this type become valid. Null if valid_from_type is 'relative'.
          properties:
            date:
              type: string
              description: ISO-8601 date
            formatted:
              type: string
              description: A formatted date string
            iso:
              type: string
              description: ISO-8601 date and time
            time:
              type: string
              description: Time of the date
            timezone:
              type: string
              description: Timezone offset
            unix:
              type: integer
              description: Unix timestamp
        valid_from_type:
          type: string
          enum: [fixed, relative]
          description: "Type of valid from date. 'fixed' uses valid_from_date, 'relative' uses the date of issue."
          example: "relative"
        valid_to_date:
          type: object
          nullable: true
          description: Fixed date when memberships of this type expire. Null if valid_to_type is 'relative'.
          properties:
            date:
              type: string
              description: ISO-8601 date
            formatted:
              type: string
              description: A formatted date string
            iso:
              type: string
              description: ISO-8601 date and time
            time:
              type: string
              description: Time of the date
            timezone:
              type: string
              description: Timezone offset
            unix:
              type: integer
              description: Unix timestamp
        valid_to_relative_days:
          type: integer
          nullable: true
          description: Number of days the membership is valid for from the issue date. Null if valid_to_type is 'fixed'.
          example: 365
        valid_to_type:
          type: string
          enum: [fixed, relative]
          description: "Type of valid to date. 'fixed' uses valid_to_date, 'relative' uses valid_to_relative_days."
          example: "relative"
      example:
        object: "membership_type"
        id: "mt_123"
        conditions_and_benefits:
          ["Free entry to all events", "10% discount on merchandise"]
        max_redemptions: 10
        name: "Annual Pass"
        photo_required: "false"
        valid_from_date: null
        valid_from_type: "relative"
        valid_to_date: null
        valid_to_relative_days: 365
        valid_to_type: "relative"

    IssuedMembership:
      type: object
      properties:
        object:
          type: string
          description: Object type identifier
          example: "issued_membership"
        id:
          type: string
          description: A unique identifier for the issued membership
          example: "im_123"
        code:
          type: string
          description: Unique membership code for identification and redemption
          example: "MMABC123"
        benefits:
          type: array
          description: List of benefits associated with this membership
          items:
            type: string
          example: ["Free entry to all events", "10% discount on merchandise"]
        email:
          type: string
          description: Email address of the member
          example: "john.doe@example.com"
        first_name:
          type: string
          description: First name of the member
          example: "John"
        full_name:
          type: string
          description: Full name of the member
          example: "John Doe"
        is_valid:
          type: string
          enum: ["true", "false"]
          description: Whether the membership is currently valid (not expired and not voided)
          example: "true"
        issue_date:
          type: object
          description: Date and time when the membership was issued
          properties:
            date:
              type: string
              description: ISO-8601 date
            formatted:
              type: string
              description: A formatted date string
            iso:
              type: string
              description: ISO-8601 date and time
            time:
              type: string
              description: Time of the date
            timezone:
              type: string
              description: Timezone offset
            unix:
              type: integer
              description: Unix timestamp
        last_name:
          type: string
          description: Last name of the member
          example: "Doe"
        max_redemptions:
          type: integer
          nullable: true
          description: Maximum number of redemptions allowed. Null means unlimited.
          example: 10
        membership_type_id:
          type: string
          description: ID of the membership type
          example: "mt_456"
        membership_type_name:
          type: string
          description: Name of the membership type
          example: "Annual Pass"
        redemption_collection:
          type: array
          description: List of redemptions made with this membership
          items:
            $ref: "#/components/schemas/IssuedMembershipRedemption"
        redemptions:
          type: integer
          description: Number of times this membership has been redeemed
          example: 3
        valid_from:
          type: object
          description: Date and time when the membership becomes valid
          properties:
            date:
              type: string
              description: ISO-8601 date
            formatted:
              type: string
              description: A formatted date string
            iso:
              type: string
              description: ISO-8601 date and time
            time:
              type: string
              description: Time of the date
            timezone:
              type: string
              description: Timezone offset
            unix:
              type: integer
              description: Unix timestamp
        valid_to:
          type: object
          description: Date and time when the membership expires
          properties:
            date:
              type: string
              description: ISO-8601 date
            formatted:
              type: string
              description: A formatted date string
            iso:
              type: string
              description: ISO-8601 date and time
            time:
              type: string
              description: Time of the date
            timezone:
              type: string
              description: Timezone offset
            unix:
              type: integer
              description: Unix timestamp
        voided_at:
          type: object
          nullable: true
          description: Date and time when the membership was voided. Null if not voided.
          properties:
            date:
              type: string
              description: ISO-8601 date
            formatted:
              type: string
              description: A formatted date string
            iso:
              type: string
              description: ISO-8601 date and time
            time:
              type: string
              description: Time of the date
            timezone:
              type: string
              description: Timezone offset
            unix:
              type: integer
              description: Unix timestamp
      example:
        object: "issued_membership"
        id: "im_123"
        code: "MMABC123"
        benefits: ["Free entry to all events", "10% discount on merchandise"]
        email: "john.doe@example.com"
        first_name: "John"
        full_name: "John Doe"
        is_valid: "true"
        issue_date:
          date: "2024-01-01"
          formatted: "Mon 1 Jan 2024 12:00 PM"
          iso: "2024-01-01T12:00:00+00:00"
          time: "12:00"
          timezone: "+00:00"
          unix: 1704110400
        last_name: "Doe"
        max_redemptions: 10
        membership_type_id: "mt_456"
        membership_type_name: "Annual Pass"
        redemption_collection: []
        redemptions: 0
        valid_from:
          date: "2024-01-01"
          formatted: "Mon 1 Jan 2024 12:00 PM"
          iso: "2024-01-01T12:00:00+00:00"
          time: "12:00"
          timezone: "+00:00"
          unix: 1704110400
        valid_to:
          date: "2024-12-31"
          formatted: "Tue 31 Dec 2024 11:59 PM"
          iso: "2024-12-31T23:59:59+00:00"
          time: "23:59"
          timezone: "+00:00"
          unix: 1735689599
        voided_at: null

    IssuedMembershipRedemption:
      type: object
      properties:
        object:
          type: string
          description: Object type identifier
          example: "issued_membership_redemption"
        id:
          type: string
          description: A unique identifier for the redemption
          example: "ir_789"
        created_at:
          type: string
          format: date-time
          description: ISO-8601 datetime when the redemption was created
          example: "2024-03-15T14:30:00+00:00"
        description:
          type: string
          description: Description of the redemption
          example: "Entry to Summer Festival 2024"
        issued_membership_id:
          type: string
          description: ID of the issued membership this redemption belongs to
          example: "im_123"
        linked_event_id:
          type: string
          nullable: true
          description: ID of the linked event, if applicable
          example: "ev_456"
        linked_order_id:
          type: string
          nullable: true
          description: ID of the linked order, if applicable
          example: "or_789"
      example:
        object: "issued_membership_redemption"
        id: "ir_789"
        created_at: "2024-03-15T14:30:00+00:00"
        description: "Entry to Summer Festival 2024"
        issued_membership_id: "im_123"
        linked_event_id: "ev_456"
        linked_order_id: null

    IssuedTicket:
      type: object
      required:
        - object
        - id
        - barcode
        - barcode_url
        - checked_in
        - created_at
        - custom_questions
        - description
        - email
        - event_id
        - event_series_id
        - group_ticket_barcode
        - full_name
        - first_name
        - last_name
        - reservation
        - status
        - ticket_type_id
        - updated_at
        - voided_at
        - order_id
        - qr_code_url
        - reference
        - source
      properties:
        object:
          type: string
        id:
          type: string
          description: A unique identifier for the issued ticket
        add_on_id:
          type: string
          description: A unique identifier for the associated product
          nullable: true
        barcode:
          type: string
          description: Barcode text value
        barcode_url:
          type: string
          description: URL to barcode image
        checked_in:
          type: string
          enum: [true, false]
          description: Returns whether or not issued ticket is checked in
        created_at:
          type: integer
          description: Timestamp when issued ticket was created
        custom_questions:
          type: array
          description: Buyer provided answers to custom questions in checkout
          items:
            properties:
              question:
                type: string
              answer:
                type: string
                nullable: true
        description:
          type: string
        email:
          type: string
          description: The order email address
          nullable: true
        event_id:
          type: string
          description: ID of the event issued ticket belongs to
        event_series_id:
          type: string
          description: ID of the event series the issued ticket belongs to
        group_ticket_barcode:
          type: string
          description: Barcode for group ticket, if it is part of one
          nullable: true
        reference:
          type: string
          nullable: true
          description: An external reference for imported tickets (via the API or Dashboard)
        full_name:
          type: string
          nullable: true
          description: "Full name of attendee"
        first_name:
          type: string
          nullable: true
          description: "First name of attendee"
        last_name:
          type: string
          nullable: true
          description: "Last name of attendee"
        listed_currency:
          type: object
          nullable: true
          description: "List currency of the ticket type at the time of purchase"
          properties:
            base_multiplier:
              type: integer
            code:
              type: string
              enum:
                [
                  gbp,
                  usd,
                  eur,
                  sgd,
                  aud,
                  brl,
                  cad,
                  czk,
                  dkk,
                  hkd,
                  huf,
                  ils,
                  jpy,
                  myr,
                  mxn,
                  nok,
                  nzd,
                  php,
                  pln,
                  rub,
                  sek,
                  chf,
                  twd,
                  thb,
                  try,
                ]
        listed_price:
          type: integer
          nullable: true
          description: "List price of the ticket type at the time of purchase"
        reservation:
          type: string
          nullable: true
          description: "Reservation from seating chart where applicable"
        status:
          type: string
          enum: [valid, voided]
        source:
          type: string
          nullable: true
          enum: [api, dashboard_import]
        ticket_type_id:
          type: string
          description: ID of the ticket type
          nullable: true
        updated_at:
          type: integer
          description: Timestamp when issued ticket was last updated
        voided_at:
          type: integer
          nullable: true
          description: Timestamp when issued ticket was voided
        order_id:
          type: string
          nullable: true
          description: A unique identifier for the order
        qr_code_url:
          type: string
          description: URL to QR code image
      example:
        object: issued_ticket
        id: it_50198
        add_on_id: pr_123
        barcode: "al4R5"
        barcode_url: "https://www.tickettailor.com/userfiles/cache/barcode/qr/attendee/50198/42bf63ef2a055b91a62f"
        checked_in: "false"
        created_at: 1587042697
        custom_questions: []
        description: "Free ticket"
        email: "john@example.com"
        event_id: ev_40980
        event_series_id: es_596
        group_ticket_barcode: null
        reference: "my reference code"
        full_name: "John Doe"
        first_name: "John"
        last_name: "Doe"
        listed_currency:
          base_multiplier: 100
          code: "gbp"
        listed_price: 100
        status: valid
        source: api
        ticket_type_id: tt_230656
        updated_at: 1587042697
        voided_at: null
        order_id: or_737352
        qr_code_url: "https://www.tickettailor.com/userfiles/cache/barcode/st/attendee/50198/42bf63ef2a055b91a62f"

    SoldProduct:
      type: object
      required:
        - object
        - id
        - event_id
        - fulfilment
        - fulfilment_reference_id
        - fulfilment_reference_name
        - order_id
        - product_id
        - product_name
        - sales_channel
        - sales_channel_reference_name
        - status
        - store_id
      properties:
        object:
          type: string
        id:
          type: string
          description: A unique identifier for the sold product
        event_id:
          type: string
          nullable: true
          description: ID of the event if sold through event sales channel
        fulfilment:
          type: string
          enum: [none, issued_ticket, issued_membership, issued_voucher]
          description: Type of fulfilment for this product
        fulfilment_reference_id:
          type: string
          nullable: true
          description: Prefixed ID of the issued ticket (it_), membership (im_), or voucher (vo_) if fulfilled
        fulfilment_reference_name:
          type: string
          nullable: true
          description: Name/label of the fulfilment reference
        order_id:
          type: string
          description: A unique identifier for the order
        product_id:
          type: string
          description: A unique identifier for the product
        product_name:
          type: string
          description: Name of the product
        sales_channel:
          type: string
          enum: [event, store]
          description: Where the product was sold (event or store)
        sales_channel_reference_name:
          type: string
          description: Display name of the event or store
        status:
          type: string
          enum: [valid, voided]
          description: Status of the sold product
        store_id:
          type: integer
          nullable: true
          description: ID of the store if sold through store sales channel
      example:
        object: sold_product
        id: sp_12345
        event_id: ev_40980
        fulfilment: none
        fulfilment_reference_id: null
        fulfilment_reference_name: null
        order_id: or_737352
        product_id: pr_5678
        product_name: "Coffee Mug"
        sales_channel: event
        sales_channel_reference_name: "Concert - Event Name"
        status: valid
        store_id: null

    PaymentMethod:
      type: object
      required:
        - external_id
        - id
        - type
        - name
        - instructions
        - additional_stripe_payment_methods
        - paypal_pay_later_enabled
        - min_order_value
        - max_order_value
        - lead_time_before_event
      properties:
        external_id:
          type: string
          nullable: true
          description: A unique identifier for the payment method
        id:
          type: string
          nullable: true
          description: A unique identifier for internal payment methods
        type:
          type: string
          enum: [no_cost, offline, operator, paypal, stripe, transfer]
          description: The type of payment method
        name:
          type: string
          nullable: true
          description: Name of the payment method
        instructions:
          type: string
          nullable: true
          description: Instructions for the customer on how to pay. Used for offline payments.
        additional_stripe_payment_methods:
          type: array
          items:
            type: string
          description: Additional Stripe payment methods enabled on this method, e.g. ideal, klarna. Empty for non-Stripe types.
        paypal_pay_later_enabled:
          type: string
          description: Whether PayPal Buy Now Pay Later is enabled on this method. Always false for non-PayPal types.
        min_order_value:
          type: number
          format: float
          nullable: true
          description: Minimum order total required to use this payment method. Used for offline methods.
        max_order_value:
          type: number
          format: float
          nullable: true
          description: Maximum order total allowed for this payment method. Used for offline methods.
        lead_time_before_event:
          type: integer
          nullable: true
          description: Minimum number of days before the event start that an order using this payment method must be placed. Used for offline methods.

    Order:
      type: object
      required:
        - object
        - id
        - subtotal
        - tax
        - total
        - total_paid
        - payment_method
        - txn_id
        - status
        - status_message
        - created_at
        - refund_amount
        - refunded_voucher_id
        - referral_tag
        - currency
        - line_items
        - buyer_details
        - issued_tickets
        - sold_products
      properties:
        object:
          type: string
        id:
          type: string
          description: A unique identifier for the order
        buyer_details:
          description: Information buyer provided in the checkout
          type: object
          required:
            - address
            - name
            - first_name
            - last_name
            - email
            - phone
          properties:
            address:
              description: Information about buyer address
              type: object
              required:
                - address_1
                - address_2
                - address_3
                - postal_code
              properties:
                address_1:
                  type: string
                  nullable: true
                  description: First line of address
                address_2:
                  type: string
                  nullable: true
                  description: Second line of address
                address_3:
                  type: string
                  nullable: true
                  description: Third line of address
                postal_code:
                  type: string
                  nullable: true
                  description: Postal code, zip code or postcode
            custom_questions:
              type: array
              description: Buyer provided answers to custom questions in checkout
              items:
                type: object
                properties:
                  question:
                    type: string
                  answer:
                    type: string
                    nullable: true
            email:
              type: string
              description: Buyer email address
            first_name:
              type: string
              description: Buyer first name
            last_name:
              type: string
              description: Buyer last name
            name:
              type: string
              description: Buyer full name
            phone:
              type: string
              nullable: true
              description: Buyer phone number
        created_at:
          type: integer
          description: Order creation timestamp
        currency:
          description: Information about order currency
          type: object
          required:
            - code
            - base_multiplier
          properties:
            code:
              type: string
              enum:
                [
                  gbp,
                  usd,
                  eur,
                  sgd,
                  aud,
                  brl,
                  cad,
                  czk,
                  dkk,
                  hkd,
                  huf,
                  ils,
                  jpy,
                  myr,
                  mxn,
                  nok,
                  nzd,
                  php,
                  pln,
                  rub,
                  sek,
                  chf,
                  twd,
                  thb,
                  try,
                ]
              description: Currency used for purchase
            base_multiplier:
              type: integer
              description: Base multiplier for conversions
        event_summary:
          description: Short event summary this order was made for
          type: object
          properties:
            id:
              type: string
              description: ID of the event occurrence an order belongs to (deprecated)
            event_id:
              type: string
              description: ID of the event occurrence an order belongs to
            event_series_id:
              type: string
              description: ID of the event series an order belongs to
            name:
              type: string
              description: Name of the event
            start_date:
              description: The start date for the event in various formats
              type: object
              required:
                - date
                - time
                - timezone
                - formatted
                - unix
                - iso
              properties:
                date:
                  type: string
                  description: ISO-8601 date for the start of the event
                formatted:
                  type: string
                  description: A formatted date string for the start of the event
                iso:
                  type: string
                  description: ISO-8601 date and time for the start of the event
                time:
                  type: string
                  description: Time for the start of the event
                timezone:
                  type: string
                  description: Timezone offset for the start of the event
                unix:
                  type: integer
                  description: Unix timestamp for the start of the event
            end_date:
              description: The end date for the event in various formats
              type: object
              required:
                - date
                - time
                - timezone
                - formatted
                - unix
                - iso
              properties:
                date:
                  type: string
                  description: ISO-8601 date for the end of the event
                formatted:
                  type: string
                  description: A formatted date string for the end of the event
                iso:
                  type: string
                  description: ISO-8601 date and time for the end of the event
                time:
                  type: string
                  description: Time for the end of the event
                timezone:
                  type: string
                  description: Timezone offset for the end of the event
                unix:
                  type: integer
                  description: Unix timestamp for the end of the event
            venue:
              description: The venue information for the event
              type: object
              required:
                - name
                - postal_code
              properties:
                country:
                  type: string
                  nullable: true
                  description: Country of the venue
                name:
                  type: string
                  nullable: true
                  description: The name of the venue
                postal_code:
                  type: string
                  nullable: true
                  description: The postcode of the venue for this event
        issued_tickets:
          type: array
          nullable: true
          description: Issued tickets for order
          items:
            $ref: "#/components/schemas/IssuedTicket"
        sold_products:
          type: array
          nullable: true
          description: Sold products for order
          items:
            $ref: "#/components/schemas/SoldProduct"
        line_items:
          type: array
          items:
            description: Basket items
            type: object
            required:
              - object
              - type
              - id
              - description
              - quantity
              - value
              - booking_fee
              - total
            properties:
              object:
                type: string
              id:
                type: string
                description: A unique identifier for the basket item
              booking_fee:
                type: integer
                description: Optional booking fee which is charged per ticket type to the customer and the funds are paid to you.
              description:
                type: string
                description: Basket item description
              item_id:
                type: string
                description: The line item type id with a prefix.
                nullable: true
              quantity:
                type: integer
                description: Amount of line item objects
              store_id:
                type: string
                description: The store id prefixed with 'st_'
                nullable: true
              total:
                type: integer
                description: Total amount including tax for line item
              type:
                type: string
                enum:
                  [ticket, transaction_charge, void, tax, gift_card, donation]
                description: "`ticket` is a purchased ticket, `transaction_charge` is a transaction fee to orders. This is charged once per order as opposed to ticket booking fees which are charged once per ticket. `void` means ticket was voided after the purchase, `tax` is sales tax eg. VAT, `gift_card` is discount or voucher applied and `donation` is for donating value"
              value:
                type: integer
                description: Amount without tax
        marketing_opt_in:
          type: string
          nullable: true
          description: Whether the buyer opted in to receive marketing emails
        meta_data:
          type: array
          description: Meta data attached to the order
          items:
            type: object
            properties:
              key:
                type: string
              value:
                type: string
                nullable: true
        notes:
          type: string
          nullable: true
          description: Notes attached to the order
        payment_method:
          $ref: "#/components/schemas/PaymentMethod"
        refund_amount:
          type: integer
          description: Refunded amount in cents
        refunded_voucher_id:
          type: integer
          nullable: true
          description: The unique identifier for the existing voucher
        credited_out_amount:
          type: integer
          description: Refunded amount issued as credit in cents
        referral_tag:
          type: string
          nullable: true
          description: A unique tag to track where sales originated
        status:
          type: string
          enum: [completed, pending, cancelled]
          description: Possible states of the order
        status_message:
          type: string
          nullable: true
          description: Message associated with status.
        subtotal:
          type: integer
          description: Sum without tax
        tax:
          type: integer
          description: Tax sum
        tax_treatment:
          type: string
          enum: [exclusive, inclusive]
          description: How tax was calculated
        total:
          type: integer
          description: Total value of order
        total_paid:
          type: integer
          description: Total amount paid for this order including tax
        txn_id:
          type: string
          nullable: true
          description: A unique identifier for the transaction
      example:
        object: "order"
        id: or_737352
        buyer_details:
          address:
            address_1: "The Queen's Walk"
            address_2: "Bishop's"
            address_3: "London"
            postal_code: "SE1 7PB"
          custom_questions: []
          email: "john@example.com"
          first_name: "John"
          last_name: "Doe"
          name: "John Doe"
          phone: "07123456789"
        created_at: 1587042691
        currency:
          base_multiplier: 100
          code: "gbp"
        event_summary:
          id: ev_40980
          event_id: ev_40980
          event_series_id: es_50897
          end_date:
            date: "2020-05-01"
            formatted: "Fri 1 May 2020 10:30 PM"
            iso: "2020-05-01T22:30:00+01:00"
            time: "22:30"
            timezone: "+01:00"
            unix: 1588368600
          name: "Hackney Downs 2020 Tulip Festival"
          start_date:
            date: "2020-05-01"
            formatted: "Fri 1 May 2020 6:00 PM"
            iso: "2020-05-01T18:00:00+01:00"
            time: "18:00"
            timezone: "+01:00"
            unix: 1588352400
          venue:
            country: "GB"
            name: "Royal Albert Hall"
            postal_code: "SW7 2AP"
        issued_tickets:
          - object: issued_ticket
            id: it_50198
            barcode: "al4R5"
            barcode_url: "https://www.tickettailor.com/userfiles/cache/barcode/qr/attendee/50198/42bf63ef2a055b91a62f"
            checked_in: "false"
            created_at: 1587042697
            custom_questions: []
            description: "Free ticket"
            email: "john@example.com"
            event_id: ev_40980
            reference: "my reference code"
            full_name:
            first_name:
            group_ticket_barcode:
            last_name:
            status: valid
            source: api
            ticket_type_id: tt_230656
            updated_at: 1587042697
            voided_at:
            order_id: or_737352
            qr_code_url: "https://www.tickettailor.com/userfiles/cache/barcode/st/attendee/50198/42bf63ef2a055b91a62f"
          - object: issued_ticket
            id: it_50199
            barcode: "dx2Fv"
            barcode_url: "https://www.tickettailor.com/userfiles/cache/barcode/qr/attendee/50199/633d33a7ff6eba30a565"
            checked_in: "false"
            created_at: 1587042697
            custom_questions: []
            description: "Free ticket"
            email: "john@example.com"
            event_id: ev_40980
            reference: "my reference code"
            full_name:
            first_name:
            group_ticket_barcode:
            last_name:
            status: valid
            source: api
            ticket_type_id: tt_230656
            updated_at: 1587042697
            voided_at:
            order_id: or_737352
            qr_code_url: "https://www.tickettailor.com/userfiles/cache/barcode/st/attendee/50199/633d33a7ff6eba30a565"
        line_items:
          - object: line_item
            id: li_1505167
            booking_fee: 0
            description: "Free ticket"
            item_id: tt_230656
            quantity: 2
            store_id: null
            total: 0
            type: ticket
            value: 0
        marketing_opt_in: null
        meta_data: []
        notes: null
        payment_method:
          external_id: seller222@example.com
          id: pm_6691
          instructions:
          name:
          type: paypal
        referral_tag: "website"
        refund_amount: 0
        refunded_voucher_id: null
        status: "completed"
        status_message:
        subtotal: 0
        tax: 0
        tax_treatment: exclusive
        total: 0
        txn_id: "ABCD1234"

    Overview:
      type: object
      properties:
        box_office_name:
          type: string
        climate_impact:
          description: Climate impact summary for the Box Office
          type: object
          nullable: true
          required:
            - contribution
            - estimated_footprint
          properties:
            contribution:
              type: integer
              description: Amount contributed to climate charities, in the smallest currency unit (e.g. cents)
            estimated_footprint:
              type: integer
              description: Estimated carbon footprint, in grams of CO2
        credits:
          type: number
          description: Credit balance for the Box Office
        currency:
          description: Information about revenue currency
          type: object
          required:
            - code
            - base_multiplier
            - symbol
          properties:
            code:
              type: string
              enum:
                [
                  gbp,
                  usd,
                  eur,
                  sgd,
                  aud,
                  brl,
                  cad,
                  czk,
                  dkk,
                  hkd,
                  huf,
                  ils,
                  jpy,
                  myr,
                  mxn,
                  nok,
                  nzd,
                  php,
                  pln,
                  rub,
                  sek,
                  chf,
                  twd,
                  thb,
                  try,
                ]
            base_multiplier:
              type: integer
              description: Base multiplier for conversions
            symbol:
              type: string
        event_occurrences_draft:
          type: number
        event_occurrences_published:
          type: number
        event_series_draft:
          type: number
        event_series_published:
          type: number
        next_event_in:
          type: number
          description: Time until the next scheduled event, measured in days
          nullable: true
        orders_received:
          type: number
          description: Orders received in the reporting period
        period:
          type: string
        revenue:
          type: number
        total_issued_tickets:
          type: number
        waitlist_signups:
          type: number
          description: Waitlist sign-ups received in the reporting period
      example:
        box_office_name: "My Box Office"
        climate_impact:
          contribution: 1200
          estimated_footprint: 45000
        credits: 250
        currency:
          base_multiplier: 100
          code: "gbp"
          symbol: "£"
        event_occurrences_draft: 4
        event_occurrences_published: 20
        event_series_draft: 1
        event_series_published: 5
        next_event_in: 7
        orders_received: 18
        period: "four weeks"
        revenue: 134000
        total_issued_tickets: 40
        waitlist_signups: 3

    TicketType:
      type: object
      required:
        - object
        - id
        - access_code
        - booking_fee
        - description
        - group_id
        - max_per_order
        - min_per_order
        - name
        - price
        - status
        - sort_order
        - type
        - quantity
        - quantity_held
        - quantity_issued
        - quantity_total
      properties:
        object:
          type: string
        id:
          type: string
          description: A unique identifier for the ticket type
        access_code:
          type: string
          nullable: true
          description: Code to access a hidden ticket
        booking_fee:
          type: integer
          description: Optional booking fee which is charged per ticket type to the customer and the funds are paid to you.
        description:
          type: string
          nullable: true
        discounts:
          description: An array of associated discounts
          type: array
          items:
            type: string
        group_id:
          type: string
          nullable: true
          description: ID of the group this ticket type belongs to
        has_overrides:
          type: string
          enum: ["true", "false"]
          description: Specifies whether the ticket type has overrides
        hide_after:
          description: Timestamp in seconds when the ticket type should be hidden until.
          type: object
          properties:
            date:
              description: ISO-8601 date for the start of the event
              type: string
            formatted:
              description: A formatted date string for the start of the event
              type: string
            iso:
              description: ISO-8601 date and time for the start of the event
              type: string
            time:
              description: Time for the start of the event
              type: string
            timezone:
              description: Timezone offset for the start of the event
              type: string
            unix:
              description: Unix timestamp for the start of the event
              type: integer
          nullable: true
        hide_until:
          description: Timestamp in seconds when the ticket type should be hidden after.
          type: object
          properties:
            date:
              description: ISO-8601 date for the start of the event
              type: string
            formatted:
              description: A formatted date string for the start of the event
              type: string
            iso:
              description: ISO-8601 date and time for the start of the event
              type: string
            time:
              description: Time for the start of the event
              type: string
            timezone:
              description: Timezone offset for the start of the event
              type: string
            unix:
              description: Unix timestamp for the start of the event
              type: integer
          nullable: true
        hide_when_sold_out:
          type: string
          enum: ["true", "false"]
          description: Specifies whether the ticket is hidden when it has sold out
        max_per_order:
          type: integer
          description: Maximum number of ticket types you can select per order
        min_per_order:
          type: integer
          description: Minimum number of ticket types you can select per order
        name:
          type: string
          description: Name of the ticket type
        override_id:
          type: string
          description: The ID of the override associated with the ticket type
          nullable: true
        price:
          anyOf:
            - type: integer
            - type: number
          description: Cost of the ticket type
        show_quantity_remaining:
          type: string
          enum: ["true", "false"]
          description: Specifies whether to show the number of tickets still available
        show_quantity_remaining_less_than:
          type: integer
          nullable: true
          description: Only show number of tickets still available when the available quantity is equal to or lower than this threshold
        status:
          type: string
          enum: [on_sale, sold_out, unavailable, hidden, admin_only, locked]
          description: Status of the ticket type
        sort_order:
          type: integer
          description: Sort index of ticket type in the UI
        type:
          type: string
          enum: [paid, free]
        quantity:
          type: integer
          description: Number available for purchase
        quantity_held:
          type: integer
          description: Number held
        quantity_in_baskets:
          type: integer
          description: Number in baskets
        quantity_issued:
          type: integer
          description: Number issued
        quantity_total:
          type: integer
          description: Total number including issued and still available
      example:
        object: ticket_type
        id: tt_230656
        access_code:
        booking_fee: 0
        description:
        discounts: ["di_123"]
        group_id: tg_21103
        has_overrides: "true"
        hide_after: 1744001007
        hide_until: null
        hide_when_sold_out: "false"
        max_per_order: 100
        min_per_order: 1
        name: "4.24 Child (3-12)- Day of event"
        override_id: ov_11
        price: 600
        show_quantity_remaining: "false"
        show_quantity_remaining_less_than: null
        status: on_sale
        sort_order: 50255
        type: paid
        quantity: 10000
        quantity_held: 10
        quantity_in_baskets: 0
        quantity_issued: 700
        quantity_total: 10710

    TicketGroup:
      type: object
      properties:
        object:
          type: string
        id:
          type: string
          description: A unique identifier for the ticket group
        bundle_ids:
          type: array
          items:
            type: string
          description: An array of associated bundle ids
          nullable: true
        max_per_order:
          type: integer
          description: Maximum number of tickets allowed per order
          nullable: true
        max_quantity:
          type: integer
          description: Maximum quantity of tickets that are allowed to be sold for the tickets in the group
          nullable: true
        min_per_order:
          type: integer
          description: Minimum number of tickets allowed per order
          nullable: true
        name:
          type: string
          description: Name of the ticket group
        sort_order:
          type: integer
          description: Sort index of the group in the UI
        ticket_ids:
          type: array
          items:
            type: string
          description: An array of associated ticket type ids
      example:
        object: ticket_group
        id: tg_11
        bundle_ids: ["bu_123", "bu_456"]
        max_per_order: 10
        max_quantity: 100
        min_per_order: 1
        name: "Sample Ticket Group"
        sort_order: 50255
        ticket_ids: ["tt_78", "tt_123", "tt_456"]

    DiscountResponse:
      type: object
      properties:
        object:
          type: string
        id:
          description: A unique identifier for the discount
          type: string
        booking_fee:
          description: Booking fee amount in cents. Could be null.
          type: integer
          nullable: true
        booking_fee_percent:
          description: Percent of the booking fee. Could be null.
          type: integer
          minimum: 0
          maximum: 100
          nullable: true
        code:
          description: Discount code
          type: string
        expires:
          description: Discount code's expiry date
          type: object
          properties:
            date:
              description: ISO-8601 date for the start of the event
              type: string
            formatted:
              description: A formatted date string for the start of the event
              type: string
            iso:
              description: ISO-8601 date and time for the start of the event
              type: string
            time:
              description: Time for the start of the event
              type: string
            timezone:
              description: Timezone offset for the start of the event
              type: string
            unix:
              description: Unix timestamp for the start of the event
              type: integer
          nullable: true
        max_redemptions:
          description: The maximum number of times this discount can be used.
          type: integer
          nullable: true
        name:
          description: A descriptive name given to the discount
          type: string
        price:
          description: Price in cents. Could be null.
          type: integer
          nullable: true
        price_percent:
          description: Percent of the price. Could be null.
          type: integer
          minimum: 0
          maximum: 100
          nullable: true
        ticket_types:
          description: An array of associated ticket types.
          type: array
          items:
            type: string
        products:
          description: An array of associated products.
          type: array
          items:
            type: string
        times_redeemed:
          description: The number of times that the discount was used
          type: integer
          nullable: true
        type:
          description: Type of discount. Either a fixed amount or a percentage
          type: string
          enum: [fixed_amount, percentage]
      example:
        object: "discount"
        id: "di_123"
        code: "discount_test123"
        expires:
          date: "2020-05-01"
          formatted: "Fri 1 May 2020 10:30 PM"
          iso: "2020-05-01T22:30:00+01:00"
          time: "22:30"
          timezone: "+01:00"
          unix: 1588368600
        max_redemptions: 5
        name: "Test discount"
        price: 540
        ticket_types: ["tt_78", "tt_123", "tt_456"]
        products: ["pr_78", "pr_123", "pr_456"]
        times_redeemed: 3
        type: "fixed_amount"

    Voucher:
      type: object
      properties:
        object:
          type: string
        id:
          description: A unique identifier for the voucher
          type: string
        available_codes:
          description: The number of unused voucher codes belonging to the voucher
          type: integer
          readOnly: true
        event_series_ids:
          description: List of event series IDs
          type: array
          items:
            type: string
        expiry:
          description: Voucher's expiry date
          type: object
          properties:
            date:
              description: ISO-8601 date for the start of the event
              type: string
            formatted:
              description: A formatted date string for the start of the event
              type: string
            iso:
              description: ISO-8601 date and time for the start of the event
              type: string
            time:
              description: Time for the start of the event
              type: string
            timezone:
              description: Timezone offset for the start of the event
              type: string
            unix:
              description: Unix timestamp for the start of the event
              type: integer
          nullable: true
        name:
          description: A descriptive name given to the voucher
          type: string
        partial_redemption:
          description: Indicates whether voucher can be partially redeemed
          type: string
          enum: ["true", "false"]
        total_codes:
          description: Total number of voucher codes belonging to the voucher
          type: integer
          readOnly: true
        usable_on_any_event:
          description: Indicates whether voucher can be used on any event
          type: string
          enum: ["true", "false"]
          nullable: true
        type:
          description: Type of voucher
          type: string
          enum: ["PROMO", "GIFT_CARD"]
        value:
          description: The integer value in cents given to the voucher
          type: integer
      example:
        object: "voucher"
        id: "vo_123"
        available_codes: 7
        event_series_ids: ["es_123", "es_234", "es_345"]
        interval: null
        expiry:
          date: "2020-05-01"
          formatted: "Fri 1 May 2020 10:30 PM"
          iso: "2020-05-01T22:30:00+01:00"
          time: "22:30"
          timezone: "+01:00"
          unix: 1588368600
        name: "Test Voucher"
        partial_redemption: "true"
        total_codes: 25
        type: "PROMO"
        usable_on_any_event: "true"
        value: 540

    VoucherCode:
      type: object
      properties:
        object:
          type: string
        id:
          description: A unique identifier for the voucher code
          type: string
        code:
          description: A descriptive name given to the voucher code
          type: string
        expiry:
          description: Voucher code's expiry date
          type: object
          properties:
            date:
              description: ISO-8601 date for the start of the event
              type: string
            formatted:
              description: A formatted date string for the start of the event
              type: string
            iso:
              description: ISO-8601 date and time for the start of the event
              type: string
            time:
              description: Time for the start of the event
              type: string
            timezone:
              description: Timezone offset for the start of the event
              type: string
            unix:
              description: Unix timestamp for the start of the event
              type: integer
        used:
          description: Voucher code's used date
          type: object
          properties:
            date:
              description: ISO-8601 date for the start of the event
              type: string
            formatted:
              description: A formatted date string for the start of the event
              type: string
            iso:
              description: ISO-8601 date and time for the start of the event
              type: string
            time:
              description: Time for the start of the event
              type: string
            timezone:
              description: Timezone offset for the start of the event
              type: string
            unix:
              description: Unix timestamp for the start of the event
              type: integer
          nullable: true
        value:
          description: The integer value in cents given to the voucher code
          type: integer
        voucher_id:
          description: A unique identifier of the voucher that the code belongs To
          type: string
      example:
        object: "voucher_code"
        id: "vc_123"
        code: "Test Voucher Code"
        expiry:
          date: "2020-05-01"
          formatted: "Fri 1 May 2020 10:30 PM"
          iso: "2020-05-01T22:30:00+01:00"
          time: "22:30"
          timezone: "+01:00"
          unix: 1588368600
        used:
          date: "2020-05-01"
          formatted: "Fri 1 May 2020 10:30 PM"
          iso: "2020-05-01T22:30:00+01:00"
          time: "22:30"
          timezone: "+01:00"
          unix: 1588368600
        value: 540
        voucher_id: "vo_123"

    CheckoutForm:
      type: object
      properties:
        object:
          type: string
        id:
          description: A unique identifier for the checkout form
          type: string
        checkout_form_elements:
          description: List of custom form elements ids
          type: array
          items:
            type: string
        created_at:
          description: Timestamp when the checkout form was created
          type: integer
        event_series_id:
          description: A unique identifier for the event series this checkout form is associated with
          type: string
          nullable: true
      example:
        object: "checkout_form"
        id: "cf_123"
        checkout_form_elements: ["ce_123", "ce_456"]
        created_at: 1712345678
        event_series_id: null

    CheckoutFormElement:
      type: object
      properties:
        object:
          type: string
        id:
          description: A unique identifier for the checkout form element
          type: string
        checkout_form_id:
          description: A unique identifier for the checkout form
          type: string
        options:
          description: List of possible answers for the element
          type: array
          items:
            type: string
        per_ticket:
          description: Whether the checkout form element is asked globally or per ticket
          type: string
          enum: ["true", "false"]
        question:
          description: The question to be answered
          type: string
        required:
          description: Indicates whether the question is required to answer
          type: string
          enum: ["true", "false"]
        type:
          description: The type of the checkout form element
          type: string
          enum: ["multiCheckbox", "radio", "select", "termsCheckbox", "termsSignature"]
        terms_and_conditions:
          description: The HTML content for Terms & Conditions elements (termsCheckbox and termsSignature types only). Returns null for other element types.
          type: string
          nullable: true
      example:
        object: "checkout_form_element"
        id: "ce_123"
        checkout_form_id: "cf_123"
        options: ["Yes", "No"]
        per_ticket: "true"
        question: "Do you have any dietary requirements?"
        required: "true"
        type: "radio"
        terms_and_conditions: null

    EventSeries:
      type: object
      properties:
        object:
          type: string
        id:
          description: A unique identifier for the event series
          type: string
        access_code:
          description: Code to access a protected event series
          type: string
          nullable: true
        bundles:
          description: List of associated bundles
          type: array
          items:
            $ref: "#/components/schemas/Bundle"
          nullable: true
        call_to_action:
          description: Call to action text used on the event series page
          type: string
        created_at:
          description: Date and time when the event series were created
          properties:
            date:
              type: string
              description: ISO-8601 date for the end of the event
            formatted:
              type: string
              description: A formatted date string for the end of the event
            iso:
              type: string
              description: ISO-8601 date and time for the end of the event
            time:
              type: string
              description: Time of the end of the event
            timezone:
              type: string
              description: Timezone offset for the end of the event
            unix:
              type: integer
              description: Unix timestamp for for the end of the event
        currency:
          description: Information about the currency the event series is configured to use
          type: string
          enum:
            [
              gbp,
              usd,
              eur,
              sgd,
              aud,
              brl,
              cad,
              czk,
              dkk,
              hkd,
              huf,
              ils,
              jpy,
              myr,
              mxn,
              nok,
              nzd,
              php,
              pln,
              rub,
              sek,
              chf,
              twd,
              thb,
              try,
            ]
        default_max_tickets_sold_per_occurrence:
          description: Maximum quantity of tickets that can be sold across all ticket types
          type: integer
          nullable: true
        default_ticket_groups:
          description: Ticket groups that are not overridden
          type: array
          items:
            $ref: "#/components/schemas/TicketGroup"
          nullable: true
        default_ticket_types:
          description: Ticket types that are not overridden
          type: array
          items:
            $ref: "#/components/schemas/TicketType"
          nullable: true
        description:
          description: Description of the event series
          type: string
          nullable: true
        images:
          description: Imagages that have been uploaded to this event series
          properties:
            header:
              description: Image URL of the header image used on the event series page
              type: string
            thumbnail:
              description: Image URL of the thumbnail used on the event series page
              type: string
        name:
          description: Name of the event series
          type: string
        next_occurrence_date:
          description: Date and time when the next event in the series happens
          properties:
            date:
              type: string
              description: ISO-8601 date for the end of the event
            formatted:
              type: string
              description: A formatted date string for the end of the event
            iso:
              type: string
              description: ISO-8601 date and time for the end of the event
            time:
              type: string
              description: Time of the end of the event
            timezone:
              type: string
              description: Timezone offset for the end of the event
            unix:
              type: integer
              description: Unix timestamp for for the end of the event
        online_event:
          description: Returns whether or not the event is online
          type: string
          enum: [true, false]
        payment_methods:
          description: An array of payment methods
          type: array
          items:
            properties:
              external_id:
                description: A unique identifier for the payment method
                type: string
              id:
                description: A unique identifier for internal payment methods
                type: string
              type:
                description: The type of payment method
                type: string
                enum: [stripe, paypal, offline]
              name:
                description: Name of the payment method
                type: string
              instructions:
                description: Instructions for the customer on how to pay. Used for offline payments.
                type: string
        private:
          description: Returns whether or not the event is private
          type: string
          enum: [true, false]
        revenue:
          description: Total revenue of the event series
          type: number
          minimum: 0
        show_map:
          description: Returns whether or not the map should be shown on the event series page. It depends if venue location is set and if the event is not online and hide map is not set in the event series.
          type: string
          enum: [true, false]
        sales_tax_label:
          description: The label for the sales tax
          type: string
          nullable: true
        sales_tax_percentage:
          description: The percentage of the sales tax
          type: integer
          nullable: true
        sales_tax_treatment:
          description: The treatment of the sales tax
          type: string
          enum: ["inclusive", "exclusive"]
          nullable: true
        status:
          description: Status of the event
          type: string
          enum: [draft, published, sales_closed]
        timezone:
          description: TZ format timezone string
          type: string
        total_occurrences:
          description: Total number of time the event series occurs
          type: integer
        total_issued_tickets:
          description: Total number of issued tickets
          type: integer
        transaction_fee_fixed_amount:
          description: Fixed amount of the transaction fee
          type: integer
          nullable: true
        transaction_fee_percentage:
          description: Percentage of the transaction fee
          type: integer
          nullable: true
        upcoming_occurrences:
          description: The number of upcoming occurrences of the event series
          type: integer
        url:
          description: Event series URL
          type: string
        tickets_available_at:
          description: Date when tickets become available for purchase
          properties:
            date:
              type: string
              description: ISO-8601 date for the end of the event
            formatted:
              type: string
              description: A formatted date string for the end of the event
            iso:
              type: string
              description: ISO-8601 date and time for the end of the event
            time:
              type: string
              description: Time of the end of the event
            timezone:
              type: string
              description: Timezone offset for the end of the event
            unix:
              type: integer
              description: Unix timestamp for for the end of the event
        tickets_available_at_message:
          description: Message to show when tickets are not yet available to purchase. {countdown} is replaced with time remaining until tickets become available
          type: string
        tickets_unavailable_at:
          description: Date when tickets become unavailable for purchase
          properties:
            date:
              type: string
              description: ISO-8601 date for the end of the event
            formatted:
              type: string
              description: A formatted date string for the end of the event
            iso:
              type: string
              description: ISO-8601 date and time for the end of the event
            time:
              type: string
              description: Time of the end of the event
            timezone:
              type: string
              description: Timezone offset for the end of the event
            unix:
              type: integer
              description: Unix timestamp for for the end of the event
        tickets_unavailable_at_message:
          description: Message to show when tickets are unavailable to purchase
          type: string
        venue:
          properties:
            country:
              type: string
              nullable: true
              description: Country of the venue
            name:
              type: string
              nullable: true
              description: Name of the venue
            postal_code:
              type: string
              nullable: true
              description: Postal code of the venue
        voucher_ids:
          description: List of voucher IDs
          type: array
          items:
            type: string
        waitlist_active:
          description: "Indicates whether waitlist is enabled for the event series"
          type: string
          enum: ["true", "no_tickets_available", "false"]
        waitlist_call_to_action:
          description: "The text displayed on event action buttons and as a title above the waitlist format"
          type: string
        waitlist_event_page_text:
          description: "Description above ticket waitlist form"
          type: string
        waitlist_confirmation_message:
          description: "Text shown to the user after they have signed up to the waitlist"
          type: string
      example:
        object: "event_series"
        id: "es_1"
        access_code: null
        bundles: null
        call_to_action: "Buy tickets / Join the guestlist"
        currency: "gbp"
        default_max_tickets_sold_per_occurrence: null
        default_ticket_groups:
          - object: ticket_group
            id: tg_21099
            bundle_ids: [bu_123]
            max_per_order: 10
            max_quantity: 100
            min_per_order: 1
            name: "April 20th"
            sort_order: 50050
            ticket_ids: [tt_230625, tt_230626]
          - object: ticket_group
            id: tg_21100
            bundle_ids: [bu_4]
            max_per_order: 10
            max_quantity: 100
            min_per_order: 1
            name: "April 21st"
            sort_order: 50100
            ticket_ids: [tt_230631, tt_230632]
        default_ticket_types:
          - object: ticket_type
            id: tt_230625
            access_code:
            booking_fee: 0
            description:
            group_id: tg_21099
            max_per_order: 100
            min_per_order: 1
            name: "4.20 Adult (13-61) - Presale"
            price: 800
            status: hidden
            sort_order: 50050
            type: paid
            quantity: 10000
            quantity_held: 0
            quantity_issued: 5000
            quantity_total: 15000
          - object: ticket_type
            id: tt_230626
            access_code:
            booking_fee: 0
            description:
            group_id: tg_21099
            max_per_order: 100
            min_per_order: 1
            name: "4.20 Senior (62+) - Presale"
            price: 600
            status: on_sale
            sort_order: 50051
            type: paid
            quantity: 10000
            quantity_held: 0
            quantity_issued: 2000
            quantity_total: 12000
          - object: ticket_type
            id: tt_230631
            access_code:
            booking_fee: 0
            description:
            group_id: tg_21100
            max_per_order: 100
            min_per_order: 1
            name: "4.21 Adult (13-61) - Presale"
            price: 800
            status: on_sale
            sort_order: 50100
            type: paid
            quantity: 10000
            quantity_held: 0
            quantity_issued: 4000
            quantity_total: 14000
          - object: ticket_type
            id: tt_230632
            access_code:
            booking_fee: 0
            description:
            group_id: tg_21100
            max_per_order: 100
            min_per_order: 1
            name: "4.21 Senior (62+) - Presale"
            price: 600
            status: on_sale
            sort_order: 50101
            type: paid
            quantity: 10000
            quantity_held: 0
            quantity_issued: 1000
            quantity_total: 11000
        description: null
        images:
          header: "https://d37ecpm5it19bz.cloudfront.net/c_crop,dpr_1.0,h_1921,q_100,w_1922,x_479,y_0/c_scale,g_center,h_326,q_85,w_1024/v1/stitching/userfiles/acfi9eknr1vur6wguu5s.jpg"
          thumbnail: "https://d37ecpm5it19bz.cloudfront.net/c_crop,dpr_1.0,h_1921,q_100,w_1922,x_479,y_0/c_scale,h_108,q_85,w_108/v1/stitching/userfiles/acfi9eknr1vur6wguu5s.jpg"
        name: "Hackney Downs 2020 Tulip Festival"
        next_occurrence_date:
          date: "2020-05-01"
          formatted: "Fri 1 May 2020 10:30 PM"
          iso: "2020-05-01T22:30:00+01:00"
          time: "22:30"
          timezone: "+01:00"
          unix: 1588368600
        online_event: "false"
        payment_methods:
          - external_id:
            id: pm_6687
            instructions: "Pay when you arrive to festival"
            name: "Pay on the door"
            type: offline
          - external_id: seller222@example.com
            id: pm_6691
            instructions:
            name:
            type: paypal
        private: "false"
        revenue: 165
        sales_tax_label: "VAT"
        sales_tax_percentage: 20
        sales_tax_treatment: "exclusive"
        show_map: "true"
        status: "published"
        timezone: "Europe/London"
        total_occurrences: 20
        total_issued_tickets: 5
        transaction_fee_fixed_amount: null
        transaction_fee_percentage: 10
        tickets_available_at:
          date: "2020-05-01"
          formatted: "Fri 1 May 2020 10:30 PM"
          iso: "2020-05-01T22:30:00+01:00"
          time: "22:30"
          timezone: "+01:00"
          unix: 1588368600
        tickets_available_at_message: "Tickets are available in {countdown}"
        tickets_unavailable_at:
          date: "2020-05-02"
          formatted: "Sat 2 May 2020 10:30 PM"
          iso: "2020-05-02T22:30:00+01:00"
          time: "22:30"
          timezone: "+01:00"
          unix: 1588455000
        tickets_unavailable_at_message: "Tickets are no longer available"
        upcoming_occurrences: 5
        url: "https://www.tickettailor.com/events/flowerfestival/40980"
        venue:
          country: "GB"
          name: "Flower festival gardens"
          postal_code: SW1 3BR
        voucher_ids: ["vo_123", "vo_345", "vo_567"]
        waitlist_active: "true"
        waitlist_call_to_action: "Join waiting list"
        waitlist_event_page_text: "Join our waiting list to be notified when tickets become available."
        waitlist_confirmation_message: "Done! You are on the waiting list."

    EventOccurrence:
      type: object
      properties:
        object:
          type: string
        id:
          description: A unique identifier for the event occurrence
          type: string
        available_status:
          description: Optional custom status message when event is set to be available
          type: string
          nullable: true
        bundles:
          description: List of associated bundles
          type: array
          items:
            $ref: "#/components/schemas/Bundle"
          nullable: true
        chk:
          description: Used for Ticket Tailor checkout chk value
          type: string
        currency:
          description: Information about the currency the event is configured to use
          type: string
          enum:
            [
              gbp,
              usd,
              eur,
              sgd,
              aud,
              brl,
              cad,
              czk,
              dkk,
              hkd,
              huf,
              ils,
              jpy,
              myr,
              mxn,
              nok,
              nzd,
              php,
              pln,
              rub,
              sek,
              chf,
              twd,
              thb,
              try,
            ]
        end:
          description: The end date and time for the event
          properties:
            date:
              type: string
              description: ISO-8601 date for the end of the event
            formatted:
              type: string
              description: A formatted date string for the end of the event
            iso:
              type: string
              description: ISO-8601 date and time for the end of the event
            time:
              type: string
              description: Time of the end of the event
            timezone:
              type: string
              description: Timezone offset for the end of the event
            unix:
              type: integer
              description: Unix timestamp for for the end of the event
        event_series_id:
          description: A unique identifier for the associated event series
          type: string
        hidden:
          description: True, if event is set to hidden
          type: string
          enum: [true, false]
        online_link:
          type: string
          description: URL of the online event
          nullable: true
        override_id:
          description: A unique identifier for the associated override
          type: string
          nullable: true
        revenue:
          description: Total revenue of the event
          type: number
          minimum: 0
        sales_tax_label:
          description: The label for the sales tax
          type: string
          nullable: true
        sales_tax_percentage:
          description: The percentage of the sales tax
          type: integer
          nullable: true
        sales_tax_treatment:
          description: The treatment of the sales tax
          type: string
          enum: ["inclusive", "exclusive"]
          nullable: true
        start:
          description: The start date and time for the event
          properties:
            date:
              type: string
              description: ISO-8601 date for the start of the event
            formatted:
              type: string
              description: A formatted date string for the start of the event
            iso:
              type: string
              description: ISO-8601 date and time for the start of the event
            time:
              type: string
              description: Time of the start of the event
            timezone:
              type: string
              description: Timezone offset for the start of the event
            unix:
              type: integer
              description: Unix timestamp for the start of the event
        max_tickets_sold_per_occurrence:
          description: Maximum quantity of tickets that can be sold across all ticket types
          type: integer
          nullable: true
        tickets_available:
          description: Are there any ticket types available?
          type: string
          enum: [true, false]
          nullable: true
        ticket_groups:
          type: array
          items:
            $ref: "#/components/schemas/TicketGroup"
          nullable: true
        ticket_types:
          type: array
          items:
            $ref: "#/components/schemas/TicketType"
          nullable: true
        total_issued_tickets:
          description: Total number of issued tickets
          type: integer
        transaction_fee_fixed_amount:
          description: Fixed amount of the transaction fee
          type: integer
          nullable: true
        transaction_fee_percentage:
          description: Percentage of the transaction fee
          type: integer
          nullable: true
        unavailable:
          description: True, if event is set to unavailable
          type: string
          enum: [true, false]
        unavailable_status:
          description: Optional custom status message when event is set to be unavailable
          type: string
          nullable: true
        url:
          description: Event occurrence URL
          type: string
      example:
        object: "event"
        id: "ev_1"
        available_status: "This event occurrence is available"
        bundles: []
        chk: "da09"
        currency: "gbp"
        end:
          date: "2020-05-01"
          formatted: "Fri 1 May 2020 10:30 PM"
          iso: "2020-05-01T22:30:00+01:00"
          time: "22:30"
          timezone: "+01:00"
          unix: 1588368600
        event_series_id: "es_1"
        hidden: "true"
        online_link: null
        override_id: "ov_123"
        revenue: 155
        sales_tax_label: "VAT"
        sales_tax_percentage: 20
        sales_tax_treatment: "exclusive"
        start:
          date: "2020-05-01"
          formatted: "Fri 1 May 2020 6:00 PM"
          iso: "2020-05-01T18:00:00+01:00"
          time: "18:00"
          timezone: "+01:00"
          unix: 1588352400
        max_tickets_sold_per_occurrence: null
        tickets_available: "true"
        ticket_groups:
          - object: ticket_group
            id: tg_21099
            bundle_ids: [bu_1234]
            max_per_order: 100
            max_quantity: 100
            min_per_order: 1
            name: "April 20th"
            sort_order: 50050
            ticket_ids: [tt_230625, tt_230626]
          - object: ticket_group
            id: tg_21100
            bundle_ids: [bu_4]
            max_per_order: 100
            max_quantity: 100
            min_per_order: 1
            name: "April 21st"
            sort_order: 50100
            ticket_ids: [tt_230631, tt_230632]
        ticket_types:
          - object: ticket_type
            id: tt_230625
            access_code:
            booking_fee: 0
            description:
            group_id: tg_21099
            max_per_order: 100
            min_per_order: 1
            name: "4.20 Adult (13-61) - Presale"
            price: 800
            status: hidden
            sort_order: 50050
            type: paid
            quantity: 10000
            quantity_held: 0
            quantity_issued: 5000
            quantity_total: 15000
          - object: ticket_type
            id: tt_230626
            access_code:
            booking_fee: 0
            description:
            group_id: tg_21099
            max_per_order: 100
            min_per_order: 1
            name: "4.20 Senior (62+) - Presale"
            price: 600
            status: on_sale
            sort_order: 50051
            type: paid
            quantity: 10000
            quantity_held: 0
            quantity_issued: 2000
            quantity_total: 12000
        total_issued_tickets: 5
        transaction_fee_fixed_amount: null
        transaction_fee_percentage: 10
        unavailable: "true"
        unavailable_status: "This event occurrence is not available"
        url: "https://www.tickettailor.com/checkout/view-event/id/123/chk/abcd/"

    Product:
      type: object
      properties:
        object:
          type: string
        id:
          type: string
        booking_fee:
          type: integer
          description: Optional booking fee in cents which is charged per product to the customer and the funds are paid to you. We would recommend charging no more than 10% of the product price.
          nullable: true
        created_at:
          description: Date and time when the product was created
          properties:
            date:
              type: string
              description: ISO-8601 date for the created at date
            formatted:
              type: string
              description: A formatted date string for the create at date
            iso:
              type: string
              description: ISO-8601 date and time for the created at date
            time:
              type: string
              description: Time of the end of the created at date
            timezone:
              type: string
              description: Timezone offset for the created at date
            unix:
              type: integer
              description: Unix timestamp for for the created at date
          nullable: true
        currency:
          description: Information about the currency the product is configured to use
          type: string
          enum:
            [
              gbp,
              usd,
              eur,
              sgd,
              aud,
              brl,
              cad,
              czk,
              dkk,
              hkd,
              huf,
              ils,
              jpy,
              myr,
              mxn,
              nok,
              nzd,
              php,
              pln,
              rub,
              sek,
              chf,
              twd,
              thb,
              try,
            ]
          nullable: true
        description:
          description: Description of the product
          type: string
          nullable: true
        event_series_ids:
          description: List of associated event series IDs
          type: array
          items:
            type: string
          nullable: true
        image:
          description: Image associated with the product
          type: string
          nullable: true
        instructions:
          description: Instructions on how to use the product
          type: string
          nullable: true
        issued_count:
          description: Number of sold products
          type: integer
          nullable: false
        issue_ticket_voucher:
          description: A boolean value indicating whether a QR code is to be issued for the product
          type: string
          enum: [true, false]
          nullable: true
        linked_to_all_event_series:
          description: A 'true' or 'false' value to determine if the product is linked to all the event series
          type: string
          enum: [true, false]
          nullable: true
        membership_type_id:
          description: The ID of the membership type associated with the product
          type: string
          nullable: true
        name:
          description: Name of the product
          type: string
          nullable: false
        price:
          description: Price in cents. Could be null.
          type: integer
          nullable: false
        quantity:
          description: Number available for purchase for all event occurrences
          type: integer
          nullable: true
        quantity_per_event_occurrence:
          description: Number available for purchase per event occurrence
          type: integer
          nullable: true
        sell_in_store:
          description: A boolean value indicating whether product is being sold in store
          type: string
          enum: [true, false]
        status:
          description: Status of the product
          type: string
          enum: [on_sale, hidden, sold_out]
          nullable: true
        voucher_id:
          description: The ID of the voucher of type gift card associated with the product
          type: string
          nullable: true
        updated_at:
          properties:
            date:
              type: string
              description: ISO-8601 date for the updated timestamp of the product
            formatted:
              type: string
              description: A formatted date string for the updated timestamp of the product
            iso:
              type: string
              description: ISO-8601 date and time for the updated timestamp of the product
            time:
              type: string
              description: Time of the updated timestamp of the product
            timezone:
              type: string
              description: Timezone offset for the updated timestamp of the product
            unix:
              type: integer
              description: Unix timestamp for when the product was updated
          nullable: true
      example:
        object: "product"
        id: "pr_1"
        booking_fee: 100
        created_at:
          date: "2020-05-01"
          formatted: "Fri 1 May 2020 10:30 PM"
          iso: "2020-05-01T22:30:00+01:00"
          time: "22:30"
          timezone: "+01:00"
          unix: 1588368600
        currency: "usd"
        description: "This is a product"
        event_series_ids: ["es_123", "es_234", "es_345"]
        instructions: "Buy this product at the venue"
        issued_count: 0
        issue_ticket_voucher: "false"
        voucher_id: null
        membership_type_id: null
        linked_to_all_event_series: "true"
        name: "Test Product"
        price: 956
        quantity: 10
        sell_in_store: "false"
        status: "on_sale"
        updated_at:
          date: "2020-05-01"
          formatted: "Fri 1 May 2020 10:30 PM"
          iso: "2020-05-01T22:30:00+01:00"
          time: "22:30"
          timezone: "+01:00"
          unix: 1588368600

    Bundle:
      type: object
      properties:
        object:
          type: string
        id:
          type: string
        access_code:
          description: Code to access a bundle
          type: string
          nullable: true
        booking_fee:
          type: integer
          description: Booking fee in cents
        description:
          type: string
          description: Bundle description
        group_id:
          type: string
          description: Bundle group ID
          nullable: true
        name:
          type: string
          description: Bundle name
        price:
          type: integer
          description: Price in cents
        products:
          description: Array of associated products
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                description: A unique product identifier
              quantity:
                type: integer
                description: Product quantity
        status:
          type: string
          description: Bundle status
          enum: [HIDDEN, UNAVAILABLE, ON_SALE, SOLD_OUT]
        ticket_types:
          description: Array of associated ticket types
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                description: A unique ticket type identifier
              quantity:
                type: integer
                description: Ticket type quantity
      example:
        object: "bundle"
        id: "bu_230626"
        access_code: "secret_code_123"
        booking_fee: 200
        description: "This is a bundle"
        group_id: "tg_1"
        name: "Family bundle"
        price: 600
        products:
          [{ "id": "pr_1", "quantity": 1 }, { "id": "pr_123", "quantity": 12 }]
        status: "ON_SALE"
        ticket_types: [{ "id": "tt_6", "quantity": 4 }]

    Override:
      type: object
      properties:
        object:
          type: string
        id:
          type: string
        created_at:
          description: Date and time when the override was created
          properties:
            date:
              type: string
              description: ISO-8601 date for the created at date
            formatted:
              type: string
              description: A formatted date string for the create at date
            iso:
              type: string
              description: ISO-8601 date and time for the created at date
            time:
              type: string
              description: Time of the end of the created at date
            timezone:
              type: string
              description: Timezone offset for the created at date
            unix:
              type: integer
              description: Unix timestamp for for the created at date
        max_sellable_tickets:
          description: Maximum number of sellable tickets
          type: integer
          nullable: true
        name:
          description: Override name
          type: string
        override_lines:
          description: Array of ticket types or ticket groups associated with the override
          type: array
          items:
            type: object
            properties:
              price:
                description: Integer price
                type: integer
                nullable: true
              quantity:
                description: Quantity of the referenced ticket or ticket group
                type: integer
                nullable: true
              reference_type:
                description: Reference type. This can be either 'ticket' or 'ticket_group'
                type: string
                enum: [ticket, ticket_group]
              reference_id:
                description: ID of the referenced ticket or ticket group. It shold be prefixed with either 'tt_' or 'tg_'
                type: string
              status:
                description: Status of the referenced ticket or ticket group
                type: string
                enum:
                  [ON_SALE, SOLD_OUT, UNAVAILABLE, HIDDEN, ADMIN_ONLY, LOCKED]
                nullable: true
      example:
        object: "override"
        id: "ov_123"
        created_at:
          date: "2020-05-01"
          formatted: "Fri 1 May 2020 10:30 PM"
          iso: "2020-05-01T22:30:00+01:00"
          time: "22:30"
          timezone: "+01:00"
          unix: 1588368600
        max_sellable_tickets: 55
        name: "Test override"
        override_lines:
          - price: 123
            quantity: 5
            reference_type: "ticket_type"
            reference_id: "tt_123"
            status: "ON_SALE"
          - price: 321
            quantity: 34
            reference_type: "ticket_group"
            reference_id: "tg_123"
            status: null

    WaitlistSignup:
      type: object
      properties:
        object:
          type: string
        id:
          type: string
        event_id:
          description: Id of the event this waitlist signup is attached to
          type: string
        email:
          description: Email of the user
          type: string
        notified_date:
          description: Date and time when the user was notified
          nullable: true
          properties:
            date:
              type: string
              description: ISO-8601 date for the created at date
            formatted:
              type: string
              description: A formatted date string for the create at date
            iso:
              type: string
              description: ISO-8601 date and time for the created at date
            time:
              type: string
              description: Time of the end of the created at date
            timezone:
              type: string
              description: Timezone offset for the created at date
            unix:
              type: integer
              description: Unix timestamp for for the created at date
        created_at:
          description: Date and time when the waitlist signup was created
          properties:
            date:
              type: string
              description: ISO-8601 date for the created at date
            formatted:
              type: string
              description: A formatted date string for the create at date
            iso:
              type: string
              description: ISO-8601 date and time for the created at date
            time:
              type: string
              description: Time of the end of the created at date
            timezone:
              type: string
              description: Timezone offset for the created at date
            unix:
              type: integer
              description: Unix timestamp for for the created at date
      example:
        object: "waitlist_signup"
        id: "wa_83"
        event_id: "ev_50904"
        email: "test@example.com"
        notified_date:
          date: "2020-05-01"
          formatted: "Fri 1 May 2020 10:30 PM"
          iso: "2020-05-01T22:30:00+01:00"
          time: "22:30"
          timezone: "+01:00"
          unix: 1588368600
        created_at:
          date: "2020-05-01"
          formatted: "Fri 1 May 2020 10:30 PM"
          iso: "2020-05-01T22:30:00+01:00"
          time: "22:30"
          timezone: "+01:00"
          unix: 1588368600
    Store:
      type: object
      properties:
        object:
          type: string
        id:
          type: string
          description: A unique identifier for the store
        currency:
          type: string
          description: The currency code used by the store
          enum:
            [
              gbp,
              usd,
              eur,
              sgd,
              aud,
              brl,
              cad,
              czk,
              dkk,
              hkd,
              huf,
              ils,
              jpy,
              myr,
              mxn,
              nok,
              nzd,
              php,
              pln,
              rub,
              sek,
              chf,
              twd,
              thb,
              try,
            ]
        name:
          type: string
          description: Name of the store
        payment_methods:
          type: array
          description: Array of payment method IDs associated with the store
          items:
            type: string
            description: Payment method ID prefixed with 'pm_'
        products:
          type: array
          description: Array of product IDs that are sold in the store
          items:
            type: string
            description: Product ID prefixed with 'pr_'
      example:
        object: "store"
        id: "st_18"
        currency: "EUR"
        name: "Example store name"
        payment_methods: ["pm_7301", "pm_7302"]
        products: ["pr_105676"]
