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

> A `POST` to the `/locations` endpoint allows your application to add a Location.



## OpenAPI

````yaml post /v3/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/locations:
    post:
      tags:
        - Location
      summary: Add Location
      description: >-
        A `POST` to the `/locations` endpoint allows your application to add a
        Location.
      operationId: locations.store
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StoreLocation'
      responses:
        '200':
          description: '`Location`'
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Location'
                required:
                  - data
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '422':
          $ref: '#/components/responses/ValidationException'
components:
  schemas:
    StoreLocation:
      type: object
      properties:
        type:
          type: string
        name:
          type: string
        handle:
          type: string
          maxLength: 255
        description:
          type: string
        timezone:
          type:
            - string
            - 'null'
        phone:
          type: string
        email:
          type: string
          format: email
        external_id:
          type:
            - string
            - 'null'
        external_code:
          type:
            - string
            - 'null'
        is_published:
          type: boolean
        is_permanently_closed:
          type: boolean
        icon:
          type:
            - string
            - 'null'
          format: uri
        image_url:
          type:
            - string
            - 'null'
          format: uri
        country_iso_3:
          type:
            - string
            - 'null'
          minLength: 3
          maxLength: 3
        address:
          type: object
          properties:
            address_line_1:
              type: string
            address_line_2:
              type:
                - string
                - 'null'
            address_line_3:
              type:
                - string
                - 'null'
            company:
              type:
                - string
                - 'null'
            is_default:
              type:
                - boolean
                - 'null'
            latitude:
              type:
                - number
                - 'null'
            longitude:
              type:
                - number
                - 'null'
            city:
              type: string
            postcode:
              type: string
            state:
              type: string
            country:
              type: string
            notes:
              type:
                - string
                - 'null'
            iso:
              type:
                - string
                - 'null'
              minLength: 2
              maxLength: 2
            iso_state:
              type:
                - string
                - 'null'
              minLength: 1
              maxLength: 3
        tags:
          type: array
          items:
            type: string
        normal_hours:
          type:
            - array
            - 'null'
          items:
            type: object
            properties:
              day_of_week:
                type: string
                enum:
                  - MON
                  - TUE
                  - WED
                  - THU
                  - FRI
                  - SAT
                  - SUN
              open_at:
                type: string
              close_at:
                type: string
            required:
              - day_of_week
        special_hours:
          type:
            - array
            - 'null'
          items:
            type: object
            properties:
              name:
                type: string
              is_repeating:
                type: boolean
              open_at:
                type: string
              close_at:
                type: string
              start_at:
                type: string
                format: date
              end_at:
                type: string
                format: date
            required:
              - name
              - start_at
              - end_at
        custom_fields:
          type: array
          items:
            type: object
            properties:
              namespace:
                type: string
              handle:
                type: string
              type:
                type: string
                enum:
                  - string
                  - integer
                  - float
                  - boolean
                  - json
                  - array
              value:
                type: string
            required:
              - namespace
              - handle
              - type
              - value
      required:
        - name
        - phone
      title: StoreLocation
    Location:
      type: object
      properties:
        id:
          type: integer
        type:
          type:
            - string
            - 'null'
        name:
          type:
            - string
            - 'null'
        handle:
          type:
            - string
            - 'null'
        description:
          type:
            - string
            - 'null'
        phone:
          type:
            - string
            - 'null'
        email:
          type:
            - string
            - 'null'
        timezone:
          type:
            - string
            - 'null'
        external_id:
          type:
            - string
            - 'null'
        external_code:
          type:
            - string
            - 'null'
        is_published:
          type: boolean
        is_permanently_closed:
          type: boolean
        address:
          $ref: '#/components/schemas/Address'
        normal_hours:
          type: array
          items:
            $ref: '#/components/schemas/LocationHour'
        special_hours:
          type: array
          items:
            $ref: '#/components/schemas/LocationHour'
        tags:
          type: array
          items:
            $ref: '#/components/schemas/Tag'
        custom_fields:
          type: object
          additionalProperties: {}
        icon:
          type:
            - string
            - 'null'
        country_iso_3:
          type:
            - string
            - 'null'
        image_url:
          type:
            - string
            - 'null'
        created_at:
          type: string
        updated_at:
          type: string
        departments:
          type: array
          items:
            $ref: '#/components/schemas/Department'
      required:
        - id
        - type
        - name
        - handle
        - description
        - phone
        - email
        - timezone
        - external_id
        - external_code
        - is_published
        - is_permanently_closed
        - address
        - normal_hours
        - special_hours
        - tags
        - custom_fields
        - icon
        - country_iso_3
        - image_url
        - created_at
        - updated_at
        - departments
      title: Location
    Address:
      type: object
      properties:
        id:
          type: integer
        address_line_1:
          type: string
        address_line_2:
          type:
            - string
            - 'null'
        address_line_3:
          type:
            - string
            - 'null'
        company:
          type:
            - string
            - 'null'
        latitude:
          type:
            - number
            - 'null'
        longitude:
          type:
            - number
            - 'null'
        city:
          type: string
        postcode:
          type: string
        state:
          type:
            - string
            - 'null'
        country:
          type: string
        notes:
          type:
            - string
            - 'null'
        external_id:
          type:
            - string
            - 'null'
        is_default:
          type: boolean
        created_at:
          type: string
        updated_at:
          type: string
        meta:
          type:
            - array
            - 'null'
          items: {}
        name:
          type:
            - string
            - 'null'
        type:
          type:
            - string
            - 'null'
        phone:
          type:
            - string
            - 'null'
        iso:
          type:
            - string
            - 'null'
        iso_state:
          type:
            - string
            - 'null'
        profile_id:
          type:
            - string
            - 'null'
        custom_fields:
          type: object
          additionalProperties: {}
      required:
        - id
        - address_line_1
        - address_line_2
        - address_line_3
        - company
        - latitude
        - longitude
        - city
        - postcode
        - state
        - country
        - notes
        - external_id
        - is_default
        - created_at
        - updated_at
        - meta
        - name
        - type
        - phone
        - iso
        - iso_state
        - profile_id
        - custom_fields
      title: Address
    LocationHour:
      type: array
      items: {}
      title: LocationHour
    Tag:
      type: string
      title: Tag
    Department:
      type: object
      properties:
        id:
          type: integer
        name:
          type:
            - string
            - 'null'
        handle:
          type: string
        external_id:
          type:
            - string
            - 'null'
        external_code:
          type:
            - string
            - 'null'
        description:
          type:
            - string
            - 'null'
        short_description:
          type:
            - string
            - 'null'
        url:
          type:
            - string
            - 'null'
        image_url:
          type:
            - string
            - 'null'
        internal_note:
          type:
            - string
            - 'null'
        meta:
          type:
            - array
            - 'null'
          items: {}
        brand_id:
          type: integer
        location_id:
          type:
            - integer
            - 'null'
        brand:
          type: object
          properties:
            name:
              type: string
            handle:
              type: string
          required:
            - name
            - handle
        created_at:
          type: string
        updated_at:
          type: string
      required:
        - id
        - name
        - handle
        - external_id
        - external_code
        - description
        - short_description
        - url
        - image_url
        - internal_note
        - meta
        - brand_id
        - location_id
        - brand
        - created_at
        - updated_at
      title: Department
  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

````