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

# Order forms

> This endpoint is only available for standard and enterprise tier organizations.



## OpenAPI

````yaml post /v1/forms/order
openapi: 3.0.0
info:
  title: Thena Platform
  description: The Thena Platform API description
  version: 1.0.0
  contact: {}
servers:
  - url: https://platform.thena.ai
    description: Platform
  - url: http://localhost:8000
    description: Local
security:
  - ApiKey: []
tags: []
paths:
  /v1/forms/order:
    post:
      tags:
        - Forms
      description: >-
        This endpoint is only available for standard and enterprise tier
        organizations.
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrderFormsDto'
      responses:
        '200':
          description: Forms ordered successfully!
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/FormResponseDto'
        '400':
          description: Form validation failed
          content:
            application/json:
              example:
                statusCode: 400
                message: >-
                  Some forms have been modified, Please try updating the latest
                  version. Modified forms: FO123456789
                error: Bad Request
        '401':
          description: User is not authenticated!
          content:
            application/json:
              example:
                statusCode: 401
                message: User is not authenticated!
                error: Unauthorized
        '403':
          description: User does not have access to this resource!
          content:
            application/json:
              example:
                statusCode: 403
                message: User does not have access to this resource!
                error: Forbidden
        '404':
          description: Forms not found!
          content:
            application/json:
              example:
                statusCode: 404
                message: 'Forms not found: FO123456789'
                error: Not Found
        '500':
          description: Something went wrong!
          content:
            application/json:
              example:
                statusCode: 500
                message: Something went wrong!
                error: Internal Server Error
        '503':
          description: This service/resource is currently unavailable.
          content:
            application/json:
              example:
                statusCode: 503
                message: This service/resource is currently unavailable.
                error: Service Unavailable
components:
  schemas:
    OrderFormsDto:
      type: object
      properties:
        forms:
          type: array
          items:
            $ref: '#/components/schemas/OrderFormItemDto'
      required:
        - forms
    FormResponseDto:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/FormResponse'
        status:
          type: boolean
        message:
          type: string
        timestamp:
          format: date-time
          type: string
      required:
        - data
        - status
        - message
        - timestamp
    OrderFormItemDto:
      type: object
      properties:
        formId:
          type: string
          description: The ID of the form
        order:
          type: number
          description: The order of the form
        version:
          type: number
          description: The version of the form
      required:
        - formId
        - order
        - version
    FormResponse:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        description:
          type: string
        fields:
          type: array
          items:
            $ref: '#/components/schemas/FormFieldDto'
        conditions:
          type: array
          items:
            $ref: '#/components/schemas/Condition'
        version:
          type: number
        isActive:
          type: boolean
        default:
          type: boolean
        createdAt:
          format: date-time
          type: string
        updatedAt:
          format: date-time
          type: string
        channels:
          type: array
          items:
            type: string
        teamId:
          type: string
        order:
          type: number
      required:
        - id
        - name
        - description
        - fields
        - conditions
        - version
        - isActive
        - default
        - createdAt
        - updatedAt
        - channels
        - teamId
        - order
    FormFieldDto:
      type: object
      properties:
        field:
          type: string
          description: The field
        defaultValue:
          type: object
          description: The default value
        mandatoryOnCreation:
          type: boolean
          description: Indicates if the field is mandatory on creation
        mandatoryOnClose:
          type: boolean
          description: Indicates if the field is mandatory on close
        visibleToCustomer:
          type: boolean
          description: Indicates if the field is visible to customer
        editableByCustomer:
          type: boolean
          description: Indicates if the field is editable by customer
      required:
        - field
        - editableByCustomer
    Condition:
      type: object
      properties:
        triggerFieldId:
          type: string
          description: The ID of the trigger field
        triggerFieldValue:
          type: object
          description: The value of the trigger field
        conditionType:
          type: string
          description: The type of the condition
        targetFields:
          description: The target fields
          type: array
          items:
            $ref: '#/components/schemas/TargetField'
        forVendor:
          type: boolean
          description: Indicates if the form is for vendor
        forUser:
          type: boolean
          description: Indicates if the form is for user
        teamId:
          type: string
          description: The ID of the team
      required:
        - triggerFieldId
        - triggerFieldValue
        - conditionType
        - targetFields
    TargetField:
      type: object
      properties:
        id:
          type: string
          description: The ID of the target field
        type:
          type: string
          description: The type of the target field
        value:
          type: object
          description: The value of the target field
        options:
          description: The options of the target field
          type: array
          items:
            $ref: '#/components/schemas/TargetFieldOption'
    TargetFieldOption:
      type: object
      properties: {}
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: 'Enter your API key '

````