File size: 644 Bytes
095b5f1
 
 
d8410b4
 
 
 
 
 
 
 
 
095b5f1
 
 
 
 
 
 
 
d8410b4
095b5f1
2213315
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import requests
import os


def enviar_resposta_final(
    doc_id: str,
    form_response_id: str,
    version: str,
    texto_completo: str,
    error: bool = False,
    titulo_do_documento: str = "Erro ao gerar documento",
):
    url = f"https://vella.app.br/version-{version}/api/1.1/wf/texto_completo"
    headers = {"Authorization": f"Bearer {os.environ.get("BUBBLE_TOKEN")}"}

    body = {
        "doc_id": doc_id,
        "form_response_id": form_response_id,
        "texto_completo": texto_completo,
        "erro": error,
        "titulo_do_documento": titulo_do_documento,
    }
    return requests.post(url, body, headers=headers)