> ## Documentation Index
> Fetch the complete documentation index at: https://docs.omneo.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Add Appointment

> A `POST` to the `/appointments` endpoint allows your application to create an appointment record.



## OpenAPI

````yaml post /v3/appointments
openapi: 3.1.0
info:
  title: Omneo
  version: 0.0.1
servers:
  - url: https://api.{tenant}.getomneo.com/api
    variables:
      tenant:
        default: example
security: []
paths:
  /v3/appointments:
    post:
      tags:
        - Appointment
      summary: Add Appointment
      description: >-
        A `POST` to the `/appointments` endpoint allows your application to
        create an appointment record.
      operationId: appointments.store
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StoreAppointment'
      responses:
        '201':
          description: '`Appointment`'
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Appointment'
                required:
                  - data
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '422':
          $ref: '#/components/responses/ValidationException'
components:
  schemas:
    StoreAppointment:
      type: object
      properties:
        appointment_definition_id:
          type: integer
        profile_id:
          type: string
        location_id:
          type: integer
        assigned_staff_id:
          type:
            - string
            - 'null'
        status:
          type: string
          enum:
            - requested
            - confirmed
            - cancelled
            - arrived
            - completed
            - no_show
            - rejected
        scheduled_start_at:
          type: string
        scheduled_end_at:
          type: string
        timezone:
          type: string
        confirmed_at:
          type:
            - string
            - 'null'
        notes:
          type:
            - string
            - 'null'
        meta:
          type:
            - array
            - 'null'
          items:
            type: string
        transaction:
          type: object
          properties:
            id:
              type: integer
            external_id:
              type: string
            receipt_ref:
              type: string
        order:
          type: object
          properties:
            id:
              type: integer
            external_id:
              type: string
            receipt_ref:
              type: string
            order_number:
              type: string
        answers:
          type: array
          items:
            type: object
            properties:
              questionnaire_question_id:
                type: integer
              value:
                type: string
            required:
              - value
      required:
        - appointment_definition_id
        - profile_id
        - location_id
        - scheduled_start_at
        - scheduled_end_at
        - timezone
      title: StoreAppointment
    Appointment:
      type: object
      properties:
        id:
          type: integer
        appointment_definition_id:
          type: integer
        appointment_definition:
          anyOf:
            - $ref: '#/components/schemas/AppointmentDefinition'
            - type: 'null'
        profile_id:
          type: string
        profile:
          type:
            - object
            - 'null'
          properties:
            id:
              type: string
            first_name:
              type:
                - string
                - 'null'
            last_name:
              type:
                - string
                - 'null'
            email:
              type: string
          required:
            - id
            - first_name
            - last_name
            - email
        location_id:
          type: integer
        location:
          type:
            - object
            - 'null'
          properties:
            id:
              type: integer
            name:
              type:
                - string
                - 'null'
            handle:
              type:
                - string
                - 'null'
            timezone:
              type:
                - string
                - 'null'
          required:
            - id
            - name
            - handle
            - timezone
        assigned_staff_id:
          type:
            - string
            - 'null'
        assigned_staff:
          type:
            - object
            - 'null'
          properties:
            id:
              type: string
            first_name:
              type:
                - string
                - 'null'
            last_name:
              type:
                - string
                - 'null'
            email:
              type: string
          required:
            - id
            - first_name
            - last_name
            - email
        status:
          type: string
        scheduled_start_at:
          type: string
        scheduled_end_at:
          type: string
        timezone:
          type: string
        approved_at:
          type: string
        confirmed_at:
          type: string
        cancelled_at:
          type: string
        arrived_at:
          type: string
        completed_at:
          type: string
        no_show_at:
          type: string
        rejected_at:
          type: string
        approved_by:
          type:
            - string
            - 'null'
        cancelled_by:
          type:
            - string
            - 'null'
        rejected_by:
          type:
            - string
            - 'null'
        transaction_id:
          type:
            - integer
            - 'null'
        order_id:
          type:
            - integer
            - 'null'
        transaction:
          type:
            - object
            - 'null'
          properties:
            id:
              type: integer
            external_id:
              type:
                - string
                - 'null'
            receipt_ref:
              type:
                - string
                - 'null'
            total:
              type:
                - number
                - 'null'
            status:
              type:
                - string
                - 'null'
          required:
            - id
            - external_id
            - receipt_ref
            - total
            - status
        order:
          type:
            - object
            - 'null'
          properties:
            id:
              type: integer
            external_id:
              type:
                - string
                - 'null'
            receipt_ref:
              type:
                - string
                - 'null'
            order_number:
              type:
                - string
                - 'null'
            total:
              type:
                - number
                - 'null'
            status:
              type:
                - string
                - 'null'
          required:
            - id
            - external_id
            - receipt_ref
            - order_number
            - total
            - status
        answers:
          type: array
          items:
            $ref: '#/components/schemas/QuestionnaireAnswer'
        links:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              type:
                type: string
              target_id:
                type: string
              profile:
                type: object
                properties:
                  id:
                    type: string
                  first_name:
                    type: string
                  last_name:
                    type: string
                  email:
                    type: string
                required:
                  - id
                  - first_name
                  - last_name
                  - email
              linkable:
                anyOf:
                  - type: object
                    properties:
                      id:
                        type: string
                      name:
                        type: string
                      handle:
                        type: string
                      profile_id:
                        type: string
                    required:
                      - id
                      - name
                      - handle
                      - profile_id
                  - type: object
                    properties:
                      id:
                        type: string
                    required:
                      - id
            required:
              - id
              - type
              - target_id
              - profile
              - linkable
        notes:
          type:
            - string
            - 'null'
        meta:
          type:
            - array
            - 'null'
          items: {}
        created_at:
          type: string
        updated_at:
          type: string
      required:
        - id
        - appointment_definition_id
        - appointment_definition
        - profile_id
        - profile
        - location_id
        - location
        - assigned_staff_id
        - assigned_staff
        - status
        - scheduled_start_at
        - scheduled_end_at
        - timezone
        - approved_at
        - confirmed_at
        - cancelled_at
        - arrived_at
        - completed_at
        - no_show_at
        - rejected_at
        - approved_by
        - cancelled_by
        - rejected_by
        - transaction_id
        - order_id
        - notes
        - meta
        - created_at
        - updated_at
      title: Appointment
    AppointmentDefinition:
      type: object
      properties:
        id:
          type: integer
        handle:
          type: string
        name:
          type: string
        description:
          type:
            - string
            - 'null'
        is_published:
          type: boolean
        is_archived:
          type: boolean
        duration_minutes:
          type: integer
        buffer_before_minutes:
          type: integer
        buffer_after_minutes:
          type: integer
        min_lead_minutes:
          type: integer
        max_advance_days:
          type:
            - integer
            - 'null'
        slot_interval_minutes:
          type:
            - integer
            - 'null'
        booking_type:
          type: string
        allow_customer_booking:
          type: boolean
        allow_walk_in:
          type: boolean
        requires_staff:
          type: boolean
        customer_must_select_staff:
          type: boolean
        use_staff_from_location:
          type: boolean
        max_concurrent_bookings:
          type:
            - integer
            - 'null'
        allow_waitlist:
          type: boolean
        allow_queue:
          type: boolean
        meta:
          type:
            - array
            - 'null'
          items: {}
        created_target_id:
          type:
            - integer
            - 'null'
        confirmed_target_id:
          type:
            - integer
            - 'null'
        cancelled_target_id:
          type:
            - integer
            - 'null'
        rejected_target_id:
          type:
            - integer
            - 'null'
        reminder_target_id:
          type:
            - integer
            - 'null'
        notify_created_offset_days:
          type:
            - integer
            - 'null'
        notify_created_offset_hours:
          type:
            - integer
            - 'null'
        notify_confirmed_offset_days:
          type:
            - integer
            - 'null'
        notify_confirmed_offset_hours:
          type:
            - integer
            - 'null'
        notify_cancelled_offset_days:
          type:
            - integer
            - 'null'
        notify_cancelled_offset_hours:
          type:
            - integer
            - 'null'
        notify_rejected_offset_days:
          type:
            - integer
            - 'null'
        notify_rejected_offset_hours:
          type:
            - integer
            - 'null'
        notify_reminder_offset_days:
          type:
            - integer
            - 'null'
        notify_reminder_offset_hours:
          type:
            - integer
            - 'null'
        has_booking_questionnaire:
          type: boolean
        normal_hours:
          type: array
          items:
            $ref: '#/components/schemas/AppointmentDefinitionNormalHour'
        special_hours:
          type: array
          items:
            $ref: '#/components/schemas/AppointmentDefinitionSpecialHour'
        locations:
          type: array
          items: {}
        staff:
          type: array
          items:
            $ref: '#/components/schemas/AppointmentDefinitionStaff'
        booking_questionnaire:
          type:
            - object
            - 'null'
          properties:
            id:
              type: string
            name:
              type: string
            purpose:
              type: string
            is_active:
              type: string
            pages:
              type: string
          required:
            - id
            - name
            - purpose
            - is_active
            - pages
        created_at:
          type: string
        updated_at:
          type: string
      required:
        - id
        - handle
        - name
        - description
        - is_published
        - is_archived
        - duration_minutes
        - buffer_before_minutes
        - buffer_after_minutes
        - min_lead_minutes
        - max_advance_days
        - slot_interval_minutes
        - booking_type
        - allow_customer_booking
        - allow_walk_in
        - requires_staff
        - customer_must_select_staff
        - use_staff_from_location
        - max_concurrent_bookings
        - allow_waitlist
        - allow_queue
        - meta
        - created_target_id
        - confirmed_target_id
        - cancelled_target_id
        - rejected_target_id
        - reminder_target_id
        - notify_created_offset_days
        - notify_created_offset_hours
        - notify_confirmed_offset_days
        - notify_confirmed_offset_hours
        - notify_cancelled_offset_days
        - notify_cancelled_offset_hours
        - notify_rejected_offset_days
        - notify_rejected_offset_hours
        - notify_reminder_offset_days
        - notify_reminder_offset_hours
        - has_booking_questionnaire
        - created_at
        - updated_at
      title: AppointmentDefinition
    QuestionnaireAnswer:
      type: object
      properties:
        id:
          type: integer
        questionnaire_id:
          type: integer
        questionnaire_question_id:
          type: integer
        question_id:
          type: integer
        question_handle:
          type: string
        question_version_id:
          type: integer
        profile_id:
          type:
            - string
            - 'null'
        answerable_type:
          type:
            - string
            - 'null'
        answerable_id:
          type:
            - string
            - 'null'
        mapping_key:
          type: string
        link_type:
          type: string
        link_target:
          type:
            - string
            - 'null'
        link_write_policy:
          type:
            - string
            - 'null'
        question_label:
          type: string
        question_type:
          type: string
        question_required:
          type: boolean
        answer_type:
          type: string
        value:
          anyOf:
            - type: boolean
            - type: string
            - type: 'null'
            - type: array
              items: {}
        mappable_type:
          type:
            - string
            - 'null'
        mappable_id:
          type:
            - string
            - 'null'
        mapped_field:
          type:
            - string
            - 'null'
        mapping_status:
          type: string
        mapping_error:
          type:
            - string
            - 'null'
        mapped_at:
          type:
            - string
            - 'null'
        meta:
          type:
            - array
            - 'null'
          items: {}
        created_at:
          type: string
        updated_at:
          type: string
      required:
        - id
        - questionnaire_id
        - questionnaire_question_id
        - question_id
        - question_version_id
        - profile_id
        - answerable_type
        - answerable_id
        - mapping_key
        - link_type
        - link_target
        - link_write_policy
        - question_label
        - question_type
        - question_required
        - answer_type
        - value
        - mappable_type
        - mappable_id
        - mapped_field
        - mapping_status
        - mapping_error
        - mapped_at
        - meta
        - created_at
        - updated_at
      title: QuestionnaireAnswer
    AppointmentDefinitionNormalHour:
      type: object
      properties:
        id:
          type: integer
        appointment_definition_id:
          type: integer
        day_of_week:
          type: string
        available_from:
          type:
            - string
            - 'null'
        available_until:
          type:
            - string
            - 'null'
        is_closed:
          type: string
        created_at:
          type: string
        updated_at:
          type: string
      required:
        - id
        - appointment_definition_id
        - day_of_week
        - available_from
        - available_until
        - is_closed
        - created_at
        - updated_at
      title: AppointmentDefinitionNormalHour
    AppointmentDefinitionSpecialHour:
      type: object
      properties:
        id:
          type: integer
        appointment_definition_id:
          type: integer
        name:
          type: string
        is_repeating:
          type: boolean
        available_from:
          type:
            - string
            - 'null'
        available_until:
          type:
            - string
            - 'null'
        start_at:
          type: string
        end_at:
          type: string
        is_closed:
          type: string
        created_at:
          type: string
        updated_at:
          type: string
      required:
        - id
        - appointment_definition_id
        - name
        - is_repeating
        - available_from
        - available_until
        - start_at
        - end_at
        - is_closed
        - created_at
        - updated_at
      title: AppointmentDefinitionSpecialHour
    AppointmentDefinitionStaff:
      type: object
      properties:
        id:
          type: integer
        appointment_definition_id:
          type: integer
        staff_id:
          type: string
        is_active:
          type: boolean
        staff:
          type:
            - object
            - 'null'
          properties:
            id:
              type: string
            first_name:
              type:
                - string
                - 'null'
            last_name:
              type:
                - string
                - 'null'
            email:
              type: string
            mobile_phone:
              type:
                - string
                - 'null'
            normal_hours:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                  day_of_week:
                    type: string
                  available_from:
                    type: string
                  available_until:
                    type: string
                  is_closed:
                    type: string
                required:
                  - id
                  - day_of_week
                  - available_from
                  - available_until
                  - is_closed
            special_hours:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
                  is_repeating:
                    type: string
                  available_from:
                    type: string
                  available_until:
                    type: string
                  start_at:
                    type: string
                  end_at:
                    type: string
                required:
                  - id
                  - name
                  - is_repeating
                  - available_from
                  - available_until
                  - start_at
                  - end_at
          required:
            - id
            - first_name
            - last_name
            - email
            - mobile_phone
            - normal_hours
            - special_hours
        created_at:
          type: string
        updated_at:
          type: string
      required:
        - id
        - appointment_definition_id
        - staff_id
        - is_active
        - staff
        - created_at
        - updated_at
      title: AppointmentDefinitionStaff
  responses:
    AuthenticationException:
      description: Unauthenticated
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    AuthorizationException:
      description: Authorization error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ValidationException:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Errors overview.
              errors:
                type: object
                description: A detailed description of each field that failed validation.
                additionalProperties:
                  type: array
                  items:
                    type: string
            required:
              - message
              - errors

````