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

# Retorna detalhes de uma tarefa

> [!NOTE]
>
> **🚀 API v2 (Recomendada)** - Este endpoint está disponível apenas na v2


## OpenAPI

````yaml openapi/openapi-v2.json GET /task-plans/{taskPlanId}
openapi: 3.0.0
info:
  title: Documentação de API
  version: '2.0'
servers:
  - url: https://backend-pied-prod.piedadmin.com.br/api/v2
security:
  - bearerAuth: []
tags:
  - name: Request
    description: Tudo sobre orçamentos ou pedidos
  - name: Equipment
    description: Tudo sobre equipamentos
  - name: Company
    description: Tudo sobre empresas de energia
  - name: Custom Field
    description: Tudo sobre campos customizados
  - name: Payments
    description: Tudo sobre pagamentos
  - name: Task Plan
    description: Tudo sobre tarefas (task plans)
  - name: Comments
    description: Tudo sobre comentários vinculados a entidades do workspace
paths:
  /task-plans/{taskPlanId}:
    get:
      tags:
        - Task Plan
      summary: Retorna detalhes de uma tarefa
      parameters:
        - $ref: '#/components/parameters/taskPlanId'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/taskPlanDetailResponse'
        '401':
          description: Esta funcionalidade está indisponível no momento
        '404':
          description: Tarefa não encontrada ou não pertence ao distribuidor
        '429':
          $ref: '#/components/schemas/429'
        '500':
          $ref: '#/components/schemas/500'
      security:
        - bearerAuth: []
components:
  parameters:
    taskPlanId:
      name: taskPlanId
      in: path
      required: true
      description: ID da tarefa (task plan)
      schema:
        type: string
  schemas:
    '429':
      description: >-
        hardLimit: O limite de requisições por hora foi ultrapassado. Tente
        novamente mais tarde / timeLimit: O limite de 1 minuto de processamento
        de requisição por hora foi atingido. Tente novamente mais tarde
    '500':
      description: Erro na API
    taskPlanDetailResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
        data:
          $ref: '#/components/schemas/taskPlan_v2'
    taskPlan_v2:
      type: object
      properties:
        id:
          type: string
          example: 507f1f77bcf86cd799439013
        parentId:
          type: string
          example: 507f1f77bcf86cd799439014
        parentType:
          type: string
          enum:
            - distributor
            - request
            - company
            - rehearse
            - call
          example: request
        status:
          $ref: '#/components/schemas/taskPlanStatus'
        expireDate:
          type: string
          format: date-time
          example: '2026-09-15T18:00:00.000Z'
        priority:
          type: integer
          enum:
            - 1
            - 2
            - 3
          description: 1 = alta, 2 = média, 3 = baixa
          example: 2
        title:
          type: string
          example: Retornar contato com cliente
        description:
          type: string
          example: Ligar para confirmar proposta enviada
        responsible:
          $ref: '#/components/schemas/taskPlanUser'
        owner:
          $ref: '#/components/schemas/taskPlanUser'
        meta:
          type: object
          example:
            color: '#FF5733'
        request:
          type: object
          description: Preenchido quando parentType = request
        company:
          type: object
          description: Preenchido quando parentType = company
        distributor:
          type: object
          description: Preenchido quando parentType = distributor
        recurrence:
          type: object
          properties:
            enabled:
              type: boolean
              example: false
            start:
              type: string
              format: date-time
            end:
              type: string
              format: date-time
            repetition:
              type: object
              properties:
                times:
                  type: integer
                  example: 1
                period:
                  type: string
                  enum:
                    - day
                    - week
                    - month
                    - quarter
                    - semester
                    - year
                  example: week
        createdAt:
          type: string
          format: date-time
          example: '2026-08-24T14:30:00.000Z'
        updatedAt:
          type: string
          format: date-time
          example: '2026-08-31T10:00:00.000Z'
        removed:
          type: boolean
          example: false
    taskPlanStatus:
      type: object
      properties:
        id:
          type: string
          example: 507f1f77bcf86cd799439012
        name:
          type: string
          example: A fazer
        meta:
          type: object
    taskPlanUser:
      type: object
      properties:
        id:
          type: string
          example: 507f1f77bcf86cd799439011
        name:
          type: string
          example: João
        surname:
          type: string
          example: Silva
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.