Criar registro de formulário da unidade
Cria um registro de formulário em uma unidade e devolve o id dele.
POST
/
api
/
v2
/
empresa
/
company
/
form
/
record
/
add
cURL
curl --request POST \
--url https://api.sults.com.br/api/v2/empresa/company/form/record/add \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"companyId": 12,
"formId": 7,
"fieldValues": [
{
"id": 501,
"valueText": "120"
},
{
"id": 502,
"valueOptionId": [
12
]
}
]
}'import requests
url = "https://api.sults.com.br/api/v2/empresa/company/form/record/add"
payload = {
"companyId": 12,
"formId": 7,
"fieldValues": [
{
"id": 501,
"valueText": "120"
},
{
"id": 502,
"valueOptionId": [
12
]
}
]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json",
}
resposta = requests.post(url, json=payload, headers=headers)
print(resposta.status_code)
print(resposta.text)const resposta = await fetch("https://api.sults.com.br/api/v2/empresa/company/form/record/add", {
method: "POST",
headers: {
Authorization: "<api-key>",
"Content-Type": "application/json",
},
body: JSON.stringify({
"companyId": 12,
"formId": 7,
"fieldValues": [
{
"id": 501,
"valueText": "120"
},
{
"id": 502,
"valueOptionId": [
12
]
}
]
}),
});
console.log(resposta.status, await resposta.text());<?php
$corpo = <<<'JSON'
{
"companyId": 12,
"formId": 7,
"fieldValues": [
{
"id": 501,
"valueText": "120"
},
{
"id": 502,
"valueOptionId": [
12
]
}
]
}
JSON;
$ch = curl_init("https://api.sults.com.br/api/v2/empresa/company/form/record/add");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: <api-key>",
"Content-Type: application/json",
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, $corpo);
$resposta = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $status . PHP_EOL . $resposta . PHP_EOL;using System.Net.Http;
using System.Text;
var http = new HttpClient();
http.DefaultRequestHeaders.Add("Authorization", "<api-key>");
var corpo = """
{
"companyId": 12,
"formId": 7,
"fieldValues": [
{
"id": 501,
"valueText": "120"
},
{
"id": 502,
"valueOptionId": [
12
]
}
]
}
""";
var resposta = await http.PostAsync(
"https://api.sults.com.br/api/v2/empresa/company/form/record/add",
new StringContent(corpo, Encoding.UTF8, "application/json"));
Console.WriteLine((int)resposta.StatusCode);
Console.WriteLine(await resposta.Content.ReadAsStringAsync());{
"id": 3302
}{
"error": "'formId' is required.",
"dateTime": "2026-11-13T14:20:00Z"
}{
"error": "Acesso não autorizado."
}{
"error": "Unauthorized",
"dateTime": "2026-11-13T14:20:00Z"
}{
"error": "Not Found",
"dateTime": "2026-11-13T14:20:00Z"
}<string>{
"error": "Internal Server Error",
"dateTime": "2026-11-13T14:20:00Z"
}Authorizations
Body
application/json
Novo registro de formulário de uma unidade.
Was this page helpful?
⌘I
cURL
curl --request POST \
--url https://api.sults.com.br/api/v2/empresa/company/form/record/add \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"companyId": 12,
"formId": 7,
"fieldValues": [
{
"id": 501,
"valueText": "120"
},
{
"id": 502,
"valueOptionId": [
12
]
}
]
}'import requests
url = "https://api.sults.com.br/api/v2/empresa/company/form/record/add"
payload = {
"companyId": 12,
"formId": 7,
"fieldValues": [
{
"id": 501,
"valueText": "120"
},
{
"id": 502,
"valueOptionId": [
12
]
}
]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json",
}
resposta = requests.post(url, json=payload, headers=headers)
print(resposta.status_code)
print(resposta.text)const resposta = await fetch("https://api.sults.com.br/api/v2/empresa/company/form/record/add", {
method: "POST",
headers: {
Authorization: "<api-key>",
"Content-Type": "application/json",
},
body: JSON.stringify({
"companyId": 12,
"formId": 7,
"fieldValues": [
{
"id": 501,
"valueText": "120"
},
{
"id": 502,
"valueOptionId": [
12
]
}
]
}),
});
console.log(resposta.status, await resposta.text());<?php
$corpo = <<<'JSON'
{
"companyId": 12,
"formId": 7,
"fieldValues": [
{
"id": 501,
"valueText": "120"
},
{
"id": 502,
"valueOptionId": [
12
]
}
]
}
JSON;
$ch = curl_init("https://api.sults.com.br/api/v2/empresa/company/form/record/add");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: <api-key>",
"Content-Type: application/json",
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, $corpo);
$resposta = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $status . PHP_EOL . $resposta . PHP_EOL;using System.Net.Http;
using System.Text;
var http = new HttpClient();
http.DefaultRequestHeaders.Add("Authorization", "<api-key>");
var corpo = """
{
"companyId": 12,
"formId": 7,
"fieldValues": [
{
"id": 501,
"valueText": "120"
},
{
"id": 502,
"valueOptionId": [
12
]
}
]
}
""";
var resposta = await http.PostAsync(
"https://api.sults.com.br/api/v2/empresa/company/form/record/add",
new StringContent(corpo, Encoding.UTF8, "application/json"));
Console.WriteLine((int)resposta.StatusCode);
Console.WriteLine(await resposta.Content.ReadAsStringAsync());{
"id": 3302
}{
"error": "'formId' is required.",
"dateTime": "2026-11-13T14:20:00Z"
}{
"error": "Acesso não autorizado."
}{
"error": "Unauthorized",
"dateTime": "2026-11-13T14:20:00Z"
}{
"error": "Not Found",
"dateTime": "2026-11-13T14:20:00Z"
}<string>{
"error": "Internal Server Error",
"dateTime": "2026-11-13T14:20:00Z"
}