Get session details
curl --request GET \
--url https://api.algoreg.com/api/v1/session/{session_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.algoreg.com/api/v1/session/{session_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.algoreg.com/api/v1/session/{session_id}', 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.algoreg.com/api/v1/session/{session_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.algoreg.com/api/v1/session/{session_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.algoreg.com/api/v1/session/{session_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.algoreg.com/api/v1/session/{session_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"session": {
"external_id": "",
"scenario_ref": "your_scenario_ref",
"scenario_id": 7,
"scenario_revision_id": 1,
"date_start": "2018-08-03T12:31:34Z",
"consent_date": "2018-08-03T12:31:38Z",
"date_end": "2018-08-03T12:33:09Z",
"language": "English (United States)",
"state": "completed"
},
"onboarding_customer": {
"external_id": "",
"firstname": "customer_firstname",
"lastname": "customer_lastname",
"phone": "00352621621621",
"birthdate": "1970-01-01",
"address": "Address",
"zip": "ZipCode",
"country": "FR",
"city": "Cityname"
},
"decisions": [
{
"id": 510,
"comment": "All good",
"date": "2023-06-07T13:59:03Z",
"last": true,
"label": "PASS",
"type": "POSITIVE"
},
]
}
Go!Vid
Get session details
GET
/
api
/
v1
/
session
/
{session_id}
Get session details
curl --request GET \
--url https://api.algoreg.com/api/v1/session/{session_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.algoreg.com/api/v1/session/{session_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.algoreg.com/api/v1/session/{session_id}', 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.algoreg.com/api/v1/session/{session_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.algoreg.com/api/v1/session/{session_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.algoreg.com/api/v1/session/{session_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.algoreg.com/api/v1/session/{session_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"session": {
"external_id": "",
"scenario_ref": "your_scenario_ref",
"scenario_id": 7,
"scenario_revision_id": 1,
"date_start": "2018-08-03T12:31:34Z",
"consent_date": "2018-08-03T12:31:38Z",
"date_end": "2018-08-03T12:33:09Z",
"language": "English (United States)",
"state": "completed"
},
"onboarding_customer": {
"external_id": "",
"firstname": "customer_firstname",
"lastname": "customer_lastname",
"phone": "00352621621621",
"birthdate": "1970-01-01",
"address": "Address",
"zip": "ZipCode",
"country": "FR",
"city": "Cityname"
},
"decisions": [
{
"id": 510,
"comment": "All good",
"date": "2023-06-07T13:59:03Z",
"last": true,
"label": "PASS",
"type": "POSITIVE"
},
]
}
Response
Content-Type:application/json
| Parameter | Type | Description |
|---|---|---|
session | object | Session details, see “session” reference |
onboarding_customer | object | Customer details, see “onboarding_customer” reference |
decisions | array | Array of decisions, see “decision” reference |
session
session
| Parameter | Type | Description |
|---|---|---|
external_id | string | External ID |
scenario_ref | string | Scenario reference |
scenario_id | integer | Scenario ID |
scenario_revision_id | integer | Scenario revision ID |
date_start | string | Session start date |
consent_date | string | Session consent date |
date_end | string | Session end date |
language | string | Session language |
state | string | Session state |
onboarding_customer
onboarding_customer
| Parameter | Type | Description |
|---|---|---|
external_id | string | External ID |
firstname | string | Customer firstname |
lastname | string | Customer lastname |
phone | string | Customer phone number |
birthdate | string | Customer birthdate |
address | string | Customer address |
zip | string | Customer zip code |
country | string | Customer country |
city | string | Customer city |
decision
decision
| Parameter | Type | Description |
|---|---|---|
id | number | Decision ID |
comment | string | Decision comment |
date | string | Decision date |
last | string | Decision last |
label | string | Decision label |
type | string | Decision type |
{
"session": {
"external_id": "",
"scenario_ref": "your_scenario_ref",
"scenario_id": 7,
"scenario_revision_id": 1,
"date_start": "2018-08-03T12:31:34Z",
"consent_date": "2018-08-03T12:31:38Z",
"date_end": "2018-08-03T12:33:09Z",
"language": "English (United States)",
"state": "completed"
},
"onboarding_customer": {
"external_id": "",
"firstname": "customer_firstname",
"lastname": "customer_lastname",
"phone": "00352621621621",
"birthdate": "1970-01-01",
"address": "Address",
"zip": "ZipCode",
"country": "FR",
"city": "Cityname"
},
"decisions": [
{
"id": 510,
"comment": "All good",
"date": "2023-06-07T13:59:03Z",
"last": true,
"label": "PASS",
"type": "POSITIVE"
},
]
}
⌘I