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

> A `POST` to the `/locations/{locationId}/profiles` endpoint allows your application to assign a profile to a location.



## OpenAPI

````yaml post /v3/locations/{location}/profiles
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/{location}/profiles:
    post:
      tags:
        - Location Profile
      summary: Add Location Profile
      description: >-
        A `POST` to the `/locations/{locationId}/profiles` endpoint allows your
        application to assign a profile to a location.
      operationId: locationProfile.store
      parameters:
        - name: location
          in: path
          required: true
          description: The location ID
          schema:
            type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StoreLocationProfile'
      responses:
        '201':
          description: '`LocationProfileResource`'
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/LocationProfileResource'
                required:
                  - data
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '404':
          $ref: '#/components/responses/ModelNotFoundException'
        '422':
          $ref: '#/components/responses/ValidationException'
components:
  schemas:
    StoreLocationProfile:
      type: object
      properties:
        profile_id:
          type: string
        assignment_type:
          type: string
          enum:
            - staff
            - manager
            - profile
        role_type:
          type:
            - string
            - 'null'
          enum:
            - full_time
            - part_time
            - casual
            - other
        is_default:
          type: boolean
        is_active:
          type: boolean
        starts_at:
          type:
            - string
            - 'null'
          format: date-time
        ends_at:
          type:
            - string
            - 'null'
          format: date-time
        external_id:
          type:
            - string
            - 'null'
          maxLength: 255
        profile_external_id:
          type:
            - string
            - 'null'
          maxLength: 255
        sort_order:
          type: integer
          minimum: 0
        notes:
          type:
            - string
            - 'null'
        meta:
          type:
            - array
            - 'null'
          items:
            type: string
        excluded_service_handles:
          type:
            - array
            - 'null'
          items:
            type: string
            maxLength: 255
      required:
        - profile_id
        - assignment_type
      title: StoreLocationProfile
    LocationProfileResource:
      type: object
      properties:
        id:
          type: integer
        location_id:
          type: integer
        profile_id:
          type: string
        assignment_type:
          type: string
        role_type:
          type:
            - string
            - 'null'
        is_default:
          type: boolean
        is_active:
          type: boolean
        starts_at:
          type:
            - string
            - 'null'
        ends_at:
          type:
            - string
            - 'null'
        external_id:
          type:
            - string
            - 'null'
        profile_external_id:
          type:
            - string
            - 'null'
        sort_order:
          type: integer
        notes:
          type:
            - string
            - 'null'
        meta:
          type:
            - array
            - 'null'
          items: {}
        excluded_service_handles:
          anyOf:
            - type: array
              items: {}
            - type: 'null'
            - type: array
              items:
                type: string
              minItems: 0
              maxItems: 0
              additionalItems: false
        location:
          type:
            - object
            - 'null'
          properties:
            id:
              type: string
            name:
              type: string
            handle:
              type: string
          required:
            - id
            - name
            - handle
        profile:
          type:
            - object
            - 'null'
          properties:
            id:
              type: string
            first_name:
              type: string
            last_name:
              type: string
            email:
              type: string
          required:
            - id
            - first_name
            - last_name
            - email
        created_at:
          type: string
        updated_at:
          type: string
        deleted_at:
          type: string
      required:
        - id
        - location_id
        - profile_id
        - assignment_type
        - role_type
        - is_default
        - is_active
        - starts_at
        - ends_at
        - external_id
        - profile_external_id
        - sort_order
        - notes
        - meta
        - excluded_service_handles
        - location
        - profile
        - created_at
        - updated_at
        - deleted_at
      title: LocationProfileResource
  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

````