Update offer slugs
curl --request PATCH \
--url https://app.zenedu.io/api/v1/bot/{bot}/offers/{entity}/slugs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"landing_slug": "<string>",
"bot_slug": "<string>"
}
'import requests
url = "https://app.zenedu.io/api/v1/bot/{bot}/offers/{entity}/slugs"
payload = {
"landing_slug": "<string>",
"bot_slug": "<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({landing_slug: '<string>', bot_slug: '<string>'})
};
fetch('https://app.zenedu.io/api/v1/bot/{bot}/offers/{entity}/slugs', 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://app.zenedu.io/api/v1/bot/{bot}/offers/{entity}/slugs",
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([
'landing_slug' => '<string>',
'bot_slug' => '<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://app.zenedu.io/api/v1/bot/{bot}/offers/{entity}/slugs"
payload := strings.NewReader("{\n \"landing_slug\": \"<string>\",\n \"bot_slug\": \"<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://app.zenedu.io/api/v1/bot/{bot}/offers/{entity}/slugs")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"landing_slug\": \"<string>\",\n \"bot_slug\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.zenedu.io/api/v1/bot/{bot}/offers/{entity}/slugs")
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 \"landing_slug\": \"<string>\",\n \"bot_slug\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 123,
"name": "<string>",
"price": 123,
"currency": "<string>",
"is_active": true,
"is_subscription": true,
"accesses_count": 123,
"description": "<string>",
"landing_name": "<string>",
"landing_description": "<string>",
"cover_url": "<string>",
"bot_image_url": "<string>",
"thankyou_image_url": "<string>",
"request_contacts": true,
"time_limit_enabled": true,
"usage_limit_enabled": true,
"access_limit_enabled": true,
"created_at": "2023-11-07T05:31:56Z",
"bot_slug": "<string>",
"landing_slug": "<string>",
"link": "<string>",
"landing_link": "<string>",
"direct_payment_links": [
{
"name": "<string>",
"link": "<string>"
}
]
}
}{
"message": "<string>",
"errors": {}
}{
"message": "<string>",
"errors": {}
}{
"message": "<string>",
"errors": {}
}{
"message": "<string>",
"errors": {}
}Слаги
Обновить слаги тарифа
Обновляет слаги публичных ссылок тарифа
PATCH
/
api
/
v1
/
bot
/
{bot}
/
offers
/
{entity}
/
slugs
Update offer slugs
curl --request PATCH \
--url https://app.zenedu.io/api/v1/bot/{bot}/offers/{entity}/slugs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"landing_slug": "<string>",
"bot_slug": "<string>"
}
'import requests
url = "https://app.zenedu.io/api/v1/bot/{bot}/offers/{entity}/slugs"
payload = {
"landing_slug": "<string>",
"bot_slug": "<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({landing_slug: '<string>', bot_slug: '<string>'})
};
fetch('https://app.zenedu.io/api/v1/bot/{bot}/offers/{entity}/slugs', 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://app.zenedu.io/api/v1/bot/{bot}/offers/{entity}/slugs",
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([
'landing_slug' => '<string>',
'bot_slug' => '<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://app.zenedu.io/api/v1/bot/{bot}/offers/{entity}/slugs"
payload := strings.NewReader("{\n \"landing_slug\": \"<string>\",\n \"bot_slug\": \"<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://app.zenedu.io/api/v1/bot/{bot}/offers/{entity}/slugs")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"landing_slug\": \"<string>\",\n \"bot_slug\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.zenedu.io/api/v1/bot/{bot}/offers/{entity}/slugs")
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 \"landing_slug\": \"<string>\",\n \"bot_slug\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 123,
"name": "<string>",
"price": 123,
"currency": "<string>",
"is_active": true,
"is_subscription": true,
"accesses_count": 123,
"description": "<string>",
"landing_name": "<string>",
"landing_description": "<string>",
"cover_url": "<string>",
"bot_image_url": "<string>",
"thankyou_image_url": "<string>",
"request_contacts": true,
"time_limit_enabled": true,
"usage_limit_enabled": true,
"access_limit_enabled": true,
"created_at": "2023-11-07T05:31:56Z",
"bot_slug": "<string>",
"landing_slug": "<string>",
"link": "<string>",
"landing_link": "<string>",
"direct_payment_links": [
{
"name": "<string>",
"link": "<string>"
}
]
}
}{
"message": "<string>",
"errors": {}
}{
"message": "<string>",
"errors": {}
}{
"message": "<string>",
"errors": {}
}{
"message": "<string>",
"errors": {}
}Авторизации
API token from the Zenedu dashboard
Тело
application/json
Ответ
Updated offer
Show child attributes
Show child attributes