curl --request POST \
--url https://api.olie.ai/api/management/dynamic-forms/get-form-answers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"father_class": "<string>",
"father_id": "<uuid>",
"pivot_class": "<string>",
"form_id": "<integer>",
"related_model_attribute_id": "<uuid>",
"id": "<string>",
"project_funnel_id": "<integer>",
"project_id": "<uuid>",
"funnel_step_id": "<integer>"
}
'import requests
url = "https://api.olie.ai/api/management/dynamic-forms/get-form-answers"
payload = {
"father_class": "<string>",
"father_id": "<uuid>",
"pivot_class": "<string>",
"form_id": "<integer>",
"related_model_attribute_id": "<uuid>",
"id": "<string>",
"project_funnel_id": "<integer>",
"project_id": "<uuid>",
"funnel_step_id": "<integer>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
father_class: '<string>',
father_id: '<uuid>',
pivot_class: '<string>',
form_id: '<integer>',
related_model_attribute_id: '<uuid>',
id: '<string>',
project_funnel_id: '<integer>',
project_id: '<uuid>',
funnel_step_id: '<integer>'
})
};
fetch('https://api.olie.ai/api/management/dynamic-forms/get-form-answers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.olie.ai/api/management/dynamic-forms/get-form-answers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'father_class' => '<string>',
'father_id' => '<uuid>',
'pivot_class' => '<string>',
'form_id' => '<integer>',
'related_model_attribute_id' => '<uuid>',
'id' => '<string>',
'project_funnel_id' => '<integer>',
'project_id' => '<uuid>',
'funnel_step_id' => '<integer>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.olie.ai/api/management/dynamic-forms/get-form-answers"
payload := strings.NewReader("{\n \"father_class\": \"<string>\",\n \"father_id\": \"<uuid>\",\n \"pivot_class\": \"<string>\",\n \"form_id\": \"<integer>\",\n \"related_model_attribute_id\": \"<uuid>\",\n \"id\": \"<string>\",\n \"project_funnel_id\": \"<integer>\",\n \"project_id\": \"<uuid>\",\n \"funnel_step_id\": \"<integer>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.olie.ai/api/management/dynamic-forms/get-form-answers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"father_class\": \"<string>\",\n \"father_id\": \"<uuid>\",\n \"pivot_class\": \"<string>\",\n \"form_id\": \"<integer>\",\n \"related_model_attribute_id\": \"<uuid>\",\n \"id\": \"<string>\",\n \"project_funnel_id\": \"<integer>\",\n \"project_id\": \"<uuid>\",\n \"funnel_step_id\": \"<integer>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.olie.ai/api/management/dynamic-forms/get-form-answers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"father_class\": \"<string>\",\n \"father_id\": \"<uuid>\",\n \"pivot_class\": \"<string>\",\n \"form_id\": \"<integer>\",\n \"related_model_attribute_id\": \"<uuid>\",\n \"id\": \"<string>\",\n \"project_funnel_id\": \"<integer>\",\n \"project_id\": \"<uuid>\",\n \"funnel_step_id\": \"<integer>\"\n}"
response = http.request(request)
puts response.read_body{
"response": "<boolean>",
"answers": [
{
"id": "<integer>",
"label": "<string>",
"answer": "<string>",
"model": "<string>",
"answered_by": "<uuid>",
"updated_at": "<dateTime>"
},
{
"id": "<integer>",
"label": "<string>",
"answer": "<string>",
"model": "<string>",
"answered_by": "<uuid>",
"updated_at": "<dateTime>"
}
],
"last_updated_at": "<dateTime>"
}{
"response": "<boolean>",
"message": "<string>",
"error": "<string>"
}{
"response": "<boolean>",
"message": "<string>",
"error": "<string>",
"validation": {}
}Consultar respostas de formulário dinâmico
Recebe informações de vínculo entre um modelo e um formulário dinâmico, e retorna as respostas previamente salvas para esse formulário.
curl --request POST \
--url https://api.olie.ai/api/management/dynamic-forms/get-form-answers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"father_class": "<string>",
"father_id": "<uuid>",
"pivot_class": "<string>",
"form_id": "<integer>",
"related_model_attribute_id": "<uuid>",
"id": "<string>",
"project_funnel_id": "<integer>",
"project_id": "<uuid>",
"funnel_step_id": "<integer>"
}
'import requests
url = "https://api.olie.ai/api/management/dynamic-forms/get-form-answers"
payload = {
"father_class": "<string>",
"father_id": "<uuid>",
"pivot_class": "<string>",
"form_id": "<integer>",
"related_model_attribute_id": "<uuid>",
"id": "<string>",
"project_funnel_id": "<integer>",
"project_id": "<uuid>",
"funnel_step_id": "<integer>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
father_class: '<string>',
father_id: '<uuid>',
pivot_class: '<string>',
form_id: '<integer>',
related_model_attribute_id: '<uuid>',
id: '<string>',
project_funnel_id: '<integer>',
project_id: '<uuid>',
funnel_step_id: '<integer>'
})
};
fetch('https://api.olie.ai/api/management/dynamic-forms/get-form-answers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.olie.ai/api/management/dynamic-forms/get-form-answers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'father_class' => '<string>',
'father_id' => '<uuid>',
'pivot_class' => '<string>',
'form_id' => '<integer>',
'related_model_attribute_id' => '<uuid>',
'id' => '<string>',
'project_funnel_id' => '<integer>',
'project_id' => '<uuid>',
'funnel_step_id' => '<integer>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.olie.ai/api/management/dynamic-forms/get-form-answers"
payload := strings.NewReader("{\n \"father_class\": \"<string>\",\n \"father_id\": \"<uuid>\",\n \"pivot_class\": \"<string>\",\n \"form_id\": \"<integer>\",\n \"related_model_attribute_id\": \"<uuid>\",\n \"id\": \"<string>\",\n \"project_funnel_id\": \"<integer>\",\n \"project_id\": \"<uuid>\",\n \"funnel_step_id\": \"<integer>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.olie.ai/api/management/dynamic-forms/get-form-answers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"father_class\": \"<string>\",\n \"father_id\": \"<uuid>\",\n \"pivot_class\": \"<string>\",\n \"form_id\": \"<integer>\",\n \"related_model_attribute_id\": \"<uuid>\",\n \"id\": \"<string>\",\n \"project_funnel_id\": \"<integer>\",\n \"project_id\": \"<uuid>\",\n \"funnel_step_id\": \"<integer>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.olie.ai/api/management/dynamic-forms/get-form-answers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"father_class\": \"<string>\",\n \"father_id\": \"<uuid>\",\n \"pivot_class\": \"<string>\",\n \"form_id\": \"<integer>\",\n \"related_model_attribute_id\": \"<uuid>\",\n \"id\": \"<string>\",\n \"project_funnel_id\": \"<integer>\",\n \"project_id\": \"<uuid>\",\n \"funnel_step_id\": \"<integer>\"\n}"
response = http.request(request)
puts response.read_body{
"response": "<boolean>",
"answers": [
{
"id": "<integer>",
"label": "<string>",
"answer": "<string>",
"model": "<string>",
"answered_by": "<uuid>",
"updated_at": "<dateTime>"
},
{
"id": "<integer>",
"label": "<string>",
"answer": "<string>",
"model": "<string>",
"answered_by": "<uuid>",
"updated_at": "<dateTime>"
}
],
"last_updated_at": "<dateTime>"
}{
"response": "<boolean>",
"message": "<string>",
"error": "<string>"
}{
"response": "<boolean>",
"message": "<string>",
"error": "<string>",
"validation": {}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Objeto que descreve o alvo do formulário dinâmico
"App\\Models\\Project"
43
"project"
"9ee8c42a-909e-4502-a1e9-4431245c5455"
Necessário quando pivot_class é 'Project'.
"9ee8c42a-909e-4502-a1e9-4431245c5455"
Necessário quando pivot_class é 'Project' ou 'ProjectLooseForm'.
"9ee8c42a-909e-4502-a1e9-4431245c5455"
Necessário quando pivot_class é 'ProjectFunnelAssignment'.
129
Necessário quando pivot_class é 'ProjectFunnelAssignment', 'ProjectLooseForm' ou 'ProjectStepForm'.
"9ee8c42a-909e-4502-a1e9-4431245c5455"
Necessário quando pivot_class é 'ProjectStepForm'.
402
Was this page helpful?