Skip to main content
GET
/
takeaways
/
{takeawayId}
Get a takeaway
curl --request GET \
  --url https://api.kameleoon.com/takeaways/{takeawayId} \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.kameleoon.com/takeaways/{takeawayId}"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.kameleoon.com/takeaways/{takeawayId}', 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.kameleoon.com/takeaways/{takeawayId}",
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.kameleoon.com/takeaways/{takeawayId}"

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.kameleoon.com/takeaways/{takeawayId}")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.kameleoon.com/takeaways/{takeawayId}")

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
{
  "bookmarkedForCurrentUser": true,
  "createdById": 123,
  "createdByName": "<string>",
  "id": 123,
  "imageUrl": "<string>",
  "relevantDate": "2023-11-07T05:31:56Z",
  "resultData": {
    "primaryGoalUplift": 123,
    "revenueUplift": 123,
    "totalRevenue": 123
  },
  "siteId": 123,
  "sourceDateCreated": "2023-11-07T05:31:56Z",
  "sourceDateModified": "2023-11-07T05:31:56Z",
  "sourceDateStarted": "2023-11-07T05:31:56Z",
  "sourceDateStatusModified": "2023-11-07T05:31:56Z",
  "sourceId": 123,
  "sourceMainGoalId": 123,
  "sourceMainGoalName": "<string>",
  "sourceName": "<string>",
  "sourceTargetingSegmentId": 123,
  "sourceTargetingSegmentName": "<string>",
  "summary": "<string>"
}
{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}
{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}
{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}
{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}
{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}
{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}
{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}
{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

takeawayId
integer<int64>
required

Response

OK

bookmarkedForCurrentUser
boolean
createdById
integer<int64>
read-only

Account Id of the creator of the associated experiment

createdByName
string
read-only

Name of the creator of the associated experiment

id
integer<int64>
read-only

Unique Id of the takeaway

imageUrl
string
read-only

URL of the associated image

relevantDate
string<date-time>
read-only

Corresponds to datePaused when the associated experiment has status PAUSED, and to dateEnd when the related experiment has status STOPPED

resultData
Takeaway result data · object
read-only

Takeaway result data

siteId
integer<int64>
read-only

Unique Id of the site the takeaway belongs to

sourceDateCreated
string<date-time>
read-only

Date when the associated experiment was created

sourceDateModified
string<date-time>
read-only

Date when the associated experiment was modified

sourceDateStarted
string<date-time>
read-only

Date when the source object was started

sourceDateStatusModified
string<date-time>
read-only

Date when the status of the associated experiment was modified

sourceId
integer<int64>
read-only

Unique Id of the associated experiment

sourceMainGoalId
integer<int64>
read-only

Unique Id of the main goal of the associated experiment

sourceMainGoalName
string
read-only

Name of the main goal of the associated experiment

sourceName
string
read-only

Name of the associated experiment

sourceStatus
enum<string>
read-only

Status of the associated experiment

Available options:
PAUSED,
STOPPED
sourceTargetingSegmentId
integer<int64>
read-only

Unique Id of the targeting segment of the associated experiment

sourceTargetingSegmentName
string
read-only

Name of the targeting segment of the associated experiment

sourceType
enum<string>
read-only

Type of the source object

Available options:
AI,
AUTOPROMO,
BUILDER,
CLASSIC,
DEVELOPER,
IA,
MVT,
PROMPT,
SDK_HYBRID
summary
string
read-only

Generated summary of the associated experiment