openapi: 3.0.3
info:
  title: Plataforma de Educação e Certificação - Reports
  version: 2025-11-12
  description: |-
    Documentação das APIs de consultas entre schemas `reports`
servers:
  - url: https://certificacao-integration.anbima.com.br/v1
    description: PRD
security:
  - clientId: []
    accessToken: []
paths:
  /profissionais-certificados:
    post:
      tags:
        - Teste
      summary: Busca profissionais certificados por CPF
      operationId: buscaProfissionaisCertificados
      parameters:
        - name: client_id
          description: Identificação (client_id) do consumidor da API que representa determinado grupo econômico
          in: header
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CpfList'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProfissionalCertificadoList'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  securitySchemes:
    clientId:
      type: apiKey
      in: header
      name: client_id
    accessToken:
      type: apiKey
      in: header
      name: access_token
  schemas:
    CpfList:
      type: array
      minItems: 1
      maxItems: 100
      items:
        type: string
        minLength: 11
        maxLength: 11
        example: '99999999900'
    TipoGestor:
      type: object
      properties:
        id:
          type: integer
          example: 55
        descricao:
          type: string
          example: 'Gestor de exemplo'
    AtividadeProfissional:
      type: object
      properties:
        id:
          type: integer
          example: 99
        descricao:
          type: string
          example: 'Atividade profissional de exemplo'
    Instituicao:
      type: object
      properties:
        cnpj:
          type: string
          minLength: 14
          maxLength: 14
          example: '88777666000155'
        razao_social:
          type: string
          example: 'Banco Nova Era S.A.'
    Certificacao:
      type: object
      properties:
        certificacao:
          type: string
          example: 'CPA'
        data_primeira_certificacao:
          type: string
          format: date
        data_ultima_atualizacao:
          type: string
          format: date
        como_obteve_certificacao_atual:
          type: string
          example: 'Exame de certificação'
        data_vencimento:
          type: string
          format: date
        situacao:
          type: string
          enum:
            - ATIVA
            - EM_TRANSICAO
            - VENCIDA
            - INATIVA
            - CASSADA
    ProfissionalCertificado:
      type: object
      properties:
        cpf:
          type: string
          minLength: 11
          maxLength: 11
          example: '33333333300'
        status:
          type: string
          enum:
            - VINCULADO
            - MERCADO
            - SEM_VINCULO
            - NAO_ENCONTRADO
        nome_completo:
          type: string
          example: 'Alberto Frederico Alves da Costa Ferraz'
        nome_social:
          type: string
          example: 'Frederico Ferraz'
        data_nascimento:
          type: string
          format: date
        instituicao_vinculada:
          $ref: '#/components/schemas/Instituicao'
        situacao_vinculo:
          type: string
          enum:
            - ATIVO
            - EM_LICENCA
        atividades:
          type: array
          items:
            $ref: '#/components/schemas/AtividadeProfissional'
        tipo_gestor:
          $ref: '#/components/schemas/TipoGestor'
        telefone_comercial:
          type: string
          example: '11995551122'
        data_ultima_posicao_funcional:
          type: string
          format: date
        certificacoes:
          type: array
          items:
            $ref: '#/components/schemas/Certificacao'
    ProfissionalCertificadoList:
      type: array
      items:
        $ref: '#/components/schemas/ProfissionalCertificado'
    ErrorResponse:
      type: object
      properties:
        message:
          type: string
          example: 'Campos inválidos'
        timestamp:
          type: string
          format: date-time
          example: '2025-06-26T11:48:35.9965904'
        errors:
          type: array
          items:
            $ref: '#/components/schemas/FieldErrorMessage'
    FieldErrorMessage:
      type: object
      properties:
        field:
          type: string
          example: 'cnpj'
        message:
          type: string
          example: 'tamanho deve ser entre 14 e 14'
    Page:
      type: object
      properties:
        page:
          type: integer
        size:
          type: integer
        total_elements:
          type: integer
    TesteBase:
      type: object
      properties:
        campo:
          type: string
          minLength: 14
          maxLength: 14
          example: '00222555000199'
        campo2:
          type: string
          example: 'Banco Nova Era S.A.'
    TesteList:
      allOf:
        - $ref: '#/components/schemas/Page'
        - type: object
          properties:
            content:
              type: array
              items:
                $ref: '#/components/schemas/TesteBase'