> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vortexiq.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Login

> Exchange your identity (username, email, organisation name) and your organisation's API credential (`client_id` + `client_secret`) for a bearer token valid for 10 days. The credential is issued per organisation by Vortex IQ — contact [support](https://www.vortexiq.ai/contact-us) to have one provisioned. The organisation must have Store Migration enabled and at least 2 connected BigCommerce stores (a migration needs a source and a destination). Rate limited to 10 requests per minute.



## OpenAPI

````yaml vortex-apps/staging-pro/api/openapi.json POST /login
openapi: 3.1.0
info:
  title: StagingPro V2 Migration API (BigCommerce)
  version: 2.0.0
  description: >-
    REST API for the StagingPro V2 BC Migration app. Browse a connected store's
    catalogue, size a migration before you run it, launch bulk or selective
    store-to-store migrations, control runs, and follow live progress.


    All endpoints are served from `https://app.vortexiq.ai/v2/api/bc-migration`
    and are scoped to your organisation. Authenticate with a bearer token from
    the Login endpoint (scripts and services) or your signed-in session
    (browser). See
    [Authentication](/vortex-apps/staging-pro/api/authentication).
  contact:
    name: Vortex IQ Support
    url: https://www.vortexiq.ai/contact-us
servers:
  - url: https://app.vortexiq.ai/v2/api/bc-migration
    description: Vortex IQ platform (production)
security:
  - sessionAuth: []
  - bearerAuth: []
tags:
  - name: Authentication
    description: >-
      Exchange your identity and your organisation's API credential for a bearer
      token.
  - name: Migrations
    description: >-
      Create migrations, list history, read run detail and per-item issues, and
      follow live progress.
  - name: Migration Controls
    description: Pause, resume, cancel, and verify-only re-runs.
  - name: Counts & Forecast
    description: Size a migration before launching it. Neither endpoint creates a run.
paths:
  /login:
    post:
      tags:
        - Authentication
      summary: Login
      description: >-
        Exchange your identity (username, email, organisation name) and your
        organisation's API credential (`client_id` + `client_secret`) for a
        bearer token valid for 10 days. The credential is issued per
        organisation by Vortex IQ — contact
        [support](https://www.vortexiq.ai/contact-us) to have one provisioned.
        The organisation must have Store Migration enabled and at least 2
        connected BigCommerce stores (a migration needs a source and a
        destination). Rate limited to 10 requests per minute.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - username
                - email
                - organization_name
                - client_id
                - client_secret
              properties:
                username:
                  type: string
                  description: >-
                    Your name as registered on your Vortex IQ account (first
                    name, last name, or full name — case-insensitive).
                  example: Jane Merchant
                email:
                  type: string
                  format: email
                  description: The email of your Vortex IQ user.
                  example: jane@example.com
                organization_name:
                  type: string
                  description: >-
                    Your organisation's name exactly as registered
                    (case-insensitive). Your user must belong to this
                    organisation.
                  example: Example Retail Ltd
                client_id:
                  type: string
                  description: Your organisation's API client id, issued by Vortex IQ.
                  example: viq_bcmig_Ab12Cd34Ef56Gh78Ij90Kl12
                client_secret:
                  type: string
                  description: >-
                    Your organisation's API client secret. Shown once at issue
                    time; keep it server-side.
                  example: <client-secret>
      responses:
        '200':
          description: >-
            Authenticated. Send `access_token` as `Authorization: Bearer
            <token>` on every subsequent call.
          content:
            application/json:
              schema:
                type: object
                properties:
                  user:
                    type: object
                    properties:
                      email:
                        type: string
                      first_name:
                        type: string
                      last_name:
                        type: string
                  organization:
                    type: object
                    properties:
                      id:
                        type: integer
                      name:
                        type: string
                  stores:
                    type: array
                    description: >-
                      The BigCommerce stores connected to your organisation. Use
                      these store hashes on the migration endpoints.
                    items:
                      type: object
                      properties:
                        integration_id:
                          type: integer
                        store_hash:
                          type: string
                        name:
                          type: string
                        environment_type:
                          type: string
                          nullable: true
                        is_production:
                          type: boolean
                  token_type:
                    type: string
                    example: Bearer
                  access_token:
                    type: string
                    description: The bearer token (JWT). Treat it as a secret.
                  expires_in:
                    type: integer
                    description: Token lifetime in seconds (864000 = 10 days).
                    example: 864000
                  expires_at:
                    type: string
                    format: date-time
                    description: Absolute expiry time (ISO 8601).
              example:
                user:
                  email: jane@example.com
                  first_name: Jane
                  last_name: Merchant
                organization:
                  id: 42
                  name: Example Retail Ltd
                stores:
                  - integration_id: 101
                    store_hash: abc123xyz
                    name: Production Store
                    environment_type: production
                    is_production: true
                  - integration_id: 102
                    store_hash: def456uvw
                    name: Staging Store
                    environment_type: staging
                    is_production: false
                token_type: Bearer
                access_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...
                expires_in: 864000
                expires_at: '2026-07-27T14:46:16+00:00'
        '401':
          description: >-
            One of the provided values could not be validated. The response is
            deliberately generic — it does not reveal which field failed.
          content:
            application/json:
              example:
                error: invalid_credentials
                message: >-
                  The provided username, email or organization name could not be
                  validated.
        '403':
          description: Your organisation has fewer than 2 connected BigCommerce stores.
          content:
            application/json:
              example:
                error: insufficient_stores
                message: >-
                  At least 2 connected BigCommerce stores are required for this
                  organization to use the migration API.
                stores_found: 1
        '422':
          description: A required field is missing or malformed.
          content:
            application/json:
              example:
                message: The given data was invalid.
                errors:
                  client_id:
                    - The client id field is required.
        '429':
          description: Rate limited — more than 10 login attempts in a minute.
        '503':
          description: API access is not configured on this environment.
          content:
            application/json:
              example:
                error: not_configured
                message: BC Migration API access is not configured on this environment.
      security: []
components:
  securitySchemes:
    sessionAuth:
      type: apiKey
      in: cookie
      name: vortexiq_session
      description: >-
        Your signed-in Vortex IQ session (browser calls). Requests are scoped to
        your organisation, which must have Store Migration enabled. For
        server-to-server calls use a bearer token instead — see
        [Authentication](/vortex-apps/staging-pro/api/authentication).
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        A bearer token from [Login](/vortex-apps/staging-pro/api/login). Valid
        for 10 days; scoped to the user and organisation it was issued for.
        Rotating or disabling the organisation's API credential immediately
        invalidates all outstanding tokens.

````