openapi: 3.0.3
info:
  title: Contract Settings Admin API
  version: v1.0.0
  description: |
    Endpoints administrativos para centralizar configuracoes por contrato
    com grupos operacionais como financeiro, comunicacao e onboarding.
servers:
  - url: /adm/api
tags:
  - name: ContractSettings
    description: Configuracoes contratuais do TIIX

paths:
  /ContractSettings/catalog:
    post:
      tags: [ContractSettings]
      summary: Catalogo de grupos e campos
      responses:
        "200":
          description: OK

  /ContractSettings/get:
    post:
      tags: [ContractSettings]
      summary: Buscar configuracoes do contrato
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: [id_contrato]
              properties:
                id_contrato:
                  type: integer
                  example: 57
                group:
                  type: string
                  example: financeiro
      responses:
        "200":
          description: OK

  /ContractSettings/set:
    post:
      tags: [ContractSettings]
      summary: Salvar configuracoes de um grupo do contrato
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: [id_contrato, group]
              properties:
                id_contrato:
                  type: integer
                  example: 57
                group:
                  type: string
                  enum: [financeiro, comunicacao, onboarding]
                  example: financeiro
      responses:
        "200":
          description: Salvo
