openapi: 3.0.3
info:
  title: Crescat
  description: ''
  version: 1.0.0
servers:
  -
    url: 'https://app.crescat.io'
paths:
  /external/v1/calendar:
    get:
      summary: 'GET Group Event List'
      operationId: gETGroupEventList
      description: 'Get array of all events for your group'
      parameters:
        -
          in: query
          name: start
          description: 'Start of dates to query. <br><strong>If not provided</strong>: today. <br><strong>Format</strong>: 2000-01-01'
          example: tenetur
          required: false
          schema:
            type: string
            description: 'Start of dates to query. <br><strong>If not provided</strong>: today. <br><strong>Format</strong>: 2000-01-01'
            example: tenetur
            nullable: false
        -
          in: query
          name: end
          description: 'End of dates to query. <br><strong>If not provided</strong>: today. <br><strong>Format</strong>: 2000-01-01'
          example: fugit
          required: false
          schema:
            type: string
            description: 'End of dates to query. <br><strong>If not provided</strong>: today. <br><strong>Format</strong>: 2000-01-01'
            example: fugit
            nullable: false
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n [\n   {\n     \"id\": 1,\n     \"name\": \"Event Name\",\n     \"start\": 2000-01-01 12:00:00,\n     \"end\": 2000-01-01 15:00:00,\n     \"event_type_id\": 1,\n     \"fields\": [\n       {\n         \"id\": 1,\n         \"show_time_id\": 1,\n         \"value\": *,\n        }\n        for details on formatting: see event field format\n     ],\n     \"show_times\": [\n       {\n         \"id\": 1,\n         \"title\": \"Show Title\",\n         \"start\": 2000-01-01 12:00:00,\n         \"end\": 2000-01-01 15:00:00,\n         \"room_id\": 1,\n        }\n     ],\n     \"rooms\": [\n       {\n         \"id\": 1,\n         \"name\": \"Room Name\",\n         \"title\": \"Show Title\",\n         \"start\": 2000-01-01 12:00:00,\n         \"end\": 2000-01-01 15:00:00,\n        }\n     ],\n   }\n ]\n}"
      tags:
        - Group
  /external/v1/calendar/format:
    get:
      summary: 'GET Group Event Response Format'
      operationId: gETGroupEventResponseFormat
      description: 'Get format of events returned when requesting events'
      parameters: []
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n event_types [\n   {\n     \"id\": 1,\n     \"name\": \"Event Type\",\n   }\n ],\n fields [\n   {\n     \"id\": 1,\n     \"title\": \"Title of Your Field\",\n     \"format\": String,\n   }\n ]\n\nFormats of Fields:\n String\n Rich formatted Text\n Date (2000-01-01)\n Time (12:00:00)\n Document url\n Boolean\n}"
        401:
          description: 'Festival Not Found: either not existing, or not your festival.'
          content:
            text/plain:
              schema:
                type: string
                example: ''
      tags:
        - Group
  /external/v1/rooms:
    get:
      summary: 'GET Venue Rooms List'
      operationId: gETVenueRoomsList
      description: 'Get array of all rooms on your venue'
      parameters: []
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n [\n   {\n     \"id\": 1,\n     \"name\": \"Room Name\",\n   }\n ]\n}"
      tags:
        - Venue/Rooms
  '/external/v1/rooms/{roomId}/calendar':
    get:
      summary: 'GET Room Booking List'
      operationId: gETRoomBookingList
      description: 'Get array of all bookings for room'
      parameters:
        -
          in: query
          name: start
          description: 'Start of dates to query. <br><strong>If not provided</strong>: today. <br><strong>Format</strong>: 2000-01-01'
          example: assumenda
          required: false
          schema:
            type: string
            description: 'Start of dates to query. <br><strong>If not provided</strong>: today. <br><strong>Format</strong>: 2000-01-01'
            example: assumenda
            nullable: false
        -
          in: query
          name: end
          description: 'End of dates to query. <br><strong>If not provided</strong>: today. <br><strong>Format</strong>: 2000-01-01'
          example: sit
          required: false
          schema:
            type: string
            description: 'End of dates to query. <br><strong>If not provided</strong>: today. <br><strong>Format</strong>: 2000-01-01'
            example: sit
            nullable: false
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n [\n   {\n     \"id\": 1,\n     \"name\": \"Event Name\",\n     \"start\": 2000-01-01 12:00:00,\n     \"end\": 2000-01-01 15:00:00,\n   }\n ]\n}"
      tags:
        - Venue/Rooms
    parameters:
      -
        in: path
        name: roomId
        description: 'The id of the room you want to get calendar for.'
        example: 1
        required: true
        schema:
          type: integer
  /external/v1/festivals:
    get:
      summary: 'GET Festival List'
      operationId: gETFestivalList
      description: 'Array of all festivals for your organization.'
      parameters: []
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\nArray of all festivals for your organization.\n [\n   {\n     \"id\": 1,\n     \"name\": \"Name of Your Festival\",\n     \"start\": 2000-01-01 12:00:00,\n     \"end\": 2000-01-01 15:00:00,\n   }\n ]\n}"
      tags:
        - Festival
  '/external/v1/festivals/{festivalId}/performances':
    get:
      summary: 'GET Festival Performance List'
      operationId: gETFestivalPerformanceList
      description: "Which fields are set on the token itself <br/>\nWhich Contacts are included is set on the token itself, either\n        * All Contacts<br/>\n        * Travel Party<br/>\n        * Primary<br/>"
      parameters: []
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n [\n   {\n     \"id\": 1,\n     \"name\": \"Performance Name\",\n     \"type\": \"Performance Type\",\n      \"fields\": [\n       {\n         \"id\": 1,\n         \"value\": *,\n        }\n        for details on formatting: see performance field format\n     ],\n     \"events\": [\n       {\n         \"id\": 1,\n         \"name\": \"Name of Event\",\n        }\n     ],\n     \"contacts\": [\n       {\n         \"id\": 1,\n         \"name\": \"Name of Contact\",\n         \"first_name\": \"First Name of Contact\",\n         \"last_name\": \"Last Name of Contact\",\n         \"email\": \"Email of Contact\",\n         \"phone\": \"Phone of Contact\",\n         \"country_code\": \"Country Code of Contact\",\n         \"primary\": \"Is the contact primary or not\",\n         \"travel_party\": \"Is the contact part of travel party or not\",\n         \"role\": \"Role of Contact\",\n         \"type\": \"Type of Contact\",\n        }\n     ],\n   }\n ]\n}"
      tags:
        - Festival
    parameters:
      -
        in: path
        name: festivalId
        description: 'The id of the festival you want to get performances for.'
        example: 1
        required: true
        schema:
          type: integer
  '/external/v1/festivals/{festivalId}/performances/format':
    get:
      summary: 'GET Festival Performance Response Format & Definitions'
      operationId: gETFestivalPerformanceResponseFormatDefinitions
      description: 'Get format of all performance fields that will be included when requesting performances'
      parameters: []
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n fields [\n   {\n     \"id\": 1,\n     \"title\": \"Title of Your Field\",\n     \"format\": String,\n   }\n ]\n\nFormats of Fields:\n String\n Rich formatted Text\n Date (2000-01-01)\n Time (12:00:00)\n Document url\n Boolean\n}"
        401:
          description: 'Festival Not Found: either not existing, or not your festival.'
          content:
            text/plain:
              schema:
                type: string
                example: ''
      tags:
        - Festival
    parameters:
      -
        in: path
        name: festivalId
        description: 'The id of the festival you want to get performances for.'
        example: 1
        required: true
        schema:
          type: integer
  '/external/v1/festivals/{festivalId}/events':
    get:
      summary: 'GET Festival Event List'
      operationId: gETFestivalEventList
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n [\n   {\n     \"id\": 1,\n     \"name\": \"Event Name\",\n     \"start_date\": 2000-01-01,\n     \"end_date\": 2000-01-01,\n     \"production_period\": [\n         \"start\": 2000-01-01 12:00:00,\n         \"end\": 2000-01-01 15:00:00,\n     ],\n     \"fields\": [\n       {\n         \"id\": 1,\n         \"show_time_id\": 1,\n         \"value\": *,\n        }\n        for details on formatting: see event field format\n     ],\n     \"show_times\": [\n       {\n         \"id\": 1,\n         \"title\": \"Show Title\",\n         \"start\": 2000-01-01 12:00:00,\n         \"end\": 2000-01-01 15:00:00,\n         \"room_id\": 1,\n        }\n     ],\n     \"festival_resources\": [\n       {\n         \"id\": 1,\n         \"name\": \"Festival Resource\",\n        }\n     ],\n     \"rooms\": [\n       {\n         \"id\": 1,\n         \"title\": \"Show Title\",\n         \"start\": 2000-01-01 12:00:00,\n         \"end\": 2000-01-01 15:00:00,\n        }\n     ],\n     \"performances\": [\n       {\n         \"id\": 1,\n         \"name\": \"Performance Name\",\n        }\n     ],\n     \"venue\": {\n         \"id\": 1,\n         \"name\": \"Venue Name\",\n         \"address\": \"Venue Address\",\n         \"city\": \"Venue City\",\n         \"postal_code\": \"Postal Code\",\n         \"country\": \"Country\",\n         \"website\": \"Website\",\n         \"phone\": \"Phone\",\n        },\n   }\n ]\n}"
      tags:
        - Festival
    parameters:
      -
        in: path
        name: festivalId
        description: 'The id of the festival you want to get events for.'
        example: 1
        required: true
        schema:
          type: integer
  '/external/v1/festivals/{festivalId}/events/format':
    get:
      summary: 'GET Festival Event Response Format & Definitions'
      operationId: gETFestivalEventResponseFormatDefinitions
      description: 'Get format and info from fields that will be included when requesting events'
      parameters: []
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n fields [\n   {\n     \"id\": 1,\n     \"title\": \"Title of Your Field\",\n     \"format\": String,\n   }\n ],\n festival_event_types [\n   {\n     \"id\": 1,\n     \"name\": \"Concert\",\n   }\n ]\n\nFormats of Fields:\n String\n Rich formatted Text\n Date (2000-01-01)\n Time (12:00:00)\n Document url\n Boolean\n}"
        401:
          description: 'Festival Not Found: either not existing, or not your festival.'
          content:
            text/plain:
              schema:
                type: string
                example: ''
      tags:
        - Festival
    parameters:
      -
        in: path
        name: festivalId
        description: 'The id of the festival you want to get events for.'
        example: 1
        required: true
        schema:
          type: integer
  '/external/v1/festivals/{festivalId}/public-forms':
    get:
      summary: 'List Public Forms for Festival'
      operationId: listPublicFormsForFestival
      description: 'Get an array of all public forms belonging to the specified festival that you own.'
      parameters: []
      responses:
        200:
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                example:
                  -
                    id: 1
                    name: 'Name of Your Public Form'
                  -
                    id: 2
                    name: 'Another Public Form'
        401:
          description: Unauthorized
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                example: []
      tags:
        - Festival
    parameters:
      -
        in: path
        name: festivalId
        description: 'The ID of the festival.'
        example: 1
        required: true
        schema:
          type: integer
  '/external/v1/festivals/{festivalId}/public-forms/{publicFormId}':
    get:
      summary: 'Get Public Form Responders'
      operationId: getPublicFormResponders
      description: "Get an array of all responders (submissions) for a specific public form.\nYou can optionally filter which custom form fields are included in the response."
      parameters:
        -
          in: query
          name: public_form_field_ids
          description: 'optional An array of `PublicFormField` IDs. If provided, only these custom fields will be included in the `public_form_fields` array for each responder. If omitted or empty, no custom fields are included by default via this mechanism (resource might still include some).'
          example:
            - 1
            - 5
            - 10
          required: false
          schema:
            type: array
            description: 'optional An array of `PublicFormField` IDs. If provided, only these custom fields will be included in the `public_form_fields` array for each responder. If omitted or empty, no custom fields are included by default via this mechanism (resource might still include some).'
            example:
              - 1
              - 5
              - 10
            items:
              type: integer
      responses:
        200:
          description: Success
          content:
            text/plain:
              schema:
                type: string
                example: "[\n{\n\"id\": 1,\n\"name\": \"John Doe\",\n\"first_name\": \"John\",\n\"last_name\": \"Doe\",\n\"email\": \"john.doe@example.com\",\n\"accepted_at\": \"2024-01-15 10:00:00\",\n\"declined_at\": null,\n\"public_form_fields\": [\n{\n\"id\": 1,\n\"value\": \"Value for custom field 1\"\n},\n{\n\"id\": 5,\n\"value\": true\n}\n// Other fields included based on public_form_field_ids query param\n// For details on value formatting: see 'Get Public Form Format' endpoint\n]\n}\n]"
        401:
          description: Unauthorized
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                example: []
      tags:
        - Festival
    parameters:
      -
        in: path
        name: festivalId
        description: 'The ID of the festival.'
        example: 1
        required: true
        schema:
          type: integer
      -
        in: path
        name: publicFormId
        description: 'The ID of the public form.'
        example: 1
        required: true
        schema:
          type: integer
  '/external/v1/festivals/{festivalId}/public-forms/{publicFormId}/format':
    get:
      summary: 'Get Public Form Format'
      operationId: getPublicFormFormat
      description: "Get the definition and format of standard fields and custom fields for a specific public form's responses.\nUseful for understanding the data structure returned by the \"Get Public Form Responders\" endpoint."
      parameters: []
      responses:
        200:
          description: Success
          content:
            application/json:
              schema:
                type: object
                example:
                  id: Number
                  name: String
                  first_name: String
                  last_name: 'String | null'
                  phone: 'String | null'
                  country_code: 'String | null'
                  email: String
                  created_at: 'String (YYYY-MM-DD HH:MM:SS)'
                  accepted_at: 'String (YYYY-MM-DD HH:MM:SS) | null'
                  declined_at: 'String (YYYY-MM-DD HH:MM:SS) | null'
                  assigned_work_minutes: int
                  expected_work_minutes: int
                  completed_work_minutes: int
                  public_form_fields:
                    -
                      id: 1
                      title: 'Title of Your Custom Field'
                      format: 'String | Rich formatted Text | Date (YYYY-MM-DD) | Time (HH:MM:SS) | Document url | Boolean'
                      section: 'Section Title | null'
                properties:
                  id:
                    type: string
                    example: Number
                  name:
                    type: string
                    example: String
                  first_name:
                    type: string
                    example: String
                  last_name:
                    type: string
                    example: 'String | null'
                  phone:
                    type: string
                    example: 'String | null'
                  country_code:
                    type: string
                    example: 'String | null'
                  email:
                    type: string
                    example: String
                  created_at:
                    type: string
                    example: 'String (YYYY-MM-DD HH:MM:SS)'
                  accepted_at:
                    type: string
                    example: 'String (YYYY-MM-DD HH:MM:SS) | null'
                  declined_at:
                    type: string
                    example: 'String (YYYY-MM-DD HH:MM:SS) | null'
                  assigned_work_minutes:
                    type: string
                    example: int
                  expected_work_minutes:
                    type: string
                    example: int
                  completed_work_minutes:
                    type: string
                    example: int
                  public_form_fields:
                    type: array
                    example:
                      -
                        id: 1
                        title: 'Title of Your Custom Field'
                        format: 'String | Rich formatted Text | Date (YYYY-MM-DD) | Time (HH:MM:SS) | Document url | Boolean'
                        section: 'Section Title | null'
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        title:
                          type: string
                          example: 'Title of Your Custom Field'
                        format:
                          type: string
                          example: 'String | Rich formatted Text | Date (YYYY-MM-DD) | Time (HH:MM:SS) | Document url | Boolean'
                        section:
                          type: string
                          example: 'Section Title | null'
        401:
          description: Unauthorized
          content:
            text/plain:
              schema:
                type: string
                example: '[] Comment="Festival Not Found: either not existing, or not your festival, or the public form does not belong to this festival."'
      tags:
        - Festival
    parameters:
      -
        in: path
        name: festivalId
        description: 'The ID of the festival.'
        example: 1
        required: true
        schema:
          type: integer
      -
        in: path
        name: publicFormId
        description: 'The ID of the public form.'
        example: 1
        required: true
        schema:
          type: integer
tags:
  -
    name: Group
    description: ''
  -
    name: Venue/Rooms
    description: ''
  -
    name: Festival
    description: "\n APIs for managing public forms related to a specific festival."
components:
  securitySchemes:
    default:
      type: http
      scheme: bearer
      description: 'You can retrieve your token by contacting Crescat on <a href="mailto:contact@crescat.no">contact@crescat.no</a>.'
security:
  -
    default: []
