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

# Switch Profile Region

> A `POST` to the `/profiles/{profile}/regions/{region}/switch` endpoint allows your application to move a profile into a region and convert its tier points, and the kinds of loyalty points it holds from other regions into point definitions of the region you name for each, one point at a time so each keeps its own dates. Kinds you do not name are left as they are and reported as `left_behind`. The conversion is done before the response is returned, and it either all happens or none of it does. Send `dry_run` to see what would be converted without changing anything.



## OpenAPI

````yaml post /v3/profiles/{profile}/regions/{region}/switch
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/profiles/{profile}/regions/{region}/switch:
    post:
      tags:
        - Profile Region
      summary: Switch Profile Region
      description: >-
        A `POST` to the `/profiles/{profile}/regions/{region}/switch` endpoint
        allows your application to move a profile into a region and convert its
        tier points, and the kinds of loyalty points it holds from other regions
        into point definitions of the region you name for each, one point at a
        time so each keeps its own dates. Kinds you do not name are left as they
        are and reported as `left_behind`. The conversion is done before the
        response is returned, and it either all happens or none of it does. Send
        `dry_run` to see what would be converted without changing anything.
      operationId: profileRegion.switchRegion
      parameters:
        - name: profile
          in: path
          required: true
          description: The profile ID
          schema:
            type: string
            format: uuid
        - name: region
          in: path
          required: true
          description: The region ID
          schema:
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SwitchProfileRegion'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                anyOf:
                  - type: object
                    properties:
                      data:
                        type: string
                    required:
                      - data
                  - type: object
                    properties:
                      data:
                        type: object
                        properties:
                          dry_run:
                            type: boolean
                          region_changed:
                            type: string
                          tier:
                            type: object
                            additionalProperties:
                              anyOf:
                                - {}
                                - type: integer
                                - type: string
                          points:
                            type: array
                            items: {}
                          left_behind:
                            type: array
                            items:
                              type: object
                              properties:
                                point_definition_handle:
                                  type: string
                                name:
                                  type: string
                                records:
                                  type: integer
                                value_remaining:
                                  type: number
                              required:
                                - point_definition_handle
                                - name
                                - records
                                - value_remaining
                        required:
                          - dry_run
                          - region_changed
                          - tier
                          - points
                          - left_behind
                    required:
                      - data
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '404':
          $ref: '#/components/responses/ModelNotFoundException'
        '409':
          description: An error
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error overview.
                    example: The profile is already being moved between regions.
                required:
                  - message
        '422':
          $ref: '#/components/responses/ValidationException'
components:
  schemas:
    SwitchProfileRegion:
      type: object
      properties:
        dry_run:
          type: boolean
        country:
          type:
            - string
            - 'null'
        state:
          type:
            - string
            - 'null'
        tier_rate:
          type:
            - number
            - 'null'
          maximum: 1000000
        point_conversions:
          type:
            - array
            - 'null'
          items:
            type: object
            properties:
              from_point_definition_handle:
                type: string
              to_point_definition_handle:
                type: string
              rate:
                type: number
                maximum: 1000000
            required:
              - from_point_definition_handle
              - to_point_definition_handle
              - rate
      title: SwitchProfileRegion
  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

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.