Patch google design
curl --request PATCH \
--url https://api.yume.cloud/v1/crm/loyalties/{id}/google-design/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"hex_background_color": "<string>",
"program_name": "<string>",
"rewards_tier": "<string>",
"rewards_tier_label": "<string>",
"secondary_rewards_tier": "<string>",
"secondary_rewards_tier_label": "<string>",
"account_id_label": "<string>",
"account_name_label": "<string>",
"program_logo": "<string>",
"hero_image": "<string>",
"text_modules": "<unknown>",
"links_module": "<unknown>"
}
'import requests
url = "https://api.yume.cloud/v1/crm/loyalties/{id}/google-design/"
payload = {
"hex_background_color": "<string>",
"program_name": "<string>",
"rewards_tier": "<string>",
"rewards_tier_label": "<string>",
"secondary_rewards_tier": "<string>",
"secondary_rewards_tier_label": "<string>",
"account_id_label": "<string>",
"account_name_label": "<string>",
"program_logo": "<string>",
"hero_image": "<string>",
"text_modules": "<unknown>",
"links_module": "<unknown>"
}
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({
hex_background_color: '<string>',
program_name: '<string>',
rewards_tier: '<string>',
rewards_tier_label: '<string>',
secondary_rewards_tier: '<string>',
secondary_rewards_tier_label: '<string>',
account_id_label: '<string>',
account_name_label: '<string>',
program_logo: '<string>',
hero_image: '<string>',
text_modules: '<unknown>',
links_module: '<unknown>'
})
};
fetch('https://api.yume.cloud/v1/crm/loyalties/{id}/google-design/', 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.yume.cloud/v1/crm/loyalties/{id}/google-design/",
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([
'hex_background_color' => '<string>',
'program_name' => '<string>',
'rewards_tier' => '<string>',
'rewards_tier_label' => '<string>',
'secondary_rewards_tier' => '<string>',
'secondary_rewards_tier_label' => '<string>',
'account_id_label' => '<string>',
'account_name_label' => '<string>',
'program_logo' => '<string>',
'hero_image' => '<string>',
'text_modules' => '<unknown>',
'links_module' => '<unknown>'
]),
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.yume.cloud/v1/crm/loyalties/{id}/google-design/"
payload := strings.NewReader("{\n \"hex_background_color\": \"<string>\",\n \"program_name\": \"<string>\",\n \"rewards_tier\": \"<string>\",\n \"rewards_tier_label\": \"<string>\",\n \"secondary_rewards_tier\": \"<string>\",\n \"secondary_rewards_tier_label\": \"<string>\",\n \"account_id_label\": \"<string>\",\n \"account_name_label\": \"<string>\",\n \"program_logo\": \"<string>\",\n \"hero_image\": \"<string>\",\n \"text_modules\": \"<unknown>\",\n \"links_module\": \"<unknown>\"\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.yume.cloud/v1/crm/loyalties/{id}/google-design/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"hex_background_color\": \"<string>\",\n \"program_name\": \"<string>\",\n \"rewards_tier\": \"<string>\",\n \"rewards_tier_label\": \"<string>\",\n \"secondary_rewards_tier\": \"<string>\",\n \"secondary_rewards_tier_label\": \"<string>\",\n \"account_id_label\": \"<string>\",\n \"account_name_label\": \"<string>\",\n \"program_logo\": \"<string>\",\n \"hero_image\": \"<string>\",\n \"text_modules\": \"<unknown>\",\n \"links_module\": \"<unknown>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.yume.cloud/v1/crm/loyalties/{id}/google-design/")
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 \"hex_background_color\": \"<string>\",\n \"program_name\": \"<string>\",\n \"rewards_tier\": \"<string>\",\n \"rewards_tier_label\": \"<string>\",\n \"secondary_rewards_tier\": \"<string>\",\n \"secondary_rewards_tier_label\": \"<string>\",\n \"account_id_label\": \"<string>\",\n \"account_name_label\": \"<string>\",\n \"program_logo\": \"<string>\",\n \"hero_image\": \"<string>\",\n \"text_modules\": \"<unknown>\",\n \"links_module\": \"<unknown>\"\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"loyalty": 123,
"program_logo": "<string>",
"hex_background_color": "<string>",
"program_name": "<string>",
"rewards_tier": "<string>",
"rewards_tier_label": "<string>",
"secondary_rewards_tier": "<string>",
"secondary_rewards_tier_label": "<string>",
"account_id_label": "<string>",
"account_name_label": "<string>",
"hero_image": "<string>",
"text_modules": "<unknown>",
"links_module": "<unknown>"
}loyalties
Patch google design
Shared GET/PATCH/DELETE logic for a single (loyalty, platform) design.
On first PATCH the row is auto-created so the form can save without an explicit POST step.
PATCH
/
v1
/
crm
/
loyalties
/
{id}
/
google-design
/
Patch google design
curl --request PATCH \
--url https://api.yume.cloud/v1/crm/loyalties/{id}/google-design/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"hex_background_color": "<string>",
"program_name": "<string>",
"rewards_tier": "<string>",
"rewards_tier_label": "<string>",
"secondary_rewards_tier": "<string>",
"secondary_rewards_tier_label": "<string>",
"account_id_label": "<string>",
"account_name_label": "<string>",
"program_logo": "<string>",
"hero_image": "<string>",
"text_modules": "<unknown>",
"links_module": "<unknown>"
}
'import requests
url = "https://api.yume.cloud/v1/crm/loyalties/{id}/google-design/"
payload = {
"hex_background_color": "<string>",
"program_name": "<string>",
"rewards_tier": "<string>",
"rewards_tier_label": "<string>",
"secondary_rewards_tier": "<string>",
"secondary_rewards_tier_label": "<string>",
"account_id_label": "<string>",
"account_name_label": "<string>",
"program_logo": "<string>",
"hero_image": "<string>",
"text_modules": "<unknown>",
"links_module": "<unknown>"
}
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({
hex_background_color: '<string>',
program_name: '<string>',
rewards_tier: '<string>',
rewards_tier_label: '<string>',
secondary_rewards_tier: '<string>',
secondary_rewards_tier_label: '<string>',
account_id_label: '<string>',
account_name_label: '<string>',
program_logo: '<string>',
hero_image: '<string>',
text_modules: '<unknown>',
links_module: '<unknown>'
})
};
fetch('https://api.yume.cloud/v1/crm/loyalties/{id}/google-design/', 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.yume.cloud/v1/crm/loyalties/{id}/google-design/",
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([
'hex_background_color' => '<string>',
'program_name' => '<string>',
'rewards_tier' => '<string>',
'rewards_tier_label' => '<string>',
'secondary_rewards_tier' => '<string>',
'secondary_rewards_tier_label' => '<string>',
'account_id_label' => '<string>',
'account_name_label' => '<string>',
'program_logo' => '<string>',
'hero_image' => '<string>',
'text_modules' => '<unknown>',
'links_module' => '<unknown>'
]),
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.yume.cloud/v1/crm/loyalties/{id}/google-design/"
payload := strings.NewReader("{\n \"hex_background_color\": \"<string>\",\n \"program_name\": \"<string>\",\n \"rewards_tier\": \"<string>\",\n \"rewards_tier_label\": \"<string>\",\n \"secondary_rewards_tier\": \"<string>\",\n \"secondary_rewards_tier_label\": \"<string>\",\n \"account_id_label\": \"<string>\",\n \"account_name_label\": \"<string>\",\n \"program_logo\": \"<string>\",\n \"hero_image\": \"<string>\",\n \"text_modules\": \"<unknown>\",\n \"links_module\": \"<unknown>\"\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.yume.cloud/v1/crm/loyalties/{id}/google-design/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"hex_background_color\": \"<string>\",\n \"program_name\": \"<string>\",\n \"rewards_tier\": \"<string>\",\n \"rewards_tier_label\": \"<string>\",\n \"secondary_rewards_tier\": \"<string>\",\n \"secondary_rewards_tier_label\": \"<string>\",\n \"account_id_label\": \"<string>\",\n \"account_name_label\": \"<string>\",\n \"program_logo\": \"<string>\",\n \"hero_image\": \"<string>\",\n \"text_modules\": \"<unknown>\",\n \"links_module\": \"<unknown>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.yume.cloud/v1/crm/loyalties/{id}/google-design/")
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 \"hex_background_color\": \"<string>\",\n \"program_name\": \"<string>\",\n \"rewards_tier\": \"<string>\",\n \"rewards_tier_label\": \"<string>\",\n \"secondary_rewards_tier\": \"<string>\",\n \"secondary_rewards_tier_label\": \"<string>\",\n \"account_id_label\": \"<string>\",\n \"account_name_label\": \"<string>\",\n \"program_logo\": \"<string>\",\n \"hero_image\": \"<string>\",\n \"text_modules\": \"<unknown>\",\n \"links_module\": \"<unknown>\"\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"loyalty": 123,
"program_logo": "<string>",
"hex_background_color": "<string>",
"program_name": "<string>",
"rewards_tier": "<string>",
"rewards_tier_label": "<string>",
"secondary_rewards_tier": "<string>",
"secondary_rewards_tier_label": "<string>",
"account_id_label": "<string>",
"account_name_label": "<string>",
"hero_image": "<string>",
"text_modules": "<unknown>",
"links_module": "<unknown>"
}Авторизации
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Заголовки
Компания, в контексте которой выполняется запрос — её id из GET /v1/tenant/. Пользователь должен состоять в этой компании: чужой id доступа к данным не даёт. Без заголовка компания определяется по домену запроса.
Параметры пути
Тело
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
Maximum string length:
7Pattern:
^#[0-9A-Fa-f]{6}$Maximum string length:
64Maximum string length:
7Maximum string length:
9Maximum string length:
7Maximum string length:
9Maximum string length:
15Maximum string length:
15Pattern:
(?:png|jpg|jpeg)$Pattern:
(?:png|jpg|jpeg)$Ответ
200 - application/json
Pattern:
(?:png|jpg|jpeg)$Maximum string length:
7Pattern:
^#[0-9A-Fa-f]{6}$Maximum string length:
64Maximum string length:
7Maximum string length:
9Maximum string length:
7Maximum string length:
9Maximum string length:
15Maximum string length:
15Pattern:
(?:png|jpg|jpeg)$