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

# Query



## OpenAPI

````yaml /openapi.json post /v1/workspaces/{workspaceId}/brand-standards/query
openapi: 3.1.0
info:
  title: Specurate API
  description: ''
  version: 1.0.0
  contact: {}
servers:
  - url: https://app.specurate.com/api
    description: API Server
security: []
tags: []
paths:
  /v1/workspaces/{workspaceId}/brand-standards/query:
    post:
      tags:
        - Brand Standard Table Query
      summary: Query
      operationId: BrandStandardTableQueryController_query_v1
      parameters:
        - name: workspaceId
          required: true
          in: path
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FabricationTemplatesTableQueryDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/TableQueryGroupsResponseDto'
                  - $ref: >-
                      #/components/schemas/BrandStandardTableQueryRowsResponseDto
components:
  schemas:
    FabricationTemplatesTableQueryDto:
      type: object
      properties:
        surface:
          type: string
          const: fabrication_templates
        configuration:
          type: object
          properties:
            schemaVersion:
              type: number
              const: 1
            columns:
              maxItems: 200
              type: array
              items:
                type: string
                minLength: 1
                maxLength: 255
            quickFilters:
              type: object
              properties:
                status:
                  maxItems: 20
                  type: array
                  items:
                    type: string
                    minLength: 1
                    maxLength: 255
                categoryIds:
                  maxItems: 100
                  type: array
                  items:
                    type: string
                    minLength: 1
                    maxLength: 255
                columnFilters:
                  maxItems: 50
                  type: array
                  items:
                    oneOf:
                      - type: object
                        properties:
                          fieldKey:
                            type: string
                            minLength: 1
                            maxLength: 255
                          type:
                            type: string
                            const: text
                          value:
                            type: string
                            minLength: 1
                            maxLength: 1000
                          mode:
                            type: string
                            enum:
                              - contains
                              - equals
                        required:
                          - fieldKey
                          - type
                          - value
                          - mode
                        additionalProperties: false
                      - type: object
                        properties:
                          fieldKey:
                            type: string
                            minLength: 1
                            maxLength: 255
                          type:
                            type: string
                            const: number
                          min:
                            type: number
                          max:
                            type: number
                        required:
                          - fieldKey
                          - type
                        additionalProperties: false
                      - type: object
                        properties:
                          fieldKey:
                            type: string
                            minLength: 1
                            maxLength: 255
                          type:
                            type: string
                            const: boolean
                          value:
                            type: boolean
                        required:
                          - fieldKey
                          - type
                          - value
                        additionalProperties: false
                      - type: object
                        properties:
                          fieldKey:
                            type: string
                            minLength: 1
                            maxLength: 255
                          type:
                            type: string
                            const: list
                          values:
                            minItems: 1
                            maxItems: 100
                            type: array
                            items:
                              type: string
                              minLength: 1
                              maxLength: 255
                        required:
                          - fieldKey
                          - type
                          - values
                        additionalProperties: false
                      - type: object
                        properties:
                          fieldKey:
                            type: string
                            minLength: 1
                            maxLength: 255
                          type:
                            type: string
                            const: date
                          from:
                            type: string
                            format: date
                            pattern: >-
                              ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
                          to:
                            type: string
                            format: date
                            pattern: >-
                              ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
                        required:
                          - fieldKey
                          - type
                        additionalProperties: false
              required:
                - status
                - categoryIds
                - columnFilters
              additionalProperties: false
            advancedFilter:
              type: object
              properties:
                sets:
                  maxItems: 5
                  type: array
                  items:
                    type: object
                    properties:
                      conditions:
                        minItems: 1
                        maxItems: 10
                        type: array
                        items:
                          oneOf:
                            - type: object
                              properties:
                                fieldKey:
                                  type: string
                                  minLength: 1
                                  maxLength: 255
                                operator:
                                  type: string
                                  enum:
                                    - is_any_of
                                    - is_not_any_of
                                values:
                                  minItems: 1
                                  maxItems: 100
                                  type: array
                                  items:
                                    type: string
                                    minLength: 1
                                    maxLength: 255
                              required:
                                - fieldKey
                                - operator
                                - values
                              additionalProperties: false
                            - type: object
                              properties:
                                fieldKey:
                                  type: string
                                  minLength: 1
                                  maxLength: 255
                                operator:
                                  type: string
                                  enum:
                                    - contains
                                    - does_not_contain
                                value:
                                  type: string
                                  minLength: 1
                                  maxLength: 1000
                              required:
                                - fieldKey
                                - operator
                                - value
                              additionalProperties: false
                            - type: object
                              properties:
                                fieldKey:
                                  type: string
                                  minLength: 1
                                  maxLength: 255
                                operator:
                                  type: string
                                  enum:
                                    - is_empty
                                    - is_not_empty
                              required:
                                - fieldKey
                                - operator
                              additionalProperties: false
                            - type: object
                              properties:
                                fieldKey:
                                  type: string
                                  minLength: 1
                                  maxLength: 255
                                operator:
                                  type: string
                                  enum:
                                    - date_on
                                    - date_before
                                    - date_after
                                value:
                                  type: string
                                  format: date
                                  pattern: >-
                                    ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
                              required:
                                - fieldKey
                                - operator
                                - value
                              additionalProperties: false
                            - type: object
                              properties:
                                fieldKey:
                                  type: string
                                  minLength: 1
                                  maxLength: 255
                                operator:
                                  type: string
                                  const: date_between
                                from:
                                  type: string
                                  format: date
                                  pattern: >-
                                    ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
                                to:
                                  type: string
                                  format: date
                                  pattern: >-
                                    ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
                              required:
                                - fieldKey
                                - operator
                                - from
                                - to
                              additionalProperties: false
                    required:
                      - conditions
                    additionalProperties: false
              required:
                - sets
              additionalProperties: false
            groupBy:
              maxItems: 2
              type: array
              items:
                type: object
                properties:
                  fieldKey:
                    type: string
                    minLength: 1
                    maxLength: 255
                  direction:
                    type: string
                    enum:
                      - asc
                      - desc
                required:
                  - fieldKey
                  - direction
                additionalProperties: false
            sort:
              maxItems: 1
              type: array
              items:
                type: object
                properties:
                  fieldKey:
                    type: string
                    minLength: 1
                    maxLength: 255
                  direction:
                    type: string
                    enum:
                      - asc
                      - desc
                required:
                  - fieldKey
                  - direction
                additionalProperties: false
          required:
            - schemaVersion
            - columns
            - quickFilters
            - advancedFilter
            - groupBy
            - sort
          additionalProperties: false
        search:
          type: string
          minLength: 1
          maxLength: 255
        groupPath:
          default: []
          maxItems: 2
          type: array
          items:
            type: object
            properties:
              fieldKey:
                type: string
                minLength: 1
                maxLength: 255
              valueKey:
                anyOf:
                  - type: string
                    minLength: 1
                    maxLength: 1000
                  - type: 'null'
            required:
              - fieldKey
              - valueKey
            additionalProperties: false
        cursor:
          type: string
          minLength: 1
          maxLength: 4096
        limit:
          default: 50
          type: integer
          minimum: 1
          maximum: 100
      required:
        - surface
        - configuration
      additionalProperties: false
    TableQueryGroupsResponseDto:
      type: object
      properties:
        kind:
          type: string
          enum:
            - groups
        path:
          type: array
          items:
            $ref: '#/components/schemas/TableQueryGroupPathSegmentDto'
        groups:
          type: array
          items:
            $ref: '#/components/schemas/TableQueryGroupDto'
        nextCursor:
          type: string
          nullable: true
        hasMore:
          type: boolean
        orderRevision:
          type: integer
          nullable: true
        level:
          type: number
        fieldKey:
          type: string
      required:
        - kind
        - path
        - groups
        - nextCursor
        - hasMore
        - orderRevision
        - level
        - fieldKey
    BrandStandardTableQueryRowsResponseDto:
      type: object
      properties:
        kind:
          type: string
          enum:
            - rows
        path:
          type: array
          items:
            $ref: '#/components/schemas/TableQueryGroupPathSegmentDto'
        items:
          type: array
          items:
            $ref: '#/components/schemas/BrandStandardResponseDto'
        nextCursor:
          type: string
          nullable: true
        orderRevision:
          type: integer
          nullable: true
        hasMore:
          type: boolean
      required:
        - kind
        - path
        - items
        - nextCursor
        - orderRevision
        - hasMore
    TableQueryGroupPathSegmentDto:
      type: object
      properties:
        fieldKey:
          type: string
        valueKey:
          type: string
          nullable: true
      required:
        - fieldKey
        - valueKey
    TableQueryGroupDto:
      type: object
      properties:
        path:
          type: array
          items:
            $ref: '#/components/schemas/TableQueryGroupPathSegmentDto'
        valueKey:
          type: string
          nullable: true
        label:
          type: string
          nullable: true
        itemCount:
          type: number
      required:
        - path
        - valueKey
        - label
        - itemCount
    BrandStandardResponseDto:
      type: object
      properties:
        id:
          type: string
        refNumber:
          type: string
        name:
          type: string
        categoryId:
          type: string
        categoryName:
          type: string
        templateFamilyId:
          type: string
        familyCode:
          type: string
          nullable: true
        productTypeId:
          type: string
          nullable: true
        productTypeName:
          type: string
          nullable: true
        columnsAttributes:
          type: object
          additionalProperties: true
        templateFamilyColumnsAttributes:
          type: object
          additionalProperties: true
        status:
          type: string
          enum:
            - draft
            - new_from_project
            - new_from_collection
            - ready_to_use
        templateFamilyVersion:
          type: number
        itemsCount:
          type: number
        materialsCount:
          type: number
        partsCount:
          type: number
        componentsCount:
          type: number
        linkedItemsCount:
          type: number
        lastLinkedAt:
          type: string
          nullable: true
        projectsCount:
          type: number
        projectNames:
          type: array
          items:
            type: string
        collectionsCount:
          type: number
        collectionNames:
          type: array
          items:
            type: string
        lastUsedProjectName:
          type: string
          nullable: true
        primaryImageUrl:
          type: string
          nullable: true
        position:
          type: number
        version:
          type: number
        createdAt:
          type: string
        updatedAt:
          type: string
        deletedAt:
          type: string
          nullable: true
      required:
        - id
        - refNumber
        - name
        - categoryId
        - categoryName
        - templateFamilyId
        - productTypeId
        - productTypeName
        - columnsAttributes
        - templateFamilyColumnsAttributes
        - status
        - templateFamilyVersion
        - itemsCount
        - materialsCount
        - partsCount
        - componentsCount
        - linkedItemsCount
        - lastLinkedAt
        - projectsCount
        - projectNames
        - collectionsCount
        - collectionNames
        - lastUsedProjectName
        - position
        - version
        - createdAt
        - updatedAt
        - deletedAt

````