{
  "openapi": "3.0.4",
  "info": {
    "title": "Carga int_producao",
    "description": "API carga de producao (int_producao) — add / add_lote / cancel / balancete_diario / GET mes_referencia_atual",
    "version": "api_int_producao"
  },
  "servers": [
    {
      "url": "/dotnet_bke"
    }
  ],
  "paths": {
    "/api_int_producao/mes_referencia_atual": {
      "get": {
        "tags": [
          "API_int_producao"
        ],
        "summary": "Mes de referencia atual (cproc_config FECHAMENTO_MENSAL_MES_ABERTO)",
        "parameters": [
          {
            "name": "grupo_uso",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              },
              "application/json": {
                "schema": {
                  "type": "string"
                }
              },
              "text/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/api_int_producao/add": {
      "post": {
        "tags": [
          "API_int_producao"
        ],
        "summary": "Inclusao int_producao (num_proposta unico)",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/dotnet_bke.model_engine.TIntProducaoIn"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/dotnet_bke.model_engine.TIntProducaoIn"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              },
              "application/json": {
                "schema": {
                  "type": "string"
                }
              },
              "text/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/api_int_producao/add_lote": {
      "post": {
        "tags": [
          "API_int_producao"
        ],
        "summary": "Carga em lote pos-fechamento (cabecalho + array propostas)",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/dotnet_bke.model_engine.TIntProducaoAddLoteIn"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/dotnet_bke.model_engine.TIntProducaoAddLoteIn"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              },
              "application/json": {
                "schema": {
                  "type": "string"
                }
              },
              "text/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/api_int_producao/balancete_diario": {
      "post": {
        "tags": [
          "API_int_producao"
        ],
        "summary": "Balancete da carga REST do dia (INT_PRODUCAO_AAAA_MM_DD)",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/dotnet_bke.model_engine.TIntProducaoBalanceteDiarioIn"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/dotnet_bke.model_engine.TIntProducaoBalanceteDiarioIn"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              },
              "application/json": {
                "schema": {
                  "type": "string"
                }
              },
              "text/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/api_int_producao/cancel/{idproposta}": {
      "post": {
        "tags": [
          "API_int_producao"
        ],
        "summary": "Cancelamento da carga int_producao (idproposta = num_proposta na rota + observacao no body)",
        "parameters": [
          {
            "name": "idproposta",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/dotnet_bke.model_engine.TIntProducaoCancelIn"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/dotnet_bke.model_engine.TIntProducaoCancelIn"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              },
              "application/json": {
                "schema": {
                  "type": "string"
                }
              },
              "text/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/global_bridge/bke_post_aut": {
      "post": {
        "tags": [
          "GlobalBridge"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/globalBridge/bke_post_aut": {
      "post": {
        "tags": [
          "GlobalBridge"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/global_bridge/bke_post_formdata_aut": {
      "post": {
        "tags": [
          "GlobalBridge"
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "formData": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/System.Collections.Generic.KeyValuePair`2[[System.String, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[Microsoft.Extensions.Primitives.StringValues, Microsoft.Extensions.Primitives, Version=10.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]]"
                    }
                  }
                }
              },
              "encoding": {
                "formData": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/globalBridge/bke_post_formdata_aut": {
      "post": {
        "tags": [
          "GlobalBridge"
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "formData": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/System.Collections.Generic.KeyValuePair`2[[System.String, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[Microsoft.Extensions.Primitives.StringValues, Microsoft.Extensions.Primitives, Version=10.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]]"
                    }
                  }
                }
              },
              "encoding": {
                "formData": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/global_bridge/bke_post_formdata": {
      "post": {
        "tags": [
          "GlobalBridge"
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "formData": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/System.Collections.Generic.KeyValuePair`2[[System.String, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[Microsoft.Extensions.Primitives.StringValues, Microsoft.Extensions.Primitives, Version=10.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]]"
                    }
                  }
                }
              },
              "encoding": {
                "formData": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/globalBridge/bke_post_formdata": {
      "post": {
        "tags": [
          "GlobalBridge"
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "formData": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/System.Collections.Generic.KeyValuePair`2[[System.String, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[Microsoft.Extensions.Primitives.StringValues, Microsoft.Extensions.Primitives, Version=10.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]]"
                    }
                  }
                }
              },
              "encoding": {
                "formData": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/global_bridge/bke_post": {
      "post": {
        "tags": [
          "GlobalBridge"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/globalBridge/bke_post": {
      "post": {
        "tags": [
          "GlobalBridge"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/global_bridge/conveniada_layout_importacao": {
      "post": {
        "tags": [
          "GlobalBridge"
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "required": [
                  "arquivoExcel"
                ],
                "type": "object",
                "properties": {
                  "arquivoExcel": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              },
              "encoding": {
                "arquivoExcel": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "System.Collections.Generic.KeyValuePair`2[[System.String, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[Microsoft.Extensions.Primitives.StringValues, Microsoft.Extensions.Primitives, Version=10.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]]": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "nullable": true
          },
          "value": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "additionalProperties": false
      },
      "dotnet_bke.model_engine.TIntProducaoAddLoteIn": {
        "allOf": [
          {
            "$ref": "#/components/schemas/dotnet_bke.model_engine.TIntProducaoGrupoIn"
          },
          {
            "type": "object",
            "properties": {
              "mes_referencia": {
                "type": "string",
                "nullable": true
              },
              "dt_interface": {
                "type": "string",
                "nullable": true
              },
              "lote_producao": {
                "type": "string",
                "nullable": true
              },
              "propostas": {
                "type": "array",
                "items": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/dotnet_bke.model_engine.TIntProducaoPropostaItemIn"
                    },
                    {
                      "$ref": "#/components/schemas/dotnet_bke.model_engine.TIntProducaoIn"
                    }
                  ],
                  "description": "Item de proposta no add_lote — mesmos campos do add, sem cabecalho"
                },
                "nullable": true
              }
            },
            "additionalProperties": false
          }
        ],
        "description": "Carga em lote pos-fechamento — cabecalho + array propostas"
      },
      "dotnet_bke.model_engine.TIntProducaoBalanceteDiarioIn": {
        "allOf": [
          {
            "$ref": "#/components/schemas/dotnet_bke.model_engine.TIntProducaoGrupoIn"
          },
          {
            "type": "object",
            "properties": {
              "dt_carga": {
                "type": "string",
                "nullable": true
              }
            },
            "additionalProperties": false
          }
        ],
        "description": "Balancete da carga REST do dia (lote_producao = INT_PRODUCAO_AAAA_MM_DD ou TESTE_AAAA_MM_DD)"
      },
      "dotnet_bke.model_engine.TIntProducaoCancelIn": {
        "type": "object",
        "properties": {
          "observacao": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Cancelamento — body JSON somente observacao; idproposta na rota = num_proposta"
      },
      "dotnet_bke.model_engine.TIntProducaoGrupoIn": {
        "type": "object",
        "properties": {
          "grupo_uso": {
            "type": "string",
            "nullable": true
          },
          "carga_teste": {
            "type": "boolean",
            "description": "true = lote TESTE_AAAA_MM_DD (carga de teste, separada da producao)",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Grupo de uso (cproc_config) — obrigatorio"
      },
      "dotnet_bke.model_engine.TIntProducaoIn": {
        "allOf": [
          {
            "$ref": "#/components/schemas/dotnet_bke.model_engine.TIntProducaoPropostaItemIn"
          },
          {
            "type": "object",
            "properties": {
              "grupo_uso": {
                "type": "string",
                "nullable": true
              },
              "carga_teste": {
                "type": "boolean",
                "nullable": true
              },
              "dt_interface": {
                "type": "string",
                "nullable": true
              },
              "mes_referencia": {
                "type": "string",
                "nullable": true
              }
            },
            "additionalProperties": false
          }
        ],
        "description": "Payload int_producao — campos alinhados ao DDL SRO v3"
      },
      "dotnet_bke.model_engine.TIntProducaoKey": {
        "type": "object",
        "properties": {
          "cpf": {
            "type": "string",
            "nullable": true
          },
          "num_proposta": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "dotnet_bke.model_engine.TIntProducaoPropostaItemIn": {
        "allOf": [
          {
            "$ref": "#/components/schemas/dotnet_bke.model_engine.TIntProducaoKey"
          },
          {
            "type": "object",
            "properties": {
              "dt_proposta": {
                "type": "string",
                "nullable": true
              },
              "nome": {
                "type": "string",
                "nullable": true
              },
              "dt_nasc": {
                "type": "string",
                "nullable": true
              },
              "rg": {
                "type": "string",
                "nullable": true
              },
              "rg_dt": {
                "type": "string",
                "nullable": true
              },
              "rg_org": {
                "type": "string",
                "nullable": true
              },
              "endereco": {
                "type": "string",
                "nullable": true
              },
              "bairro": {
                "type": "string",
                "nullable": true
              },
              "telefone": {
                "type": "string",
                "nullable": true
              },
              "cidade": {
                "type": "string",
                "nullable": true
              },
              "estado": {
                "type": "string",
                "nullable": true
              },
              "cep": {
                "type": "string",
                "nullable": true
              },
              "sexo": {
                "type": "string",
                "nullable": true
              },
              "estado_civil": {
                "type": "string",
                "nullable": true
              },
              "profissao": {
                "type": "string",
                "nullable": true
              },
              "email": {
                "type": "string",
                "nullable": true
              },
              "matricula": {
                "type": "string",
                "nullable": true
              },
              "matinstituidor": {
                "type": "string",
                "nullable": true
              },
              "tipo_averbacao": {
                "type": "string",
                "nullable": true
              },
              "codorgao": {
                "type": "string",
                "nullable": true
              },
              "nomeorgao": {
                "type": "string",
                "nullable": true
              },
              "codupag": {
                "type": "string",
                "nullable": true
              },
              "nomeupag": {
                "type": "string",
                "nullable": true
              },
              "uf_upag": {
                "type": "string",
                "nullable": true
              },
              "cod_produtor": {
                "type": "string",
                "nullable": true
              }
            },
            "additionalProperties": false
          }
        ],
        "description": "Item de proposta no add_lote — mesmos campos do add, sem cabecalho"
      }
    },
    "securitySchemes": {
      "Bearer": {
        "type": "apiKey",
        "description": "Enter 'Bearer' [space] and then your valid token in the text input below.\r\n\r\nExample: \"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9\"",
        "name": "Authorization",
        "in": "header"
      }
    }
  },
  "security": [
    {
      "Bearer": [ ]
    }
  ],
  "tags": [
    {
      "name": "API_int_producao",
      "description": "API carga int_producao (add / add_lote / cancel / balancete_diario / mes_referencia_atual)"
    }
  ]
}