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

# Batch Locations

> A `POST` to the `/locations/batch.json` endpoint allows your application to process locations in batch.



## OpenAPI

````yaml post /v3/locations/batch.json
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/batch.json:
    post:
      tags:
        - Location
      summary: Batch Locations
      description: >-
        A `POST` to the `/locations/batch.json` endpoint allows your application
        to process locations in batch.
      operationId: location.batchJson
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/BatchLocationJson'
                - type: object
                  properties:
                    import_job_id:
                      type: string
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    const: Queued for processing.
                  batch_id:
                    type: string
                required:
                  - message
                  - batch_id
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '422':
          $ref: '#/components/responses/ValidationException'
components:
  schemas:
    BatchLocationJson:
      type: object
      properties:
        locations:
          type: array
          items:
            type: object
            properties:
              id:
                type:
                  - integer
                  - 'null'
              external_id:
                type:
                  - string
                  - 'null'
              type:
                type: string
              name:
                type: string
              description:
                type: string
              timezone:
                type:
                  - string
                  - 'null'
              phone:
                type: string
              email:
                type: string
                format: email
              external_code:
                type:
                  - string
                  - 'null'
              is_published:
                type: boolean
              is_permanently_closed:
                type: boolean
              address:
                type:
                  - object
                  - 'null'
                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
              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
              tags:
                type: array
                items:
                  type: string
              icon:
                type:
                  - string
                  - 'null'
                format: uri
              image_url:
                type:
                  - string
                  - 'null'
                format: uri
              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
          minItems: 1
          maxItems: 500
      required:
        - locations
      title: BatchLocationJson
  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

````