Create a Service Form Input
Adds a field to the request form of a Service. A Service can have at most 50 form inputs. This endpoint may change or be removed without prior notice.
POST
/
v1
/
services
/
{service_uid}
/
custom_form_inputs
Create a Service Form Input
curl --request POST \
--url https://api.siit.io/v1/services/{service_uid}/custom_form_inputs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"label": "<string>",
"required": true,
"multiple": true,
"triggers_app_access": true,
"position": 1073741823,
"options": [
"<string>"
],
"available_application_statuses": [],
"filters": {
"status_in": []
}
}
'import requests
url = "https://api.siit.io/v1/services/{service_uid}/custom_form_inputs"
payload = {
"label": "<string>",
"required": True,
"multiple": True,
"triggers_app_access": True,
"position": 1073741823,
"options": ["<string>"],
"available_application_statuses": [],
"filters": { "status_in": [] }
}
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({
label: '<string>',
required: true,
multiple: true,
triggers_app_access: true,
position: 1073741823,
options: ['<string>'],
available_application_statuses: [],
filters: {status_in: []}
})
};
fetch('https://api.siit.io/v1/services/{service_uid}/custom_form_inputs', 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.siit.io/v1/services/{service_uid}/custom_form_inputs",
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([
'label' => '<string>',
'required' => true,
'multiple' => true,
'triggers_app_access' => true,
'position' => 1073741823,
'options' => [
'<string>'
],
'available_application_statuses' => [
],
'filters' => [
'status_in' => [
]
]
]),
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.siit.io/v1/services/{service_uid}/custom_form_inputs"
payload := strings.NewReader("{\n \"label\": \"<string>\",\n \"required\": true,\n \"multiple\": true,\n \"triggers_app_access\": true,\n \"position\": 1073741823,\n \"options\": [\n \"<string>\"\n ],\n \"available_application_statuses\": [],\n \"filters\": {\n \"status_in\": []\n }\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.siit.io/v1/services/{service_uid}/custom_form_inputs")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"label\": \"<string>\",\n \"required\": true,\n \"multiple\": true,\n \"triggers_app_access\": true,\n \"position\": 1073741823,\n \"options\": [\n \"<string>\"\n ],\n \"available_application_statuses\": [],\n \"filters\": {\n \"status_in\": []\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.siit.io/v1/services/{service_uid}/custom_form_inputs")
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 \"label\": \"<string>\",\n \"required\": true,\n \"multiple\": true,\n \"triggers_app_access\": true,\n \"position\": 1073741823,\n \"options\": [\n \"<string>\"\n ],\n \"available_application_statuses\": [],\n \"filters\": {\n \"status_in\": []\n }\n}"
response = http.request(request)
puts response.read_body{
"result": {
"uid": "<string>",
"kind": "attachment",
"label": "<string>",
"multiple": true,
"options": [
"<string>"
],
"required": true,
"triggers_app_access": true
}
}{
"error": "<string>",
"troubleshoot": "<string>"
}{
"error": "<string>",
"troubleshoot": "<string>"
}{
"error": "<string>",
"troubleshoot": "<string>"
}Authorizations
Body
application/json
The field type. select needs options; select_application needs available_application_statuses; select_people needs filters.status_in. Other select_* kinds list company records (departments, equipments, legal entities, office locations, teams, countries) and store the chosen UIDs (ISO 3166-1 alpha-2 codes for countries).
Available options:
attachment, datepicker, number, select, select_application, select_country, select_department, select_equipment, select_legal_entity, select_office_location, select_people, select_team, string, text Create a Service Form Input
curl --request POST \
--url https://api.siit.io/v1/services/{service_uid}/custom_form_inputs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"label": "<string>",
"required": true,
"multiple": true,
"triggers_app_access": true,
"position": 1073741823,
"options": [
"<string>"
],
"available_application_statuses": [],
"filters": {
"status_in": []
}
}
'import requests
url = "https://api.siit.io/v1/services/{service_uid}/custom_form_inputs"
payload = {
"label": "<string>",
"required": True,
"multiple": True,
"triggers_app_access": True,
"position": 1073741823,
"options": ["<string>"],
"available_application_statuses": [],
"filters": { "status_in": [] }
}
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({
label: '<string>',
required: true,
multiple: true,
triggers_app_access: true,
position: 1073741823,
options: ['<string>'],
available_application_statuses: [],
filters: {status_in: []}
})
};
fetch('https://api.siit.io/v1/services/{service_uid}/custom_form_inputs', 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.siit.io/v1/services/{service_uid}/custom_form_inputs",
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([
'label' => '<string>',
'required' => true,
'multiple' => true,
'triggers_app_access' => true,
'position' => 1073741823,
'options' => [
'<string>'
],
'available_application_statuses' => [
],
'filters' => [
'status_in' => [
]
]
]),
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.siit.io/v1/services/{service_uid}/custom_form_inputs"
payload := strings.NewReader("{\n \"label\": \"<string>\",\n \"required\": true,\n \"multiple\": true,\n \"triggers_app_access\": true,\n \"position\": 1073741823,\n \"options\": [\n \"<string>\"\n ],\n \"available_application_statuses\": [],\n \"filters\": {\n \"status_in\": []\n }\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.siit.io/v1/services/{service_uid}/custom_form_inputs")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"label\": \"<string>\",\n \"required\": true,\n \"multiple\": true,\n \"triggers_app_access\": true,\n \"position\": 1073741823,\n \"options\": [\n \"<string>\"\n ],\n \"available_application_statuses\": [],\n \"filters\": {\n \"status_in\": []\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.siit.io/v1/services/{service_uid}/custom_form_inputs")
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 \"label\": \"<string>\",\n \"required\": true,\n \"multiple\": true,\n \"triggers_app_access\": true,\n \"position\": 1073741823,\n \"options\": [\n \"<string>\"\n ],\n \"available_application_statuses\": [],\n \"filters\": {\n \"status_in\": []\n }\n}"
response = http.request(request)
puts response.read_body{
"result": {
"uid": "<string>",
"kind": "attachment",
"label": "<string>",
"multiple": true,
"options": [
"<string>"
],
"required": true,
"triggers_app_access": true
}
}{
"error": "<string>",
"troubleshoot": "<string>"
}{
"error": "<string>",
"troubleshoot": "<string>"
}{
"error": "<string>",
"troubleshoot": "<string>"
}
