Assign a scorecard to a real call session
curl --request PATCH \
--url https://api.wejam.ai/api/v1/real-call-sessions/{sessionId} \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"scorecardId": "<string>"
}
'import requests
url = "https://api.wejam.ai/api/v1/real-call-sessions/{sessionId}"
payload = { "scorecardId": "<string>" }
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({scorecardId: '<string>'})
};
fetch('https://api.wejam.ai/api/v1/real-call-sessions/{sessionId}', 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.wejam.ai/api/v1/real-call-sessions/{sessionId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'scorecardId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$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.wejam.ai/api/v1/real-call-sessions/{sessionId}"
payload := strings.NewReader("{\n \"scorecardId\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
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.patch("https://api.wejam.ai/api/v1/real-call-sessions/{sessionId}")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"scorecardId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wejam.ai/api/v1/real-call-sessions/{sessionId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"scorecardId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"analysis": {
"createdAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"items": [
{
"createdAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"lastUpdatedAt": "2023-11-07T05:31:56Z",
"score": 123,
"state": "PROCESSING",
"behaviours": [],
"conversationItemReferenceId": "<string>",
"explanation": "<string>",
"name": "<string>",
"solved": "undetected",
"suggestion": "<string>"
}
],
"lastUpdatedAt": "2023-11-07T05:31:56Z",
"score": 123,
"state": "PENDING"
},
"call": {
"assistantReferenceId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"lastUpdatedAt": "2023-11-07T05:31:56Z",
"state": "PENDING",
"endedReason": "<string>",
"providerCallId": "<string>",
"summary": "<string>",
"transcript": "<string>"
},
"completed": true,
"createdAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"kpis": {
"createdAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"lastUpdatedAt": "2023-11-07T05:31:56Z",
"state": "PENDING",
"listenRatio": 123,
"longestMonologue": 123,
"talkSpeed": 123
},
"language": "en",
"lastUpdatedAt": "2023-11-07T05:31:56Z",
"participantUserIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"state": "PENDING",
"type": "REAL_CALL",
"userId": "<string>",
"missionReferenceId": "<string>",
"missionTitle": "<string>",
"playedLanguage": "en",
"scorecardReferenceId": "<string>",
"scorecardTitle": "<string>",
"trackId": "<string>",
"trackTitle": "<string>"
}Call Scoring
Assign a scorecard to a real call session
PATCH
/
api
/
v1
/
real-call-sessions
/
{sessionId}
Assign a scorecard to a real call session
curl --request PATCH \
--url https://api.wejam.ai/api/v1/real-call-sessions/{sessionId} \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"scorecardId": "<string>"
}
'import requests
url = "https://api.wejam.ai/api/v1/real-call-sessions/{sessionId}"
payload = { "scorecardId": "<string>" }
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({scorecardId: '<string>'})
};
fetch('https://api.wejam.ai/api/v1/real-call-sessions/{sessionId}', 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.wejam.ai/api/v1/real-call-sessions/{sessionId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'scorecardId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$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.wejam.ai/api/v1/real-call-sessions/{sessionId}"
payload := strings.NewReader("{\n \"scorecardId\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
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.patch("https://api.wejam.ai/api/v1/real-call-sessions/{sessionId}")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"scorecardId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wejam.ai/api/v1/real-call-sessions/{sessionId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"scorecardId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"analysis": {
"createdAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"items": [
{
"createdAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"lastUpdatedAt": "2023-11-07T05:31:56Z",
"score": 123,
"state": "PROCESSING",
"behaviours": [],
"conversationItemReferenceId": "<string>",
"explanation": "<string>",
"name": "<string>",
"solved": "undetected",
"suggestion": "<string>"
}
],
"lastUpdatedAt": "2023-11-07T05:31:56Z",
"score": 123,
"state": "PENDING"
},
"call": {
"assistantReferenceId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"lastUpdatedAt": "2023-11-07T05:31:56Z",
"state": "PENDING",
"endedReason": "<string>",
"providerCallId": "<string>",
"summary": "<string>",
"transcript": "<string>"
},
"completed": true,
"createdAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"kpis": {
"createdAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"lastUpdatedAt": "2023-11-07T05:31:56Z",
"state": "PENDING",
"listenRatio": 123,
"longestMonologue": 123,
"talkSpeed": 123
},
"language": "en",
"lastUpdatedAt": "2023-11-07T05:31:56Z",
"participantUserIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"state": "PENDING",
"type": "REAL_CALL",
"userId": "<string>",
"missionReferenceId": "<string>",
"missionTitle": "<string>",
"playedLanguage": "en",
"scorecardReferenceId": "<string>",
"scorecardTitle": "<string>",
"trackId": "<string>",
"trackTitle": "<string>"
}Authorizations
X-API-KEYbearer
Path Parameters
The unique identifier for the session.
Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Body
application/json
The scorecard ID to assign to the session.
Pattern:
^[0-9a-f]{24}$Response
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Available options:
en, de, fr, es, it, nl, zh-Hans User IDs of all attributed speakers in the call, including the scored rep. Empty array when the transcript carries no speaker attribution.
Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Available options:
PENDING, PROCESSING, DONE Available options:
REAL_CALL Reference ID for the associated mission
Available options:
en, de, fr, es, it, nl, pl, zh, ja, id, tr, pt, el, ko, vi, hi, ms, th, hr, ro, bg, sv, no, yue, null Reference ID for the associated scorecard
Title of the associated scorecard
Parent track id for mission-backed roleplay sessions
Was this page helpful?

