/v2/events/helplineDisplay
1 min
POST
https://api.throughlinecare.com/v2/events/helplineDisplay
Body Parameters
- HelplineDisplayHelplineDisplayrequiredDescription
- noDisplaybooleanDescription
- helplineIdstringrequiredDescription
- sessionIdstringrequiredDescription
- timestampstringrequiredDescription
Responses
201
- HelplineDisplayDescription
- noDisplaybooleanDescription
- helplineIdstringrequiredDescription
- sessionIdstringrequiredDescription
- timestampstringrequiredDescription
400
- HelplineDisplayDescription
- noDisplaybooleanDescription
- helplineIdstringrequiredDescription
- sessionIdstringrequiredDescription
- timestampstringrequiredDescription
401
- HelplineDisplayDescription
- noDisplaybooleanDescription
- helplineIdstringrequiredDescription
- sessionIdstringrequiredDescription
- timestampstringrequiredDescription
422
- HelplineDisplayDescription
- noDisplaybooleanDescription
- helplineIdstringrequiredDescription
- sessionIdstringrequiredDescription
- timestampstringrequiredDescription
javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var raw = JSON.stringify({
"helplineId": "",
"sessionId": "",
"timestamp": ""
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.throughlinecare.com/v2/events/helplineDisplay", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("https://api.throughlinecare.com/v2/events/helplineDisplay")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
request.body = JSON.dump({
"helplineId": "",
"sessionId": "",
"timestamp": ""
})
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://api.throughlinecare.com/v2/events/helplineDisplay"
payload = json.dumps({
"helplineId": "",
"sessionId": "",
"timestamp": ""
})
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
java
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"helplineId\": \"\",\n \"sessionId\": \"\",\n \"timestamp\": \"\"\n}");
Request request = new Request.Builder()
.url("https://api.throughlinecare.com/v2/events/helplineDisplay")
.method("POST", body)
.addHeader("accept", "application/json")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();swift
let parameters = "{\n \"helplineId\": \"\",\n \"sessionId\": \"\",\n \"timestamp\": \"\"\n}"
let postData = parameters.data(using: .utf8)
var request = URLRequest(url: URL(string: "https://api.throughlinecare.com/v2/events/helplineDisplay")!,timeoutInterval: Double.infinity)
request.addValue("application/json", forHTTPHeaderField: "accept")
request.addValue("application/json", forHTTPHeaderField: "content-type")
request.httpMethod = "POST"
request.httpBody = postData
let task = URLSession.shared.dataTask(with: request) { data, response, error in
guard let data = data else {
print(String(describing: error))
return
}
print(String(data: data, encoding: .utf8)!)
}
task.resume()
201
// Event recorded successfully.
{
"noDisplay": false,
"helplineId": "",
"sessionId": "",
"timestamp": ""
}400
// Missing or invalid required fields
{
"noDisplay": false,
"helplineId": "",
"sessionId": "",
"timestamp": ""
}401
// Unauthorized
{
"noDisplay": false,
"helplineId": "",
"sessionId": "",
"timestamp": ""
}422
// Invalid helpline
{
"noDisplay": false,
"helplineId": "",
"sessionId": "",
"timestamp": ""
}