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

# CNDJ Ruling

> Retrieve one disciplinary ruling by its record key (numero unico + numero ficha), including the editorial fields (titulación, descriptores, fuentes normativas, salvamentos y aclaraciones), the URL of the full ruling PDF, and the extracted full text when the document carries a text layer.



## OpenAPI

````yaml /api-reference/openapi.json post /co/cndj/ruling/v1
openapi: 3.1.0
info:
  title: Croma Marketplace API
  version: 1.0.0
  description: >-
    Government-data APIs for Colombia, Peru, Mexico, and global web search.
    Croma normalizes public-sector data into structured JSON for product teams
    and AI agents.
servers:
  - url: https://api.croma.run
security: []
paths:
  /co/cndj/ruling/v1:
    post:
      tags:
        - Colombia
        - Relatoría de la CNDJ
      summary: CNDJ Ruling
      description: >-
        Retrieve one disciplinary ruling by its record key (numero unico +
        numero ficha), including the editorial fields (titulación, descriptores,
        fuentes normativas, salvamentos y aclaraciones), the URL of the full
        ruling PDF, and the extracted full text when the document carries a text
        layer.
      operationId: cndj_ruling
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - registration_number
                - ficha_number
              properties:
                registration_number:
                  type: string
                  pattern: ^\d{23}$
                  description: >-
                    Numero unico de la radicación (`numero_unico` de la
                    búsqueda).
                ficha_number:
                  type: integer
                  minimum: 1
                  description: >-
                    Número de ficha de la radicación (`numero_ficha` de la
                    búsqueda).
              additionalProperties: false
            example:
              registration_number: '44001250200020250084801'
              ficha_number: 1
      responses:
        '200':
          description: Successful response
          headers:
            X-Request-Id:
              description: >-
                Unique id for the request (req_…). Include it in support
                reports.
              schema:
                type: string
            X-RateLimit-Limit:
              description: Requests allowed in the current window.
              schema:
                type: integer
            X-RateLimit-Remaining:
              description: Requests left before you are throttled.
              schema:
                type: integer
            X-RateLimit-Reset:
              description: ISO 8601 timestamp when the window resets.
              schema:
                type: string
                format: date-time
            X-Cache:
              description: HIT or MISS. Cached hits still count against your quota.
              schema:
                type: string
                enum:
                  - HIT
                  - MISS
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CndjRulingResponse'
        '400':
          description: Invalid request body
          headers:
            X-Request-Id:
              description: >-
                Unique id for the request (req_…). Include it in support
                reports.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '401':
          description: Missing or invalid API key
          headers:
            X-Request-Id:
              description: >-
                Unique id for the request (req_…). Include it in support
                reports.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '429':
          description: Rate limit exceeded
          headers:
            X-Request-Id:
              description: >-
                Unique id for the request (req_…). Include it in support
                reports.
              schema:
                type: string
            X-RateLimit-Limit:
              description: Requests allowed in the current window.
              schema:
                type: integer
            X-RateLimit-Remaining:
              description: Requests left before you are throttled.
              schema:
                type: integer
            X-RateLimit-Reset:
              description: ISO 8601 timestamp when the window resets.
              schema:
                type: string
                format: date-time
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '500':
          description: Internal error
          headers:
            X-Request-Id:
              description: >-
                Unique id for the request (req_…). Include it in support
                reports.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '502':
          description: Upstream source returned an error
          headers:
            X-Request-Id:
              description: >-
                Unique id for the request (req_…). Include it in support
                reports.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      security:
        - bearerAuth: []
      externalDocs:
        description: Interactive documentation and examples
        url: https://docs.usecroma.com/guides/colombia/cndj
components:
  schemas:
    CndjRulingResponse:
      type: object
      required:
        - data
      properties:
        data:
          type: object
          required:
            - found
            - numero_unico
            - numero_ficha
            - ruling
          properties:
            found:
              type: boolean
            numero_unico:
              type: string
            numero_ficha:
              type: integer
            ruling:
              oneOf:
                - $ref: '#/components/schemas/CndjRuling'
                - type: 'null'
    ApiError:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - type
            - code
            - message
          properties:
            type:
              type: string
              description: >-
                Broad category: invalid_request_error, authentication_error,
                not_found_error, rate_limit_error, upstream_error, api_error.
            code:
              type: string
              description: Machine-readable specific code.
            message:
              type: string
              description: Human-readable explanation, safe to surface in UI.
            param:
              type: string
              description: Field that triggered the error. Present on validation errors.
            details:
              type: object
              description: Free-form structured detail.
    CndjRuling:
      type: object
      required:
        - numero_unico
        - numero_ficha
        - titulacion
        - notas_relatorias
        - descriptores
        - fuentes_normativas
        - salvamento_aclaraciones
        - pdf_url
        - texto
      properties:
        numero_unico:
          type: string
        numero_ficha:
          type: integer
        titulacion:
          type:
            - string
            - 'null'
        notas_relatorias:
          type:
            - string
            - 'null'
        descriptores:
          type:
            - string
            - 'null'
        fuentes_normativas:
          type:
            - string
            - 'null'
        salvamento_aclaraciones:
          type:
            - string
            - 'null'
        pdf_url:
          type: string
          format: uri
          description: URL pública del PDF de la providencia.
        texto:
          type:
            - string
            - 'null'
          description: >-
            Texto completo extraído del PDF; null cuando el documento no tiene
            capa de texto.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Use Authorization: Bearer YOUR_API_KEY'

````