> ## 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 Definition Location

> A `POST` to the `/appointment-definitions/{appointmentDefinitionId}/locations` endpoint allows your application to assign a location to an appointment definition.



## OpenAPI

````yaml post /v3/appointment-definitions/{appointmentDefinition}/locations
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/appointment-definitions/{appointmentDefinition}/locations:
    post:
      tags:
        - Appointment Definition Location
      summary: Add Appointment Definition Location
      description: >-
        A `POST` to the
        `/appointment-definitions/{appointmentDefinitionId}/locations` endpoint
        allows your application to assign a location to an appointment
        definition.
      operationId: appointment-definitions.locations.store
      parameters:
        - name: appointmentDefinition
          in: path
          required: true
          description: The appointment definition ID
          schema:
            type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StoreAppointmentDefinitionLocation'
      responses:
        '201':
          description: '`AppointmentDefinitionLocation`'
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/AppointmentDefinitionLocation'
                required:
                  - data
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '404':
          $ref: '#/components/responses/ModelNotFoundException'
        '422':
          $ref: '#/components/responses/ValidationException'
components:
  schemas:
    StoreAppointmentDefinitionLocation:
      type: object
      properties:
        location_id:
          type: integer
        is_active:
          type: boolean
      required:
        - location_id
      title: StoreAppointmentDefinitionLocation
    AppointmentDefinitionLocation:
      type: object
      properties:
        id:
          type: integer
        appointment_definition_id:
          type: integer
        location_id:
          type: integer
        is_active:
          type: boolean
        location:
          type:
            - object
            - 'null'
          properties:
            id:
              type: string
            name:
              type: string
            handle:
              type: string
          required:
            - id
            - name
            - handle
        created_at:
          type: string
        updated_at:
          type: string
      required:
        - id
        - appointment_definition_id
        - location_id
        - is_active
        - location
        - created_at
        - updated_at
      title: AppointmentDefinitionLocation
  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
    ModelNotFoundException:
      description: Not found
      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

````