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

# Get protocol by ID with full details

> Returns the protocol with all related data in a single response: forms (ordered by version), each form's questions (ordered by position) with options (ordered by position), and score ranges (ordered by minScore). Loaded in one query to avoid N+1.



## OpenAPI

````yaml /openapi.json get /protocols/{id}
openapi: 3.0.1
info:
  title: NextMed's Admin Service
  description: Documentation Admin Service v1.0.0
  contact:
    name: NextMed
    email: medchatbr@gmail.com
  version: 1.0.0
servers:
  - url: http://localhost:8081
    description: Admin Service (local)
  - url: http://localhost:8080/admin-service
    description: Local API (gateway)
security: []
tags:
  - name: User Controller
    description: Endpoints to handle users
  - name: Profile Controller
    description: Endpoints to handle user's profiles
  - name: Institution Controller
    description: Endpoints to handle institutions
  - name: Unity Controller
    description: Endpoints to handle institution's unities
  - name: Specialty Controller
    description: Endpoints to handle the available specialties
  - name: Protocol Controller
    description: >-
      Endpoints to manage clinical protocols (Admin): CRUD protocol, forms,
      questions, options, score ranges
paths:
  /protocols/{id}:
    get:
      tags:
        - Protocol Controller
      summary: Get protocol by ID with full details
      description: >-
        Returns the protocol with all related data in a single response: forms
        (ordered by version), each form's questions (ordered by position) with
        options (ordered by position), and score ranges (ordered by minScore).
        Loaded in one query to avoid N+1.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Protocol with forms, questions, options and scoreRanges
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Protocol'
        '404':
          description: Protocol not found
components:
  schemas:
    Protocol:
      type: object
      properties:
        id:
          type: string
          format: uuid
        institutionId:
          type: string
          format: uuid
        name:
          type: string
        prompt:
          type: string
          nullable: true
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time

````