{"openapi":"3.0.3","info":{"title":"API de Contribuições e Enquadramento","version":"1.0.0","description":"API para solicitar enquadramento, listar contribuições e emitir nova contribuição."},"servers":[{"description":"SwaggerHub API Auto Mocking","url":"https://virtserver.swaggerhub.com/personal-0a4/Gestao/1.0.0"},{"url":"https://api.seudominio.com.br","description":"Produção"},{"url":"http://localhost:8000","description":"Local"}],"paths":{"/enquadramento":{"post":{"summary":"Solicitar enquadramento","tags":["Enquadramento"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SolicitarEnquadramentoRequest"},"example":{"atividade_principal_da_empresa":"Comércio Varejista","cnae_principal":"4711-3/01","numero_funcionarios":15,"endereco_completo_da_atividade":"Rua Piaui, 345, Vila São João, Rio Grande Da Serra - SP","observacoes_adicionais":"Informação X, Y e Z"}}}},"responses":{"200":{"description":"Solicitação processada com sucesso","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SolicitarEnquadramentoResponse"},"example":{"sucesso_solicitacao_enquadramento":true,"code":200}}}}}}},"/contribuicoes":{"get":{"summary":"Listar contribuições","tags":["Contribuições"],"responses":{"200":{"description":"Listagem de contribuições retornada com sucesso","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListagemContribuicoesResponse"},"example":{"qtd_contribuicoes_pagas":3,"qtd_contribuicoes_pendentes":2,"qtd_contribuicoes_vencidas":1,"contribuicoes":[{"numero_contribuicao":"2026040001","competencia":"Fevereiro/2026","vencimento":"19/03/2026","valor":620.0,"status":"paga"},{"numero_contribuicao":"2026040002","competencia":"Março/2026","vencimento":"01/04/2026","valor":230.0,"status":"pendente"}]}}}}}},"post":{"summary":"Emitir nova contribuição","tags":["Contribuições"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmitirNovaContribuicaoRequest"},"example":{"tipo_contribuicao":"Contribuição X","competencia":"03/26","vencimento":"01/04/2026","possui_empregados":true}}}},"responses":{"200":{"description":"Nova contribuição emitida com sucesso","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmitirNovaContribuicaoResponse"},"example":{"tipo_contribuicao":"Contribuição X","competencia":"03/26","vencimento":"01/04/2026","faixa":"Filial sem capital social destacado","valor_total":220.0}}}}}}}},"components":{"schemas":{"SolicitarEnquadramentoRequest":{"type":"object","required":["atividade_principal_da_empresa","cnae_principal","numero_funcionarios","endereco_completo_da_atividade"],"properties":{"atividade_principal_da_empresa":{"type":"string","example":"Comércio Varejista"},"cnae_principal":{"type":"string","example":"4711-3/01"},"numero_funcionarios":{"type":"integer","example":15},"endereco_completo_da_atividade":{"type":"string","example":"Rua Piaui, 345, Vila São João, Rio Grande Da Serra - SP"},"observacoes_adicionais":{"type":"string","nullable":true,"example":"Informação X, Y e Z"}}},"SolicitarEnquadramentoResponse":{"type":"object","properties":{"sucesso_solicitacao_enquadramento":{"type":"boolean","example":true},"code":{"type":"integer","example":200}}},"Contribuicao":{"type":"object","properties":{"numero_contribuicao":{"type":"string","example":"2026040001"},"competencia":{"type":"string","example":"Fevereiro/2026"},"vencimento":{"type":"string","example":"19/03/2026"},"valor":{"type":"number","format":"float","example":620.0},"status":{"type":"string","enum":["paga","pendente","vencida"],"example":"paga"}}},"ListagemContribuicoesResponse":{"type":"object","properties":{"qtd_contribuicoes_pagas":{"type":"integer","example":3},"qtd_contribuicoes_pendentes":{"type":"integer","example":2},"qtd_contribuicoes_vencidas":{"type":"integer","example":1},"contribuicoes":{"type":"array","items":{"$ref":"#/components/schemas/Contribuicao"}}}},"EmitirNovaContribuicaoRequest":{"type":"object","required":["tipo_contribuicao","competencia","vencimento","possui_empregados"],"properties":{"tipo_contribuicao":{"type":"string","example":"Contribuição X"},"competencia":{"type":"string","example":"03/26"},"vencimento":{"type":"string","example":"01/04/2026"},"possui_empregados":{"type":"boolean","example":true}}},"EmitirNovaContribuicaoResponse":{"type":"object","properties":{"tipo_contribuicao":{"type":"string","example":"Contribuição X"},"competencia":{"type":"string","example":"03/26"},"vencimento":{"type":"string","example":"01/04/2026"},"faixa":{"type":"string","example":"Filial sem capital social destacado"},"valor_total":{"type":"number","format":"float","example":220.0}}}}}}