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

# Get template

> One template by id, with its steps, inputs, default schedule and readiness. Answers `404` when no template
has this id.

Needs the `automations:read` scope.



## OpenAPI

````yaml automations/api/openapi.json GET /v1/automations/templates/{templateId}
openapi: 3.1.0
info:
  title: Vortex IQ Automations API
  version: 1.0.0
  description: >
    REST API for Vortex IQ Automations. List the templates your organisation can
    use, set automations up on your

    stores, schedule them, run them, and follow every run, from your own tools
    instead of the Automations screens.


    The API is served from `https://automations-api.vortexiq.ai`; the login that
    gives you a token is on

    `https://app.vortexiq.ai`. Every call acts as the person who logged in,
    within their organisation, and every

    answer is JSON. See [Authentication](/automations/api/authentication).
  contact:
    name: Vortex IQ Support
    url: https://www.vortexiq.ai/contact-us
servers:
  - url: https://automations-api.vortexiq.ai
    description: Vortex IQ Automations (production)
security:
  - bearerAuth: []
  - apiCredential: []
tags:
  - name: Authentication
    description: >-
      Exchange your identity and your organisation's API credential for a bearer
      token.
  - name: Templates & stores
    description: What you can set up, and what it can run on.
  - name: Automations
    description: Set automations up, read them and change them.
  - name: Automation controls
    description: Pause, resume, archive and restore.
  - name: Runs
    description: Run an automation now, follow a run, read the history.
  - name: Schedules & calendar
    description: Preview a schedule, list the coming runs, move or skip one.
  - name: Approvals
    description: >-
      The runs waiting for a decision. Deciding happens in the Vortex IQ app
      only.
  - name: Imported workflows
    description: >-
      Bring an n8n or Shopify Flow workflow in, see how it would run, and run it
      as your own automation.
  - name: Status
    description: >-
      Whether Automations are on for your organisation, and how the service is
      doing.
paths:
  /v1/automations/templates/{templateId}:
    get:
      tags:
        - Templates & stores
      summary: Get template
      description: >-
        One template by id, with its steps, inputs, default schedule and
        readiness. Answers `404` when no template

        has this id.


        Needs the `automations:read` scope.
      operationId: getTemplate
      parameters:
        - name: templateId
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/TemplateId'
          description: The template's id, such as `shopify-catalogue-quality`.
      responses:
        '200':
          description: The template with readiness for this organisation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemplateResponse'
              example:
                success: true
                contract_version: 1
                data:
                  template:
                    id: shopify-catalogue-quality
                    version: 4
                    platform: shopify
                    outcome: run
                    name: Catalogue quality checklist · Shopify
                    description: >-
                      Find missing product descriptions, images, categories,
                      variant SKUs, prices and shipping weights.
                    sentence: >-
                      Find missing product descriptions, images, categories,
                      variant SKUs, prices and shipping weights.
                    inputs: []
                    connections:
                      - shopify
                    reads:
                      - tier: catalogue
                        what: store profile
                      - tier: catalogue
                        what: products
                    writes: []
                    steps:
                      - 'n': 1
                        kind: Reads
                        note: >-
                          This operation is imported by the workflow and may be
                          used when it runs.
                        gives: []
                        label: Read store domain, currency and time zone (Shopify).
                        paged: false
                        title: Read store domain, currency and time zone (Shopify).
                        checks: []
                        inputs: []
                        on_fail: null
                        connector: shopify
                        operation: shopify.starter:shopifyStarterStore
                      - 'n': 2
                        kind: Reads
                        note: >-
                          This operation is imported by the workflow and may be
                          used when it runs.
                        gives: []
                        label: >-
                          Read product descriptions, images and collections
                          (Shopify).
                        paged: false
                        title: >-
                          Read product descriptions, images and collections
                          (Shopify).
                        checks: []
                        inputs: []
                        on_fail: null
                        connector: shopify
                        operation: shopify.starter:shopifyStarterProducts
                    result_view:
                      version: 1
                      title: Product checklist
                      description: >-
                        Filter the catalogue issues, open affected products and
                        download the complete work list.
                      collection: records
                      columns:
                        - product
                        - sku
                      filters:
                        - finding
                        - findings
                      page_size: 25
                    uses_ai: false
                    has_approval_step: false
                    weight: ordinary
                    default_schedule:
                      cadence: manual
                    status: available
                    readiness:
                      ready: true
                      missing: []
                    records_called: null
                  kinds:
                    - kind: aws
                      role: store
                      name: Amazon Web Services
                      noun: account
                    - kind: azure
                      role: store
                      name: Microsoft Azure
                      noun: account
        '401':
          $ref: '#/components/responses/Unauthorised'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
      security:
        - bearerAuth:
            - automations:read
        - apiCredential:
            - automations:read
components:
  schemas:
    TemplateId:
      type: string
      description: The template's id, such as `shopify-catalogue-quality`.
      pattern: ^[a-z0-9][a-z0-9-]{1,80}$
    TemplateResponse:
      type: object
      required:
        - success
        - data
        - contract_version
      properties:
        success:
          type: boolean
          const: true
        contract_version:
          $ref: '#/components/schemas/ContractVersion'
        data:
          type: object
          required:
            - template
            - kinds
          properties:
            template:
              $ref: '#/components/schemas/Template'
            kinds:
              description: Every kind of connection, with its display name.
              type: array
              items:
                $ref: '#/components/schemas/ConnectionKind'
    ContractVersion:
      type: integer
      minimum: 1
      description: >-
        The version of the API this answer follows. It changes only for a
        breaking change.
    Template:
      type: object
      required:
        - id
        - version
        - platform
        - outcome
        - name
        - description
        - sentence
        - inputs
        - connections
        - reads
        - writes
        - steps
        - uses_ai
        - has_approval_step
        - weight
        - result_view
        - default_schedule
        - status
        - readiness
      properties:
        id:
          $ref: '#/components/schemas/TemplateId'
        version:
          type: integer
          minimum: 1
        platform:
          description: >-
            What the template runs on, by kind; null for a template that runs on
            no single store or account, which reads the connections you choose
            instead.
          oneOf:
            - $ref: '#/components/schemas/Platform'
            - type: 'null'
        outcome:
          type: string
          enum:
            - run
            - grow
        trigger:
          description: >-
            How an automation of this template starts when it is not on a
            schedule, such as when stock changes; null for a scheduled template.
          oneOf:
            - $ref: '#/components/schemas/TemplateTrigger'
            - type: 'null'
        steps:
          type: array
          description: The template's steps in run order, in plain words.
          items:
            $ref: '#/components/schemas/TemplateStep'
        name:
          type: string
        description:
          type: string
        sentence:
          type: string
          description: The one-line read-back shown on set-up, in plain words.
        inputs:
          type: array
          items:
            $ref: '#/components/schemas/InputField'
        connections:
          type: array
          description: >-
            The connections the template needs, by kind: its store's platform
            first, then every other connection its steps use, in step order.
          items:
            $ref: '#/components/schemas/ConnectionPlatform'
        reads:
          type: array
          description: What it reads, each with a sensitivity tier.
          items:
            type: object
            required:
              - what
              - tier
            properties:
              what:
                type: string
              tier:
                type: string
                enum:
                  - catalogue
                  - orders
                  - customers
                  - marketing
                  - public
                  - billing
                description: >-
                  How sensitive what it reads is. `marketing` is an advertising
                  or email account; `public` is a page anyone can open, such as
                  a page-speed test.
        writes:
          type: array
          description: >-
            Named operations it may perform after approval. Empty means it only
            reads.
          items:
            type: string
        uses_ai:
          type: boolean
        has_approval_step:
          type: boolean
        weight:
          type: string
          enum:
            - ordinary
            - heavy
          description: '`ordinary` or `heavy`: how demanding a run of this template is.'
        result_view:
          oneOf:
            - $ref: '#/components/schemas/ResultView'
            - type: 'null'
          description: >-
            How the records in a run's `result` read as a table: which fields
            are columns and which are filters.
        default_schedule:
          $ref: '#/components/schemas/Schedule'
        status:
          type: string
          enum:
            - available
            - retired
        readiness:
          $ref: '#/components/schemas/Readiness'
        records_called:
          type:
            - string
            - 'null'
          description: >-
            What the records in a run's `result.records` are called, in the
            plural, such as "findings".
    ConnectionKind:
      type: object
      description: One kind of connection, as templates use it.
      required:
        - kind
        - role
        - name
      additionalProperties: false
      properties:
        kind:
          $ref: '#/components/schemas/ConnectionPlatform'
        role:
          type: string
          enum:
            - store
            - account
            - service
          description: >-
            `store`: what an automation runs on (a store, or an account such as
            a cloud account). `account`: a connection a template reads beside
            its store, such as an advertising account.
        name:
          type: string
          minLength: 1
          description: The display name.
        noun:
          oneOf:
            - $ref: '#/components/schemas/KindNoun'
            - type: 'null'
          description: 'What a connection of this kind is called: `store` or `account`.'
      example:
        kind: klaviyo
        role: account
        name: Klaviyo
        noun: account
    ErrorResponse:
      type: object
      required:
        - success
        - message
        - contract_version
      properties:
        success:
          type: boolean
          const: false
        contract_version:
          $ref: '#/components/schemas/ContractVersion'
        message:
          type: string
          description: Plain words saying what happened and what to do.
        code:
          type: string
          description: >-
            A stable code to act on, such as `wrong_state`, `stale_version` or
            `allowance_spent`.
        errors:
          type: object
          description: Field name to messages, for 422.
          additionalProperties:
            type: array
            items:
              type: string
    Platform:
      type: string
      pattern: ^[a-z][a-z0-9_]{1,63}$
      description: >-
        What an automation runs on: a store's platform (`shopify`,
        `bigcommerce`), or an account a template runs on, such as a cloud
        account (`aws`).
      example: shopify
    TemplateTrigger:
      type: object
      additionalProperties: false
      required:
        - kind
        - topics
        - words
      properties:
        kind:
          type: string
          const: event
        topics:
          type: array
          minItems: 1
          maxItems: 8
          items:
            type: string
            minLength: 1
            maxLength: 80
          description: >-
            The platform's own topic strings, as its webhooks name them:
            `inventory_levels/update`, `store/sku/inventory/updated`.
        words:
          type: string
          description: 'When it runs, in plain words: "Runs when stock changes".'
    TemplateStep:
      type: object
      description: One step of a template, in plain words.
      required:
        - 'n'
        - kind
        - title
        - note
        - connector
        - operation
        - label
        - paged
        - on_fail
        - checks
        - gives
        - inputs
      properties:
        'n':
          type: integer
          minimum: 1
        kind:
          type: string
          description: >-
            What the step does, in one word: Reads, Checks, Writes, Gives you,
            AI prepares, or You.
        title:
          type: string
        note:
          type: string
          description: What the step does, in a sentence. May be empty.
        connector:
          type:
            - string
            - 'null'
          description: >-
            The connector the step calls, by id, or null for a step that calls
            none.
        operation:
          type:
            - string
            - 'null'
          description: >-
            The operation id, for example
            `shopify.starter:shopifyStarterVariants`.
        label:
          type:
            - string
            - 'null'
        paged:
          type: boolean
          description: True when the call sits inside a loop and reads page after page.
        on_fail:
          type:
            - string
            - 'null'
          description: What happens if the step cannot finish, when the program says.
        checks:
          type: array
          items:
            type: string
        gives:
          type: array
          description: The fields the step hands back.
          items:
            type: string
        inputs:
          type: array
          description: The values written into the step, by name.
          items:
            type: object
            required:
              - name
              - value
            properties:
              name:
                type: string
              value:
                type:
                  - string
                  - 'null'
    InputField:
      type: object
      required:
        - name
        - label
        - kind
        - required
      properties:
        name:
          type: string
        label:
          type: string
        kind:
          type: string
          enum:
            - number
            - text
            - choice
            - boolean
            - list
            - condition
          description: >-
            The kind of value. `condition`: an n8n If conditions object, `{
            options, conditions: [...], combinator }`, over the field's
            `fields`, with 1 to 10 conditions; `default` is the condition a new
            automation starts with.
        fields:
          type:
            - array
            - 'null'
          description: >-
            For a `condition`, the fields a rule may compare, read in each run.
            Absent for every other kind.
          items:
            type: object
            additionalProperties: false
            required:
              - name
              - label
              - type
            properties:
              name:
                type: string
                pattern: ^[a-z_]+$
              label:
                type: string
              type:
                type: string
                enum:
                  - number
                  - string
                  - array
                  - boolean
        required:
          type: boolean
        example:
          type:
            - string
            - 'null'
        hint:
          type:
            - string
            - 'null'
        default:
          description: Used when you leave it empty.
        choices:
          type:
            - array
            - 'null'
          items:
            type: string
        min:
          type:
            - number
            - 'null'
        max:
          type:
            - number
            - 'null'
          description: >-
            For a number, the largest value; for a list, the most values it
            takes.
        format:
          type:
            - string
            - 'null'
          enum:
            - email
            - integer
            - null
          description: |-
            What each value must be, beyond its kind: `email`, an email address
            (a list of them for a `list`); `integer`, a whole number (for a
            `number`: a day of the month, a count). The service refuses a value
            that is not one, naming it, so a merchant learns at set-up and not
            from a failed run. Absent or null: any text, any number.
    ConnectionPlatform:
      type: string
      pattern: ^[a-z][a-z0-9_]{1,63}$
      description: >-
        What a connection is for, by connector id: a store (`shopify`,
        `bigcommerce`), or an account a template reads beside its store
        (`google_ads`, `klaviyo`, ...).
      example: klaviyo
    ResultView:
      type: object
      description: >-
        How a template's runs read as a table: which list in the run's `result`
        holds the rows, which fields are columns, and which are offered as
        filters.
      required:
        - version
        - title
        - description
        - collection
        - columns
        - filters
        - page_size
      properties:
        version:
          type: integer
          minimum: 1
          description: The view's own format version; 1 for every packaged template.
        title:
          type: string
          maxLength: 40
          description: The table's heading, for example `Stock review`.
        description:
          type: string
          maxLength: 300
          description: What to do with the rows, in a sentence.
        collection:
          type: string
          maxLength: 64
          description: >-
            The key in the run's `result` whose array holds the rows; `records`
            for every packaged template.
        columns:
          type: array
          maxItems: 12
          description: The row fields shown as columns, in order.
          items:
            type: string
            maxLength: 64
        filters:
          type: array
          maxItems: 8
          description: >-
            The row fields offered as filters. Not every one is a column, and a
            row need not carry every one.
          items:
            type: string
            maxLength: 64
        page_size:
          type: integer
          minimum: 1
          description: Rows per page; 25 for every packaged template.
    Schedule:
      type: object
      required:
        - cadence
      properties:
        cadence:
          $ref: '#/components/schemas/Cadence'
        run_at:
          type:
            - string
            - 'null'
          description: >-
            The time of day in the automation's timezone, `HH:MM`. Required for
            once, daily, weekdays, weekly and monthly.
          pattern: ^([01][0-9]|2[0-3]):[0-5][0-9]$
        day_of_week:
          type:
            - integer
            - 'null'
          minimum: 1
          maximum: 7
          description: >-
            1 is Monday. Required for weekly, and for monthly with
            `week_of_month`.
        day_of_month:
          type:
            - integer
            - 'null'
          minimum: 1
          maximum: 31
          description: >-
            For monthly, unless `week_of_month` is given. 31 runs on the last
            day of a shorter month.
        date:
          type:
            - string
            - 'null'
          pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}$
          description: >-
            Required for once; the local calendar day it runs on, in the
            automation's timezone. A day and time already passed are refused.
        days:
          type:
            - array
            - 'null'
          items:
            type: integer
            minimum: 1
            maximum: 7
          minItems: 1
          maxItems: 7
          uniqueItems: true
          description: >-
            For weekdays; which days, 1 is Monday. Absent means Monday to
            Friday.
        week_of_month:
          type:
            - integer
            - 'null'
          enum:
            - 1
            - 2
            - 3
            - 4
            - -1
            - null
          description: >-
            For monthly, with `day_of_week`; the first to fourth, or -1 the
            last, such weekday of the month, instead of `day_of_month`.
    Readiness:
      type: object
      description: >-
        Whether your organisation can set the template up right now; for a
        workflow automation, whether it can be turned on or run now.
      required:
        - ready
        - missing
      properties:
        ready:
          type: boolean
        unconfigured:
          type: array
          description: >-
            A workflow automation's steps still without a connection they can
            use, in order. Absent for a template.
          items:
            $ref: '#/components/schemas/UnconfiguredStep'
        missing:
          type: array
          description: >-
            Connections not present, by kind, always a subset of the template's
            `connections`; never a key of Vortex IQ's own. Empty when ready.
          items:
            $ref: '#/components/schemas/ConnectionPlatform'
    KindNoun:
      type: string
      enum:
        - store
        - account
      description: >-
        `store` for a store's platform; `account` for anything else, such as a
        cloud account.
    Cadence:
      type: string
      description: >-
        How often an automation runs. `once` runs on one date and time and then
        has no next run.
      enum:
        - manual
        - once
        - hourly
        - every_6_hours
        - daily
        - weekdays
        - weekly
        - monthly
    UnconfiguredStep:
      type: object
      required:
        - step
        - kind
        - target
        - why
      properties:
        step:
          type: string
        kind:
          $ref: '#/components/schemas/StepNeedKind'
        target:
          oneOf:
            - $ref: '#/components/schemas/StepTarget'
            - type: 'null'
        why:
          type: string
          enum:
            - no_connection
            - wrong_target
            - needs_reconnecting
            - not_arrived
          description: >-
            `no_connection`: none bound, or the bound one is not yours or not of
            the step's kind. `wrong_target`: it leads to another spreadsheet.
            `needs_reconnecting`: the connection is disconnected; connect it
            again in the Vortex IQ app. `not_arrived` is reserved and not used
            yet.
    StepNeedKind:
      type: string
      enum:
        - store
        - google_sheets
        - teams
      description: >-
        What a step needs to run: `store`, the automation's own store, always
        there; or a Google Sheets or Microsoft Teams connection you bind.
    StepTarget:
      type: object
      additionalProperties: false
      description: >-
        Where a step's connection must lead, as far as the plan can read it from
        the step. A field the step decides only while running is null or absent.
      properties:
        spreadsheet_id:
          type:
            - string
            - 'null'
          description: The spreadsheet a Google Sheets step writes to or reads.
        sheet:
          type:
            - string
            - 'null'
          description: The tab, by its name.
  responses:
    Unauthorised:
      description: >-
        The token is missing, has expired, or is no longer valid (for example,
        the API credential was rotated or disabled). The answer carries
        `WWW-Authenticate`; log in again for a new token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Forbidden:
      description: >-
        Your token is valid but may not do this: it lacks the scope, the
        operation is not part of the Automations API, or Automations are
        switched off for your organisation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: >-
        Not found. Anything that belongs to another organisation is answered the
        same way.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    TooManyRequests:
      description: >-
        Too many calls in a minute from you or your organisation; nothing was
        done. `Retry-After` says how many seconds to wait.
      headers:
        Retry-After:
          schema:
            type: integer
            minimum: 1
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        A bearer token from [Login](/automations/api/login), sent as
        `Authorization: Bearer <token>`. Valid for 60 minutes; it acts as the
        person named at login, within their organisation, and never approves.
        Rotating or disabling the organisation's API credential ends every token
        made with it on its next call. See
        [Authentication](/automations/api/authentication).
    apiCredential:
      type: oauth2
      description: >-
        Your organisation's API credential, exchanged at
        [Login](/automations/api/login) for the bearer token above: an OAuth 2.0
        client-credentials request, with the `username`, `email` and
        `organization_name` of the person the token acts as sent as extra
        fields, as Postman's OAuth 2.0 helper can send them. The token never
        holds `automations:approve`.
      flows:
        clientCredentials:
          tokenUrl: https://app.vortexiq.ai/v2/api/automations/login
          scopes:
            automations:read: >-
              Read automations, templates, stores, runs, the calendar, approvals
              and imports.
            automations:write: >-
              Set automations up, change, pause, resume, archive, restore and
              run them; move and skip coming runs; keep and delete imports.

````

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