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

# Get schema by ID

> Retrieve a specific schema by its unique identifier



## OpenAPI

````yaml get /v4/schemas/{schemaId}
openapi: 3.0.3
info:
  title: Kadoa API
  version: 3.0.0
  contact:
    name: Support
    email: support@kadoa.com
servers:
  - url: https://api.kadoa.com
security: []
paths:
  /v4/schemas/{schemaId}:
    get:
      tags:
        - Schemas
      summary: Get schema by ID
      description: Retrieve a specific schema by its unique identifier
      parameters:
        - name: schemaId
          in: path
          required: true
          schema:
            type: string
          description: Schema ID
      responses:
        '200':
          description: '200'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SchemaDataResponse'
        '400':
          description: '400'
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: boolean
                    description: Indicates an error occurred
                  message:
                    type: string
                    description: Error message
                  details:
                    nullable: true
                    description: Additional error details (e.g., validation errors)
                required:
                  - error
                  - message
        '401':
          description: '401'
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: boolean
                    description: Indicates an error occurred
                  message:
                    type: string
                    description: Error message
                  details:
                    nullable: true
                    description: Additional error details (e.g., validation errors)
                required:
                  - error
                  - message
        '404':
          description: '404'
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: boolean
                    description: Indicates an error occurred
                  message:
                    type: string
                    description: Error message
                  details:
                    nullable: true
                    description: Additional error details (e.g., validation errors)
                required:
                  - error
                  - message
        '500':
          description: '500'
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: boolean
                    description: Indicates an error occurred
                  message:
                    type: string
                    description: Error message
                  details:
                    nullable: true
                    description: Additional error details (e.g., validation errors)
                required:
                  - error
                  - message
      security:
        - ApiKeyAuth: []
components:
  schemas:
    SchemaDataResponse:
      type: object
      properties:
        error:
          type: boolean
          enum:
            - false
          description: Error flag (always false on success)
        data:
          type: object
          properties:
            id:
              type: string
              description: Unique identifier for the schema
            name:
              type: string
              description: Name of the schema
            isPublic:
              type: boolean
              description: Whether the schema is public
            schema:
              type: array
              items:
                description: Extraction field schema
                discriminator:
                  propertyName: fieldType
                oneOf:
                  - $ref: '#/components/schemas/DataField'
                  - type: object
                    properties:
                      name:
                        type: string
                        pattern: ^[a-zA-Z][a-zA-Z0-9_]*$
                      description:
                        type: string
                        minLength: 1
                      fieldType:
                        type: string
                        enum:
                          - METADATA
                      metadataKey:
                        type: string
                        enum:
                          - HTML
                          - MARKDOWN
                          - PAGE_URL
                    required:
                      - name
                      - fieldType
                      - metadataKey
                    additionalProperties: true
                  - $ref: '#/components/schemas/ClassificationField'
                  - $ref: '#/components/schemas/TransformOutputField'
              description: Array of field definitions
            entity:
              type: string
              description: Entity type for the schema
              nullable: true
            description:
              type: object
              properties:
                hintText:
                  type: string
                  description: Hint text for the schema
              required:
                - hintText
              description: Schema description metadata
          required:
            - id
            - name
            - isPublic
            - schema
            - entity
            - description
          description: Schema data
      required:
        - error
        - data
      title: SchemaDataResponse
      description: Response wrapper for a single schema
    DataField:
      type: object
      properties:
        name:
          type: string
          pattern: ^[a-zA-Z][a-zA-Z0-9_]*$
          description: Field name (e.g., productName, review_count)
        description:
          type: string
          minLength: 1
          description: Field description
        fieldType:
          default: SCHEMA
          type: string
          enum:
            - SCHEMA
        example:
          oneOf:
            - type: string
            - type: array
              items:
                type: string
          description: Example value for the field
        dataType:
          type: string
          description: >-
            Data type of the field. Must be uppercase: STRING, NUMBER, BOOLEAN,
            DATE, DATETIME, MONEY, IMAGE, LINK, OBJECT, ARRAY
          enum:
            - STRING
            - NUMBER
            - BOOLEAN
            - DATE
            - DATETIME
            - MONEY
            - IMAGE
            - LINK
            - OBJECT
            - ARRAY
        isKey:
          type: boolean
          description: >-
            Marks this field as part of the record's primary key. Key fields
            define row identity across runs and enable data linking (records
            with the same key values are treated as the same record over time,
            used for dedupe and change detection). Set true ONLY when the field
            is (1) unique per record on the source, (2) stable across runs (does
            not change for the same logical record), and (3) reliably present
            (not nullable/missing). Key fields should be scalar STRING, NUMBER,
            or LINK fields; avoid structured, semantic, boolean, image, and
            timestamp/date fields as keys. Good candidates: external IDs, SKUs,
            canonical URLs, posting IDs. Bad candidates: prices, counts,
            timestamps, free-text titles/descriptions, or anything that can
            change between runs. Multiple fields may be marked isKey to form a
            composite key (all parts must hold the same guarantees). If no field
            satisfies these guarantees, leave isKey unset on every field — data
            linking will simply be disabled, which is preferable to a wrong key.
            Choosing a non-stable or non-unique key causes duplicate rows and
            missed updates.
      required:
        - name
        - description
        - dataType
      title: DataField
      description: >-
        Extract and structure specific data from web pages with typed values
        (e.g., product prices, article titles, dates). Use this for actual data
        you want to capture.
    ClassificationField:
      type: object
      properties:
        name:
          type: string
          pattern: ^[a-zA-Z][a-zA-Z0-9_]*$
          description: Field name (e.g., category, product_type)
        description:
          type: string
          minLength: 1
          description: Optional field description
        fieldType:
          type: string
          enum:
            - CLASSIFICATION
        categories:
          type: array
          items:
            type: object
            properties:
              title:
                type: string
                description: Short title/label of the category
              definition:
                type: string
                description: Full definition/description of the category
            required:
              - title
              - definition
          description: List of predefined categories for classification
      required:
        - name
        - fieldType
        - categories
      additionalProperties: true
      title: ClassificationField
      description: >-
        Categorize extracted data into predefined labels. Use this when you want
        the system to classify content into specific categories you define.
    TransformOutputField:
      type: object
      properties:
        name:
          type: string
          pattern: ^[a-zA-Z][a-zA-Z0-9_]*$
          description: Field name produced by a transformation step
        description:
          type: string
          minLength: 1
          description: Optional field description
        fieldType:
          type: string
          enum:
            - TRANSFORM_OUTPUT
        dataType:
          type: string
          description: Data type produced by the transformation step
        example:
          oneOf:
            - type: string
            - type: array
              items:
                type: string
        isKey:
          type: boolean
      required:
        - name
        - fieldType
        - dataType
      additionalProperties: true
      title: TransformOutputField
      description: >-
        Field appended to workflow.config.schema by a transformation step.
        Excluded from customer-input and schema-drift hashes.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key for authentication

````