Conversations
Parse Text
Parse a text with placeholders. Context from conversation and profile. Currently supported placeholders are: name -> profile.name geburtsdatum -> profile.date_of_birth telefon -> profile.phone_number email -> profile.email adresse -> profile.address datum -> current date (e.g. 15.01.2020) zeit -> current time (e.g. 18:30)
POST
/
conversations
/
{id}
/
parse-text
Parse a text with placeholders. Context from conversation and profile.
Currently supported placeholders are:
$name$ -> profile.name
$geburtsdatum$ -> profile.date_of_birth
$telefon$ -> profile.phone_number
$email$ -> profile.email
$adresse$ -> profile.address
$datum$ -> current date (e.g. 15.01.2020)
$zeit$ -> current time (e.g. 18:30)
curl --request POST \
--url https://1-some-client.some-server.healvi-chat/third-party/v1/conversations/{id}/parse-text \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"text": "Name of profile is $name$.",
"nullable_fields": [
"geburtsdatum",
"adresse"
]
}
'import requests
url = "https://1-some-client.some-server.healvi-chat/third-party/v1/conversations/{id}/parse-text"
payload = {
"text": "Name of profile is $name$.",
"nullable_fields": ["geburtsdatum", "adresse"]
}
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({
text: 'Name of profile is $name$.',
nullable_fields: ['geburtsdatum', 'adresse']
})
};
fetch('https://1-some-client.some-server.healvi-chat/third-party/v1/conversations/{id}/parse-text', 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://1-some-client.some-server.healvi-chat/third-party/v1/conversations/{id}/parse-text",
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([
'text' => 'Name of profile is $name$.',
'nullable_fields' => [
'geburtsdatum',
'adresse'
]
]),
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://1-some-client.some-server.healvi-chat/third-party/v1/conversations/{id}/parse-text"
payload := strings.NewReader("{\n \"text\": \"Name of profile is $name$.\",\n \"nullable_fields\": [\n \"geburtsdatum\",\n \"adresse\"\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://1-some-client.some-server.healvi-chat/third-party/v1/conversations/{id}/parse-text")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"text\": \"Name of profile is $name$.\",\n \"nullable_fields\": [\n \"geburtsdatum\",\n \"adresse\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://1-some-client.some-server.healvi-chat/third-party/v1/conversations/{id}/parse-text")
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 \"text\": \"Name of profile is $name$.\",\n \"nullable_fields\": [\n \"geburtsdatum\",\n \"adresse\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"text": "Name of profile is John Doe."
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
application/json
Example:
"Name of profile is $name$."
Optional list of fields which can be null. Otherwise a validation error will be thrown for fields which cannot be resolved. When a field is allowed to be null / empty, it will be replaced by an empty string. Field names may not contain the "$" delimiter.
Example:
["geburtsdatum", "adresse"]
Response
200 - application/json
Success
Show child attributes
Show child attributes
⌘I
Parse a text with placeholders. Context from conversation and profile.
Currently supported placeholders are:
$name$ -> profile.name
$geburtsdatum$ -> profile.date_of_birth
$telefon$ -> profile.phone_number
$email$ -> profile.email
$adresse$ -> profile.address
$datum$ -> current date (e.g. 15.01.2020)
$zeit$ -> current time (e.g. 18:30)
curl --request POST \
--url https://1-some-client.some-server.healvi-chat/third-party/v1/conversations/{id}/parse-text \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"text": "Name of profile is $name$.",
"nullable_fields": [
"geburtsdatum",
"adresse"
]
}
'import requests
url = "https://1-some-client.some-server.healvi-chat/third-party/v1/conversations/{id}/parse-text"
payload = {
"text": "Name of profile is $name$.",
"nullable_fields": ["geburtsdatum", "adresse"]
}
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({
text: 'Name of profile is $name$.',
nullable_fields: ['geburtsdatum', 'adresse']
})
};
fetch('https://1-some-client.some-server.healvi-chat/third-party/v1/conversations/{id}/parse-text', 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://1-some-client.some-server.healvi-chat/third-party/v1/conversations/{id}/parse-text",
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([
'text' => 'Name of profile is $name$.',
'nullable_fields' => [
'geburtsdatum',
'adresse'
]
]),
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://1-some-client.some-server.healvi-chat/third-party/v1/conversations/{id}/parse-text"
payload := strings.NewReader("{\n \"text\": \"Name of profile is $name$.\",\n \"nullable_fields\": [\n \"geburtsdatum\",\n \"adresse\"\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://1-some-client.some-server.healvi-chat/third-party/v1/conversations/{id}/parse-text")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"text\": \"Name of profile is $name$.\",\n \"nullable_fields\": [\n \"geburtsdatum\",\n \"adresse\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://1-some-client.some-server.healvi-chat/third-party/v1/conversations/{id}/parse-text")
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 \"text\": \"Name of profile is $name$.\",\n \"nullable_fields\": [\n \"geburtsdatum\",\n \"adresse\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"text": "Name of profile is John Doe."
}
}