curl --request PATCH \
--url https://api.kameleoon.com/studio-recommender-blocks/{studioRecommenderBlockId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"code": "<string>",
"name": "<string>",
"recommenderBlockId": 123,
"siteId": 123,
"studioCss": "<string>",
"studioTemplate": "<string>"
}
'import requests
url = "https://api.kameleoon.com/studio-recommender-blocks/{studioRecommenderBlockId}"
payload = {
"code": "<string>",
"name": "<string>",
"recommenderBlockId": 123,
"siteId": 123,
"studioCss": "<string>",
"studioTemplate": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
code: '<string>',
name: '<string>',
recommenderBlockId: 123,
siteId: 123,
studioCss: '<string>',
studioTemplate: '<string>'
})
};
fetch('https://api.kameleoon.com/studio-recommender-blocks/{studioRecommenderBlockId}', 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/studio-recommender-blocks/{studioRecommenderBlockId}",
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([
'code' => '<string>',
'name' => '<string>',
'recommenderBlockId' => 123,
'siteId' => 123,
'studioCss' => '<string>',
'studioTemplate' => '<string>'
]),
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://api.kameleoon.com/studio-recommender-blocks/{studioRecommenderBlockId}"
payload := strings.NewReader("{\n \"code\": \"<string>\",\n \"name\": \"<string>\",\n \"recommenderBlockId\": 123,\n \"siteId\": 123,\n \"studioCss\": \"<string>\",\n \"studioTemplate\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.kameleoon.com/studio-recommender-blocks/{studioRecommenderBlockId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"code\": \"<string>\",\n \"name\": \"<string>\",\n \"recommenderBlockId\": 123,\n \"siteId\": 123,\n \"studioCss\": \"<string>\",\n \"studioTemplate\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kameleoon.com/studio-recommender-blocks/{studioRecommenderBlockId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"code\": \"<string>\",\n \"name\": \"<string>\",\n \"recommenderBlockId\": 123,\n \"siteId\": 123,\n \"studioCss\": \"<string>\",\n \"studioTemplate\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"siteId": 123,
"code": "<string>",
"createdById": 123,
"dateCreated": "2023-11-07T05:31:56Z",
"dateModified": "2023-11-07T05:31:56Z",
"id": 123,
"name": "<string>",
"recommenderBlockId": 123,
"studioCss": "<string>",
"studioTemplate": "<string>"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"status": "SUCCESS",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"status": "SUCCESS",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"status": "SUCCESS",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"status": "SUCCESS",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"status": "SUCCESS",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"status": "SUCCESS",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"status": "SUCCESS",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"status": "SUCCESS",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}Partially update recommender block
Update several fields of recommender block
curl --request PATCH \
--url https://api.kameleoon.com/studio-recommender-blocks/{studioRecommenderBlockId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"code": "<string>",
"name": "<string>",
"recommenderBlockId": 123,
"siteId": 123,
"studioCss": "<string>",
"studioTemplate": "<string>"
}
'import requests
url = "https://api.kameleoon.com/studio-recommender-blocks/{studioRecommenderBlockId}"
payload = {
"code": "<string>",
"name": "<string>",
"recommenderBlockId": 123,
"siteId": 123,
"studioCss": "<string>",
"studioTemplate": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
code: '<string>',
name: '<string>',
recommenderBlockId: 123,
siteId: 123,
studioCss: '<string>',
studioTemplate: '<string>'
})
};
fetch('https://api.kameleoon.com/studio-recommender-blocks/{studioRecommenderBlockId}', 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/studio-recommender-blocks/{studioRecommenderBlockId}",
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([
'code' => '<string>',
'name' => '<string>',
'recommenderBlockId' => 123,
'siteId' => 123,
'studioCss' => '<string>',
'studioTemplate' => '<string>'
]),
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://api.kameleoon.com/studio-recommender-blocks/{studioRecommenderBlockId}"
payload := strings.NewReader("{\n \"code\": \"<string>\",\n \"name\": \"<string>\",\n \"recommenderBlockId\": 123,\n \"siteId\": 123,\n \"studioCss\": \"<string>\",\n \"studioTemplate\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.kameleoon.com/studio-recommender-blocks/{studioRecommenderBlockId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"code\": \"<string>\",\n \"name\": \"<string>\",\n \"recommenderBlockId\": 123,\n \"siteId\": 123,\n \"studioCss\": \"<string>\",\n \"studioTemplate\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kameleoon.com/studio-recommender-blocks/{studioRecommenderBlockId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"code\": \"<string>\",\n \"name\": \"<string>\",\n \"recommenderBlockId\": 123,\n \"siteId\": 123,\n \"studioCss\": \"<string>\",\n \"studioTemplate\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"siteId": 123,
"code": "<string>",
"createdById": 123,
"dateCreated": "2023-11-07T05:31:56Z",
"dateModified": "2023-11-07T05:31:56Z",
"id": 123,
"name": "<string>",
"recommenderBlockId": 123,
"studioCss": "<string>",
"studioTemplate": "<string>"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"status": "SUCCESS",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"status": "SUCCESS",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"status": "SUCCESS",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"status": "SUCCESS",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"status": "SUCCESS",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"status": "SUCCESS",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"status": "SUCCESS",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"impersonator": "<string>",
"message": "<string>",
"name": "<string>",
"status": "SUCCESS",
"sub": "<string>",
"time": 123,
"timestamp": "2023-11-07T05:31:56Z"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The ID of the widget studio template object
Body
Studio recommender block code that is associated with this recommender block
Studio recommender block name that is associated with this recommender block
Studio recommender block id that is associated with this recommender block
The website id that a recommender block belongs to
Studio recommender block Css that is associated with this recommender block
Studio recommender block instruction that is associated with this recommender block
Response
OK
The website id that an studio recommender block belongs to
Studio recommender block code that is associated with this recommender block
Account id to whom created this recommender block
Date and time a record is created
Date and time a record is modified
The unique identifier of the given studio recommender block
Studio recommender block name that is associated with this recommender block
Recommender block id that is associated with this recommender block
Studio recommender block Css that is associated with this recommender block
Studio recommender block data that is associated with this recommender block
Was this page helpful?