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

# Get the violation status of a contract by id

> Get the violation status of a contract by id



## OpenAPI

````yaml /api-reference/bundled.yaml get /v0/contract/{id}/violation-status
openapi: 3.1.0
info:
  title: Gable API
  description: >
    API to interact with the Gable platform

    ## Authorization

    All API requests require an API key to be passed in the `X-API-KEY` header.
    For instructions on finding your API key and api endpoint check out the [API
    Key documentation](../docs/api-keys.md).

    Example: `curl -H "X-API-KEY: <your-api-key>"
    https://api-{organization}.gable.ai/v0/ping`
  contact:
    name: Gable Engineering
    url: https://gable.ai
    email: engineers@gable.ai
  version: 1.28.0
servers:
  - url: https://{hostname}.gable.ai
    description: Gable API
    variables:
      hostname:
        default: demo-api
        description: Customer environment assigned by Gable
security:
  - ApiKeyAuth: []
tags:
  - name: action
  - name: api-keys
  - name: auth
  - name: changelog
  - name: config
  - name: contract
  - name: data-asset
  - name: debug
  - name: s3
  - name: settings
  - name: slack
  - name: sso
  - name: webhook
  - name: notifications
  - name: constraints
  - name: telemetry
  - name: component
  - name: components
  - name: sca
  - name: cross-service-components
  - name: lineage
  - name: events
  - name: measurements
  - name: defect-report
  - name: experimental
paths:
  /v0/contract/{id}/violation-status:
    get:
      tags:
        - contract
      summary: Get the violation status of a contract by id
      description: Get the violation status of a contract by id
      operationId: getContractViolationStatus
      parameters:
        - in: path
          name: id
          schema:
            type: string
            format: uuid
          required: true
          description: UUID of the contract
      responses:
        '200':
          description: Contract
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetContractViolationStatusResponse'
        '404':
          description: Contract not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    GetContractViolationStatusResponse:
      oneOf:
        - $ref: '#/components/schemas/ContractViolationCheckedResponse'
        - $ref: '#/components/schemas/ContractViolationUncheckedResponse'
      discriminator:
        propertyName: violation_state
        mapping:
          violation:
            $ref: '#/components/schemas/ContractViolationCheckedResponse'
          no_violation:
            $ref: '#/components/schemas/ContractViolationCheckedResponse'
          unchecked:
            $ref: '#/components/schemas/ContractViolationUncheckedResponse'
    ErrorResponse:
      type: object
      required:
        - message
      properties:
        id:
          type: number
        title:
          type: string
        message:
          type: string
    ContractViolationCheckedResponse:
      type: object
      required:
        - violation_state
      properties:
        violation_state:
          type: string
          enum:
            - violation
            - no_violation
        violations:
          type: array
          items:
            type: object
            required:
              - message
              - field
              - fieldType
              - violationType
              - expected
            properties:
              message:
                type: string
              field:
                type: string
              fieldType:
                type: string
              violationType:
                $ref: '#/components/schemas/ContractViolationType'
              expected:
                type: string
              actual:
                type: string
        checkedAt:
          type: string
          format: date-time
          description: The datetime the violation check was performed
    ContractViolationUncheckedResponse:
      type: object
      required:
        - violation_state
      properties:
        violation_state:
          type: string
          enum:
            - unchecked
    ContractViolationType:
      type: string
      enum:
        - MISSING_REQUIRED_PROPERTY
        - INCOMPATIBLE_TYPE
        - GREATER_THAN
        - GREATER_THAN_OR_EQUAL_TO
        - LESS_THAN
        - LESS_THAN_OR_EQUAL_TO
        - IS_NULL
        - IS_NULL_THRESHOLD
        - IS_NOT_EMPTY
        - LENGTH
        - LENGTH_GREATER_THAN
        - LENGTH_GREATER_THAN_OR_EQUAL_TO
        - LENGTH_LESS_THAN
        - LENGTH_LESS_THAN_OR_EQUAL_TO
        - MISSING_DATA_ASSET
        - PII_DETECTED
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````