POST /telehealth_waiting_rooms
curl --request POST \
--url https://api.example.test/telehealth_waiting_rooms \
--header 'Content-Type: application/json' \
--data '
{
"telehealth_waiting_room": {
"person": {
"waiting_room": true,
"telephone2": "<string>",
"born_at": "2023-12-25",
"first_name": "<string>",
"last_name": "<string>",
"gender": "<string>",
"email": "jsmith@example.com",
"phone_country_id": "<string>",
"person_attributes": {
"is_under_age": true
}
},
"organization_id": 123,
"cause": "<string>",
"waiting_room_id": 123,
"custom_form_response": {
"respondable_type": "<string>",
"organization_id": 123,
"responses": {
"cf_98_070e8aae224f": {
"id": 123,
"key": "<string>",
"default_component": "<string>",
"default_options": {
"label": "<string>"
},
"name": "<string>",
"section_name": "<string>",
"custom_form_id": 123,
"custom_field_id": 123,
"applicable_model": "<string>",
"value": "<string>"
},
"cf_98_fe56b688854b": {
"id": 123,
"key": "<string>",
"default_component": "<string>",
"default_options": {
"label": "<string>",
"options": [
{
"label": "<string>",
"value": "<string>"
}
]
},
"name": "<string>",
"section_name": "<string>",
"custom_form_id": 123,
"custom_field_id": 123,
"applicable_model": "<string>",
"value": "<string>"
},
"cf_98_508008f65942": {
"id": 123,
"key": "<string>",
"default_component": "<string>",
"default_options": {
"label": "<string>"
},
"name": "<string>",
"section_name": "<string>",
"custom_form_id": 123,
"custom_field_id": 123,
"applicable_model": "<string>",
"value": "2023-12-25"
}
}
}
}
}
'import requests
url = "https://api.example.test/telehealth_waiting_rooms"
payload = { "telehealth_waiting_room": {
"person": {
"waiting_room": True,
"telephone2": "<string>",
"born_at": "2023-12-25",
"first_name": "<string>",
"last_name": "<string>",
"gender": "<string>",
"email": "jsmith@example.com",
"phone_country_id": "<string>",
"person_attributes": { "is_under_age": True }
},
"organization_id": 123,
"cause": "<string>",
"waiting_room_id": 123,
"custom_form_response": {
"respondable_type": "<string>",
"organization_id": 123,
"responses": {
"cf_98_070e8aae224f": {
"id": 123,
"key": "<string>",
"default_component": "<string>",
"default_options": { "label": "<string>" },
"name": "<string>",
"section_name": "<string>",
"custom_form_id": 123,
"custom_field_id": 123,
"applicable_model": "<string>",
"value": "<string>"
},
"cf_98_fe56b688854b": {
"id": 123,
"key": "<string>",
"default_component": "<string>",
"default_options": {
"label": "<string>",
"options": [
{
"label": "<string>",
"value": "<string>"
}
]
},
"name": "<string>",
"section_name": "<string>",
"custom_form_id": 123,
"custom_field_id": 123,
"applicable_model": "<string>",
"value": "<string>"
},
"cf_98_508008f65942": {
"id": 123,
"key": "<string>",
"default_component": "<string>",
"default_options": { "label": "<string>" },
"name": "<string>",
"section_name": "<string>",
"custom_form_id": 123,
"custom_field_id": 123,
"applicable_model": "<string>",
"value": "2023-12-25"
}
}
}
} }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
telehealth_waiting_room: {
person: {
waiting_room: true,
telephone2: '<string>',
born_at: '2023-12-25',
first_name: '<string>',
last_name: '<string>',
gender: '<string>',
email: 'jsmith@example.com',
phone_country_id: '<string>',
person_attributes: {is_under_age: true}
},
organization_id: 123,
cause: '<string>',
waiting_room_id: 123,
custom_form_response: {
respondable_type: '<string>',
organization_id: 123,
responses: {
cf_98_070e8aae224f: {
id: 123,
key: '<string>',
default_component: '<string>',
default_options: {label: '<string>'},
name: '<string>',
section_name: '<string>',
custom_form_id: 123,
custom_field_id: 123,
applicable_model: '<string>',
value: '<string>'
},
cf_98_fe56b688854b: {
id: 123,
key: '<string>',
default_component: '<string>',
default_options: {label: '<string>', options: [{label: '<string>', value: '<string>'}]},
name: '<string>',
section_name: '<string>',
custom_form_id: 123,
custom_field_id: 123,
applicable_model: '<string>',
value: '<string>'
},
cf_98_508008f65942: {
id: 123,
key: '<string>',
default_component: '<string>',
default_options: {label: '<string>'},
name: '<string>',
section_name: '<string>',
custom_form_id: 123,
custom_field_id: 123,
applicable_model: '<string>',
value: '2023-12-25'
}
}
}
}
})
};
fetch('https://api.example.test/telehealth_waiting_rooms', 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.example.test/telehealth_waiting_rooms",
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([
'telehealth_waiting_room' => [
'person' => [
'waiting_room' => true,
'telephone2' => '<string>',
'born_at' => '2023-12-25',
'first_name' => '<string>',
'last_name' => '<string>',
'gender' => '<string>',
'email' => 'jsmith@example.com',
'phone_country_id' => '<string>',
'person_attributes' => [
'is_under_age' => true
]
],
'organization_id' => 123,
'cause' => '<string>',
'waiting_room_id' => 123,
'custom_form_response' => [
'respondable_type' => '<string>',
'organization_id' => 123,
'responses' => [
'cf_98_070e8aae224f' => [
'id' => 123,
'key' => '<string>',
'default_component' => '<string>',
'default_options' => [
'label' => '<string>'
],
'name' => '<string>',
'section_name' => '<string>',
'custom_form_id' => 123,
'custom_field_id' => 123,
'applicable_model' => '<string>',
'value' => '<string>'
],
'cf_98_fe56b688854b' => [
'id' => 123,
'key' => '<string>',
'default_component' => '<string>',
'default_options' => [
'label' => '<string>',
'options' => [
[
'label' => '<string>',
'value' => '<string>'
]
]
],
'name' => '<string>',
'section_name' => '<string>',
'custom_form_id' => 123,
'custom_field_id' => 123,
'applicable_model' => '<string>',
'value' => '<string>'
],
'cf_98_508008f65942' => [
'id' => 123,
'key' => '<string>',
'default_component' => '<string>',
'default_options' => [
'label' => '<string>'
],
'name' => '<string>',
'section_name' => '<string>',
'custom_form_id' => 123,
'custom_field_id' => 123,
'applicable_model' => '<string>',
'value' => '2023-12-25'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"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.example.test/telehealth_waiting_rooms"
payload := strings.NewReader("{\n \"telehealth_waiting_room\": {\n \"person\": {\n \"waiting_room\": true,\n \"telephone2\": \"<string>\",\n \"born_at\": \"2023-12-25\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"gender\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone_country_id\": \"<string>\",\n \"person_attributes\": {\n \"is_under_age\": true\n }\n },\n \"organization_id\": 123,\n \"cause\": \"<string>\",\n \"waiting_room_id\": 123,\n \"custom_form_response\": {\n \"respondable_type\": \"<string>\",\n \"organization_id\": 123,\n \"responses\": {\n \"cf_98_070e8aae224f\": {\n \"id\": 123,\n \"key\": \"<string>\",\n \"default_component\": \"<string>\",\n \"default_options\": {\n \"label\": \"<string>\"\n },\n \"name\": \"<string>\",\n \"section_name\": \"<string>\",\n \"custom_form_id\": 123,\n \"custom_field_id\": 123,\n \"applicable_model\": \"<string>\",\n \"value\": \"<string>\"\n },\n \"cf_98_fe56b688854b\": {\n \"id\": 123,\n \"key\": \"<string>\",\n \"default_component\": \"<string>\",\n \"default_options\": {\n \"label\": \"<string>\",\n \"options\": [\n {\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n },\n \"name\": \"<string>\",\n \"section_name\": \"<string>\",\n \"custom_form_id\": 123,\n \"custom_field_id\": 123,\n \"applicable_model\": \"<string>\",\n \"value\": \"<string>\"\n },\n \"cf_98_508008f65942\": {\n \"id\": 123,\n \"key\": \"<string>\",\n \"default_component\": \"<string>\",\n \"default_options\": {\n \"label\": \"<string>\"\n },\n \"name\": \"<string>\",\n \"section_name\": \"<string>\",\n \"custom_form_id\": 123,\n \"custom_field_id\": 123,\n \"applicable_model\": \"<string>\",\n \"value\": \"2023-12-25\"\n }\n }\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
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.example.test/telehealth_waiting_rooms")
.header("Content-Type", "application/json")
.body("{\n \"telehealth_waiting_room\": {\n \"person\": {\n \"waiting_room\": true,\n \"telephone2\": \"<string>\",\n \"born_at\": \"2023-12-25\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"gender\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone_country_id\": \"<string>\",\n \"person_attributes\": {\n \"is_under_age\": true\n }\n },\n \"organization_id\": 123,\n \"cause\": \"<string>\",\n \"waiting_room_id\": 123,\n \"custom_form_response\": {\n \"respondable_type\": \"<string>\",\n \"organization_id\": 123,\n \"responses\": {\n \"cf_98_070e8aae224f\": {\n \"id\": 123,\n \"key\": \"<string>\",\n \"default_component\": \"<string>\",\n \"default_options\": {\n \"label\": \"<string>\"\n },\n \"name\": \"<string>\",\n \"section_name\": \"<string>\",\n \"custom_form_id\": 123,\n \"custom_field_id\": 123,\n \"applicable_model\": \"<string>\",\n \"value\": \"<string>\"\n },\n \"cf_98_fe56b688854b\": {\n \"id\": 123,\n \"key\": \"<string>\",\n \"default_component\": \"<string>\",\n \"default_options\": {\n \"label\": \"<string>\",\n \"options\": [\n {\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n },\n \"name\": \"<string>\",\n \"section_name\": \"<string>\",\n \"custom_form_id\": 123,\n \"custom_field_id\": 123,\n \"applicable_model\": \"<string>\",\n \"value\": \"<string>\"\n },\n \"cf_98_508008f65942\": {\n \"id\": 123,\n \"key\": \"<string>\",\n \"default_component\": \"<string>\",\n \"default_options\": {\n \"label\": \"<string>\"\n },\n \"name\": \"<string>\",\n \"section_name\": \"<string>\",\n \"custom_form_id\": 123,\n \"custom_field_id\": 123,\n \"applicable_model\": \"<string>\",\n \"value\": \"2023-12-25\"\n }\n }\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.test/telehealth_waiting_rooms")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"telehealth_waiting_room\": {\n \"person\": {\n \"waiting_room\": true,\n \"telephone2\": \"<string>\",\n \"born_at\": \"2023-12-25\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"gender\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone_country_id\": \"<string>\",\n \"person_attributes\": {\n \"is_under_age\": true\n }\n },\n \"organization_id\": 123,\n \"cause\": \"<string>\",\n \"waiting_room_id\": 123,\n \"custom_form_response\": {\n \"respondable_type\": \"<string>\",\n \"organization_id\": 123,\n \"responses\": {\n \"cf_98_070e8aae224f\": {\n \"id\": 123,\n \"key\": \"<string>\",\n \"default_component\": \"<string>\",\n \"default_options\": {\n \"label\": \"<string>\"\n },\n \"name\": \"<string>\",\n \"section_name\": \"<string>\",\n \"custom_form_id\": 123,\n \"custom_field_id\": 123,\n \"applicable_model\": \"<string>\",\n \"value\": \"<string>\"\n },\n \"cf_98_fe56b688854b\": {\n \"id\": 123,\n \"key\": \"<string>\",\n \"default_component\": \"<string>\",\n \"default_options\": {\n \"label\": \"<string>\",\n \"options\": [\n {\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n },\n \"name\": \"<string>\",\n \"section_name\": \"<string>\",\n \"custom_form_id\": 123,\n \"custom_field_id\": 123,\n \"applicable_model\": \"<string>\",\n \"value\": \"<string>\"\n },\n \"cf_98_508008f65942\": {\n \"id\": 123,\n \"key\": \"<string>\",\n \"default_component\": \"<string>\",\n \"default_options\": {\n \"label\": \"<string>\"\n },\n \"name\": \"<string>\",\n \"section_name\": \"<string>\",\n \"custom_form_id\": 123,\n \"custom_field_id\": 123,\n \"applicable_model\": \"<string>\",\n \"value\": \"2023-12-25\"\n }\n }\n }\n }\n}"
response = http.request(request)
puts response.read_bodyTelehealth
POST /telehealth_waiting_rooms
POST
/
telehealth_waiting_rooms
POST /telehealth_waiting_rooms
curl --request POST \
--url https://api.example.test/telehealth_waiting_rooms \
--header 'Content-Type: application/json' \
--data '
{
"telehealth_waiting_room": {
"person": {
"waiting_room": true,
"telephone2": "<string>",
"born_at": "2023-12-25",
"first_name": "<string>",
"last_name": "<string>",
"gender": "<string>",
"email": "jsmith@example.com",
"phone_country_id": "<string>",
"person_attributes": {
"is_under_age": true
}
},
"organization_id": 123,
"cause": "<string>",
"waiting_room_id": 123,
"custom_form_response": {
"respondable_type": "<string>",
"organization_id": 123,
"responses": {
"cf_98_070e8aae224f": {
"id": 123,
"key": "<string>",
"default_component": "<string>",
"default_options": {
"label": "<string>"
},
"name": "<string>",
"section_name": "<string>",
"custom_form_id": 123,
"custom_field_id": 123,
"applicable_model": "<string>",
"value": "<string>"
},
"cf_98_fe56b688854b": {
"id": 123,
"key": "<string>",
"default_component": "<string>",
"default_options": {
"label": "<string>",
"options": [
{
"label": "<string>",
"value": "<string>"
}
]
},
"name": "<string>",
"section_name": "<string>",
"custom_form_id": 123,
"custom_field_id": 123,
"applicable_model": "<string>",
"value": "<string>"
},
"cf_98_508008f65942": {
"id": 123,
"key": "<string>",
"default_component": "<string>",
"default_options": {
"label": "<string>"
},
"name": "<string>",
"section_name": "<string>",
"custom_form_id": 123,
"custom_field_id": 123,
"applicable_model": "<string>",
"value": "2023-12-25"
}
}
}
}
}
'import requests
url = "https://api.example.test/telehealth_waiting_rooms"
payload = { "telehealth_waiting_room": {
"person": {
"waiting_room": True,
"telephone2": "<string>",
"born_at": "2023-12-25",
"first_name": "<string>",
"last_name": "<string>",
"gender": "<string>",
"email": "jsmith@example.com",
"phone_country_id": "<string>",
"person_attributes": { "is_under_age": True }
},
"organization_id": 123,
"cause": "<string>",
"waiting_room_id": 123,
"custom_form_response": {
"respondable_type": "<string>",
"organization_id": 123,
"responses": {
"cf_98_070e8aae224f": {
"id": 123,
"key": "<string>",
"default_component": "<string>",
"default_options": { "label": "<string>" },
"name": "<string>",
"section_name": "<string>",
"custom_form_id": 123,
"custom_field_id": 123,
"applicable_model": "<string>",
"value": "<string>"
},
"cf_98_fe56b688854b": {
"id": 123,
"key": "<string>",
"default_component": "<string>",
"default_options": {
"label": "<string>",
"options": [
{
"label": "<string>",
"value": "<string>"
}
]
},
"name": "<string>",
"section_name": "<string>",
"custom_form_id": 123,
"custom_field_id": 123,
"applicable_model": "<string>",
"value": "<string>"
},
"cf_98_508008f65942": {
"id": 123,
"key": "<string>",
"default_component": "<string>",
"default_options": { "label": "<string>" },
"name": "<string>",
"section_name": "<string>",
"custom_form_id": 123,
"custom_field_id": 123,
"applicable_model": "<string>",
"value": "2023-12-25"
}
}
}
} }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
telehealth_waiting_room: {
person: {
waiting_room: true,
telephone2: '<string>',
born_at: '2023-12-25',
first_name: '<string>',
last_name: '<string>',
gender: '<string>',
email: 'jsmith@example.com',
phone_country_id: '<string>',
person_attributes: {is_under_age: true}
},
organization_id: 123,
cause: '<string>',
waiting_room_id: 123,
custom_form_response: {
respondable_type: '<string>',
organization_id: 123,
responses: {
cf_98_070e8aae224f: {
id: 123,
key: '<string>',
default_component: '<string>',
default_options: {label: '<string>'},
name: '<string>',
section_name: '<string>',
custom_form_id: 123,
custom_field_id: 123,
applicable_model: '<string>',
value: '<string>'
},
cf_98_fe56b688854b: {
id: 123,
key: '<string>',
default_component: '<string>',
default_options: {label: '<string>', options: [{label: '<string>', value: '<string>'}]},
name: '<string>',
section_name: '<string>',
custom_form_id: 123,
custom_field_id: 123,
applicable_model: '<string>',
value: '<string>'
},
cf_98_508008f65942: {
id: 123,
key: '<string>',
default_component: '<string>',
default_options: {label: '<string>'},
name: '<string>',
section_name: '<string>',
custom_form_id: 123,
custom_field_id: 123,
applicable_model: '<string>',
value: '2023-12-25'
}
}
}
}
})
};
fetch('https://api.example.test/telehealth_waiting_rooms', 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.example.test/telehealth_waiting_rooms",
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([
'telehealth_waiting_room' => [
'person' => [
'waiting_room' => true,
'telephone2' => '<string>',
'born_at' => '2023-12-25',
'first_name' => '<string>',
'last_name' => '<string>',
'gender' => '<string>',
'email' => 'jsmith@example.com',
'phone_country_id' => '<string>',
'person_attributes' => [
'is_under_age' => true
]
],
'organization_id' => 123,
'cause' => '<string>',
'waiting_room_id' => 123,
'custom_form_response' => [
'respondable_type' => '<string>',
'organization_id' => 123,
'responses' => [
'cf_98_070e8aae224f' => [
'id' => 123,
'key' => '<string>',
'default_component' => '<string>',
'default_options' => [
'label' => '<string>'
],
'name' => '<string>',
'section_name' => '<string>',
'custom_form_id' => 123,
'custom_field_id' => 123,
'applicable_model' => '<string>',
'value' => '<string>'
],
'cf_98_fe56b688854b' => [
'id' => 123,
'key' => '<string>',
'default_component' => '<string>',
'default_options' => [
'label' => '<string>',
'options' => [
[
'label' => '<string>',
'value' => '<string>'
]
]
],
'name' => '<string>',
'section_name' => '<string>',
'custom_form_id' => 123,
'custom_field_id' => 123,
'applicable_model' => '<string>',
'value' => '<string>'
],
'cf_98_508008f65942' => [
'id' => 123,
'key' => '<string>',
'default_component' => '<string>',
'default_options' => [
'label' => '<string>'
],
'name' => '<string>',
'section_name' => '<string>',
'custom_form_id' => 123,
'custom_field_id' => 123,
'applicable_model' => '<string>',
'value' => '2023-12-25'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"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.example.test/telehealth_waiting_rooms"
payload := strings.NewReader("{\n \"telehealth_waiting_room\": {\n \"person\": {\n \"waiting_room\": true,\n \"telephone2\": \"<string>\",\n \"born_at\": \"2023-12-25\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"gender\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone_country_id\": \"<string>\",\n \"person_attributes\": {\n \"is_under_age\": true\n }\n },\n \"organization_id\": 123,\n \"cause\": \"<string>\",\n \"waiting_room_id\": 123,\n \"custom_form_response\": {\n \"respondable_type\": \"<string>\",\n \"organization_id\": 123,\n \"responses\": {\n \"cf_98_070e8aae224f\": {\n \"id\": 123,\n \"key\": \"<string>\",\n \"default_component\": \"<string>\",\n \"default_options\": {\n \"label\": \"<string>\"\n },\n \"name\": \"<string>\",\n \"section_name\": \"<string>\",\n \"custom_form_id\": 123,\n \"custom_field_id\": 123,\n \"applicable_model\": \"<string>\",\n \"value\": \"<string>\"\n },\n \"cf_98_fe56b688854b\": {\n \"id\": 123,\n \"key\": \"<string>\",\n \"default_component\": \"<string>\",\n \"default_options\": {\n \"label\": \"<string>\",\n \"options\": [\n {\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n },\n \"name\": \"<string>\",\n \"section_name\": \"<string>\",\n \"custom_form_id\": 123,\n \"custom_field_id\": 123,\n \"applicable_model\": \"<string>\",\n \"value\": \"<string>\"\n },\n \"cf_98_508008f65942\": {\n \"id\": 123,\n \"key\": \"<string>\",\n \"default_component\": \"<string>\",\n \"default_options\": {\n \"label\": \"<string>\"\n },\n \"name\": \"<string>\",\n \"section_name\": \"<string>\",\n \"custom_form_id\": 123,\n \"custom_field_id\": 123,\n \"applicable_model\": \"<string>\",\n \"value\": \"2023-12-25\"\n }\n }\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
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.example.test/telehealth_waiting_rooms")
.header("Content-Type", "application/json")
.body("{\n \"telehealth_waiting_room\": {\n \"person\": {\n \"waiting_room\": true,\n \"telephone2\": \"<string>\",\n \"born_at\": \"2023-12-25\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"gender\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone_country_id\": \"<string>\",\n \"person_attributes\": {\n \"is_under_age\": true\n }\n },\n \"organization_id\": 123,\n \"cause\": \"<string>\",\n \"waiting_room_id\": 123,\n \"custom_form_response\": {\n \"respondable_type\": \"<string>\",\n \"organization_id\": 123,\n \"responses\": {\n \"cf_98_070e8aae224f\": {\n \"id\": 123,\n \"key\": \"<string>\",\n \"default_component\": \"<string>\",\n \"default_options\": {\n \"label\": \"<string>\"\n },\n \"name\": \"<string>\",\n \"section_name\": \"<string>\",\n \"custom_form_id\": 123,\n \"custom_field_id\": 123,\n \"applicable_model\": \"<string>\",\n \"value\": \"<string>\"\n },\n \"cf_98_fe56b688854b\": {\n \"id\": 123,\n \"key\": \"<string>\",\n \"default_component\": \"<string>\",\n \"default_options\": {\n \"label\": \"<string>\",\n \"options\": [\n {\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n },\n \"name\": \"<string>\",\n \"section_name\": \"<string>\",\n \"custom_form_id\": 123,\n \"custom_field_id\": 123,\n \"applicable_model\": \"<string>\",\n \"value\": \"<string>\"\n },\n \"cf_98_508008f65942\": {\n \"id\": 123,\n \"key\": \"<string>\",\n \"default_component\": \"<string>\",\n \"default_options\": {\n \"label\": \"<string>\"\n },\n \"name\": \"<string>\",\n \"section_name\": \"<string>\",\n \"custom_form_id\": 123,\n \"custom_field_id\": 123,\n \"applicable_model\": \"<string>\",\n \"value\": \"2023-12-25\"\n }\n }\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.test/telehealth_waiting_rooms")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"telehealth_waiting_room\": {\n \"person\": {\n \"waiting_room\": true,\n \"telephone2\": \"<string>\",\n \"born_at\": \"2023-12-25\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"gender\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone_country_id\": \"<string>\",\n \"person_attributes\": {\n \"is_under_age\": true\n }\n },\n \"organization_id\": 123,\n \"cause\": \"<string>\",\n \"waiting_room_id\": 123,\n \"custom_form_response\": {\n \"respondable_type\": \"<string>\",\n \"organization_id\": 123,\n \"responses\": {\n \"cf_98_070e8aae224f\": {\n \"id\": 123,\n \"key\": \"<string>\",\n \"default_component\": \"<string>\",\n \"default_options\": {\n \"label\": \"<string>\"\n },\n \"name\": \"<string>\",\n \"section_name\": \"<string>\",\n \"custom_form_id\": 123,\n \"custom_field_id\": 123,\n \"applicable_model\": \"<string>\",\n \"value\": \"<string>\"\n },\n \"cf_98_fe56b688854b\": {\n \"id\": 123,\n \"key\": \"<string>\",\n \"default_component\": \"<string>\",\n \"default_options\": {\n \"label\": \"<string>\",\n \"options\": [\n {\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n },\n \"name\": \"<string>\",\n \"section_name\": \"<string>\",\n \"custom_form_id\": 123,\n \"custom_field_id\": 123,\n \"applicable_model\": \"<string>\",\n \"value\": \"<string>\"\n },\n \"cf_98_508008f65942\": {\n \"id\": 123,\n \"key\": \"<string>\",\n \"default_component\": \"<string>\",\n \"default_options\": {\n \"label\": \"<string>\"\n },\n \"name\": \"<string>\",\n \"section_name\": \"<string>\",\n \"custom_form_id\": 123,\n \"custom_field_id\": 123,\n \"applicable_model\": \"<string>\",\n \"value\": \"2023-12-25\"\n }\n }\n }\n }\n}"
response = http.request(request)
puts response.read_bodyBody
application/json
Show child attributes
Show child attributes
Response
200
Successful response
⌘I