curl --request PATCH \
--url https://backend.swap.coffee/v1/cashback/{id} \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"title": "<string>",
"description": "<string>",
"distributor": "EQCZ_pV6EJNSr6XpvPaa-IVkT6ImqkiPftRMOICJP1B_75wZ",
"reward_token": "EQCZ_pV6EJNSr6XpvPaa-IVkT6ImqkiPftRMOICJP1B_75wZ",
"conditions": [
{
"args": [
"<string>"
]
}
],
"distribute": 123,
"distributed": 123,
"start_time_seconds": 123,
"end_time_seconds": 123,
"reward_denominator": 123,
"is_hidden": true,
"limits": [
{
"limit_id": 123,
"interval_duration_seconds": 123,
"max_distribute_at_interval": 123
}
],
"image_url": "<string>",
"references": [
{
"ref_name": "<string>",
"ref_url": "<string>"
}
]
}
'import requests
url = "https://backend.swap.coffee/v1/cashback/{id}"
payload = {
"title": "<string>",
"description": "<string>",
"distributor": "EQCZ_pV6EJNSr6XpvPaa-IVkT6ImqkiPftRMOICJP1B_75wZ",
"reward_token": "EQCZ_pV6EJNSr6XpvPaa-IVkT6ImqkiPftRMOICJP1B_75wZ",
"conditions": [{ "args": ["<string>"] }],
"distribute": 123,
"distributed": 123,
"start_time_seconds": 123,
"end_time_seconds": 123,
"reward_denominator": 123,
"is_hidden": True,
"limits": [
{
"limit_id": 123,
"interval_duration_seconds": 123,
"max_distribute_at_interval": 123
}
],
"image_url": "<string>",
"references": [
{
"ref_name": "<string>",
"ref_url": "<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({
title: '<string>',
description: '<string>',
distributor: 'EQCZ_pV6EJNSr6XpvPaa-IVkT6ImqkiPftRMOICJP1B_75wZ',
reward_token: 'EQCZ_pV6EJNSr6XpvPaa-IVkT6ImqkiPftRMOICJP1B_75wZ',
conditions: [{args: ['<string>']}],
distribute: 123,
distributed: 123,
start_time_seconds: 123,
end_time_seconds: 123,
reward_denominator: 123,
is_hidden: true,
limits: [
{limit_id: 123, interval_duration_seconds: 123, max_distribute_at_interval: 123}
],
image_url: '<string>',
references: [{ref_name: '<string>', ref_url: '<string>'}]
})
};
fetch('https://backend.swap.coffee/v1/cashback/{id}', 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://backend.swap.coffee/v1/cashback/{id}",
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([
'title' => '<string>',
'description' => '<string>',
'distributor' => 'EQCZ_pV6EJNSr6XpvPaa-IVkT6ImqkiPftRMOICJP1B_75wZ',
'reward_token' => 'EQCZ_pV6EJNSr6XpvPaa-IVkT6ImqkiPftRMOICJP1B_75wZ',
'conditions' => [
[
'args' => [
'<string>'
]
]
],
'distribute' => 123,
'distributed' => 123,
'start_time_seconds' => 123,
'end_time_seconds' => 123,
'reward_denominator' => 123,
'is_hidden' => true,
'limits' => [
[
'limit_id' => 123,
'interval_duration_seconds' => 123,
'max_distribute_at_interval' => 123
]
],
'image_url' => '<string>',
'references' => [
[
'ref_name' => '<string>',
'ref_url' => '<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://backend.swap.coffee/v1/cashback/{id}"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"distributor\": \"EQCZ_pV6EJNSr6XpvPaa-IVkT6ImqkiPftRMOICJP1B_75wZ\",\n \"reward_token\": \"EQCZ_pV6EJNSr6XpvPaa-IVkT6ImqkiPftRMOICJP1B_75wZ\",\n \"conditions\": [\n {\n \"args\": [\n \"<string>\"\n ]\n }\n ],\n \"distribute\": 123,\n \"distributed\": 123,\n \"start_time_seconds\": 123,\n \"end_time_seconds\": 123,\n \"reward_denominator\": 123,\n \"is_hidden\": true,\n \"limits\": [\n {\n \"limit_id\": 123,\n \"interval_duration_seconds\": 123,\n \"max_distribute_at_interval\": 123\n }\n ],\n \"image_url\": \"<string>\",\n \"references\": [\n {\n \"ref_name\": \"<string>\",\n \"ref_url\": \"<string>\"\n }\n ]\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://backend.swap.coffee/v1/cashback/{id}")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"distributor\": \"EQCZ_pV6EJNSr6XpvPaa-IVkT6ImqkiPftRMOICJP1B_75wZ\",\n \"reward_token\": \"EQCZ_pV6EJNSr6XpvPaa-IVkT6ImqkiPftRMOICJP1B_75wZ\",\n \"conditions\": [\n {\n \"args\": [\n \"<string>\"\n ]\n }\n ],\n \"distribute\": 123,\n \"distributed\": 123,\n \"start_time_seconds\": 123,\n \"end_time_seconds\": 123,\n \"reward_denominator\": 123,\n \"is_hidden\": true,\n \"limits\": [\n {\n \"limit_id\": 123,\n \"interval_duration_seconds\": 123,\n \"max_distribute_at_interval\": 123\n }\n ],\n \"image_url\": \"<string>\",\n \"references\": [\n {\n \"ref_name\": \"<string>\",\n \"ref_url\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://backend.swap.coffee/v1/cashback/{id}")
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 \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"distributor\": \"EQCZ_pV6EJNSr6XpvPaa-IVkT6ImqkiPftRMOICJP1B_75wZ\",\n \"reward_token\": \"EQCZ_pV6EJNSr6XpvPaa-IVkT6ImqkiPftRMOICJP1B_75wZ\",\n \"conditions\": [\n {\n \"args\": [\n \"<string>\"\n ]\n }\n ],\n \"distribute\": 123,\n \"distributed\": 123,\n \"start_time_seconds\": 123,\n \"end_time_seconds\": 123,\n \"reward_denominator\": 123,\n \"is_hidden\": true,\n \"limits\": [\n {\n \"limit_id\": 123,\n \"interval_duration_seconds\": 123,\n \"max_distribute_at_interval\": 123\n }\n ],\n \"image_url\": \"<string>\",\n \"references\": [\n {\n \"ref_name\": \"<string>\",\n \"ref_url\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"title": "<string>",
"description": "<string>",
"distributor": "EQCZ_pV6EJNSr6XpvPaa-IVkT6ImqkiPftRMOICJP1B_75wZ",
"reward_token": "EQCZ_pV6EJNSr6XpvPaa-IVkT6ImqkiPftRMOICJP1B_75wZ",
"conditions": [
{
"args": [
"<string>"
]
}
],
"distribute": 123,
"distributed": 123,
"start_time_seconds": 123,
"end_time_seconds": 123,
"reward_denominator": 123,
"is_active": true,
"limits": [
{
"limit_id": 123,
"interval_duration_seconds": 123,
"max_distribute_at_interval": 123
}
],
"image_url": "<string>",
"references": [
{
"ref_name": "<string>",
"ref_url": "<string>"
}
],
"is_hidden": true
}{
"error": "<string>"
}Update cashback information. For internal usage only
curl --request PATCH \
--url https://backend.swap.coffee/v1/cashback/{id} \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"title": "<string>",
"description": "<string>",
"distributor": "EQCZ_pV6EJNSr6XpvPaa-IVkT6ImqkiPftRMOICJP1B_75wZ",
"reward_token": "EQCZ_pV6EJNSr6XpvPaa-IVkT6ImqkiPftRMOICJP1B_75wZ",
"conditions": [
{
"args": [
"<string>"
]
}
],
"distribute": 123,
"distributed": 123,
"start_time_seconds": 123,
"end_time_seconds": 123,
"reward_denominator": 123,
"is_hidden": true,
"limits": [
{
"limit_id": 123,
"interval_duration_seconds": 123,
"max_distribute_at_interval": 123
}
],
"image_url": "<string>",
"references": [
{
"ref_name": "<string>",
"ref_url": "<string>"
}
]
}
'import requests
url = "https://backend.swap.coffee/v1/cashback/{id}"
payload = {
"title": "<string>",
"description": "<string>",
"distributor": "EQCZ_pV6EJNSr6XpvPaa-IVkT6ImqkiPftRMOICJP1B_75wZ",
"reward_token": "EQCZ_pV6EJNSr6XpvPaa-IVkT6ImqkiPftRMOICJP1B_75wZ",
"conditions": [{ "args": ["<string>"] }],
"distribute": 123,
"distributed": 123,
"start_time_seconds": 123,
"end_time_seconds": 123,
"reward_denominator": 123,
"is_hidden": True,
"limits": [
{
"limit_id": 123,
"interval_duration_seconds": 123,
"max_distribute_at_interval": 123
}
],
"image_url": "<string>",
"references": [
{
"ref_name": "<string>",
"ref_url": "<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({
title: '<string>',
description: '<string>',
distributor: 'EQCZ_pV6EJNSr6XpvPaa-IVkT6ImqkiPftRMOICJP1B_75wZ',
reward_token: 'EQCZ_pV6EJNSr6XpvPaa-IVkT6ImqkiPftRMOICJP1B_75wZ',
conditions: [{args: ['<string>']}],
distribute: 123,
distributed: 123,
start_time_seconds: 123,
end_time_seconds: 123,
reward_denominator: 123,
is_hidden: true,
limits: [
{limit_id: 123, interval_duration_seconds: 123, max_distribute_at_interval: 123}
],
image_url: '<string>',
references: [{ref_name: '<string>', ref_url: '<string>'}]
})
};
fetch('https://backend.swap.coffee/v1/cashback/{id}', 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://backend.swap.coffee/v1/cashback/{id}",
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([
'title' => '<string>',
'description' => '<string>',
'distributor' => 'EQCZ_pV6EJNSr6XpvPaa-IVkT6ImqkiPftRMOICJP1B_75wZ',
'reward_token' => 'EQCZ_pV6EJNSr6XpvPaa-IVkT6ImqkiPftRMOICJP1B_75wZ',
'conditions' => [
[
'args' => [
'<string>'
]
]
],
'distribute' => 123,
'distributed' => 123,
'start_time_seconds' => 123,
'end_time_seconds' => 123,
'reward_denominator' => 123,
'is_hidden' => true,
'limits' => [
[
'limit_id' => 123,
'interval_duration_seconds' => 123,
'max_distribute_at_interval' => 123
]
],
'image_url' => '<string>',
'references' => [
[
'ref_name' => '<string>',
'ref_url' => '<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://backend.swap.coffee/v1/cashback/{id}"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"distributor\": \"EQCZ_pV6EJNSr6XpvPaa-IVkT6ImqkiPftRMOICJP1B_75wZ\",\n \"reward_token\": \"EQCZ_pV6EJNSr6XpvPaa-IVkT6ImqkiPftRMOICJP1B_75wZ\",\n \"conditions\": [\n {\n \"args\": [\n \"<string>\"\n ]\n }\n ],\n \"distribute\": 123,\n \"distributed\": 123,\n \"start_time_seconds\": 123,\n \"end_time_seconds\": 123,\n \"reward_denominator\": 123,\n \"is_hidden\": true,\n \"limits\": [\n {\n \"limit_id\": 123,\n \"interval_duration_seconds\": 123,\n \"max_distribute_at_interval\": 123\n }\n ],\n \"image_url\": \"<string>\",\n \"references\": [\n {\n \"ref_name\": \"<string>\",\n \"ref_url\": \"<string>\"\n }\n ]\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://backend.swap.coffee/v1/cashback/{id}")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"distributor\": \"EQCZ_pV6EJNSr6XpvPaa-IVkT6ImqkiPftRMOICJP1B_75wZ\",\n \"reward_token\": \"EQCZ_pV6EJNSr6XpvPaa-IVkT6ImqkiPftRMOICJP1B_75wZ\",\n \"conditions\": [\n {\n \"args\": [\n \"<string>\"\n ]\n }\n ],\n \"distribute\": 123,\n \"distributed\": 123,\n \"start_time_seconds\": 123,\n \"end_time_seconds\": 123,\n \"reward_denominator\": 123,\n \"is_hidden\": true,\n \"limits\": [\n {\n \"limit_id\": 123,\n \"interval_duration_seconds\": 123,\n \"max_distribute_at_interval\": 123\n }\n ],\n \"image_url\": \"<string>\",\n \"references\": [\n {\n \"ref_name\": \"<string>\",\n \"ref_url\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://backend.swap.coffee/v1/cashback/{id}")
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 \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"distributor\": \"EQCZ_pV6EJNSr6XpvPaa-IVkT6ImqkiPftRMOICJP1B_75wZ\",\n \"reward_token\": \"EQCZ_pV6EJNSr6XpvPaa-IVkT6ImqkiPftRMOICJP1B_75wZ\",\n \"conditions\": [\n {\n \"args\": [\n \"<string>\"\n ]\n }\n ],\n \"distribute\": 123,\n \"distributed\": 123,\n \"start_time_seconds\": 123,\n \"end_time_seconds\": 123,\n \"reward_denominator\": 123,\n \"is_hidden\": true,\n \"limits\": [\n {\n \"limit_id\": 123,\n \"interval_duration_seconds\": 123,\n \"max_distribute_at_interval\": 123\n }\n ],\n \"image_url\": \"<string>\",\n \"references\": [\n {\n \"ref_name\": \"<string>\",\n \"ref_url\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"title": "<string>",
"description": "<string>",
"distributor": "EQCZ_pV6EJNSr6XpvPaa-IVkT6ImqkiPftRMOICJP1B_75wZ",
"reward_token": "EQCZ_pV6EJNSr6XpvPaa-IVkT6ImqkiPftRMOICJP1B_75wZ",
"conditions": [
{
"args": [
"<string>"
]
}
],
"distribute": 123,
"distributed": 123,
"start_time_seconds": 123,
"end_time_seconds": 123,
"reward_denominator": 123,
"is_active": true,
"limits": [
{
"limit_id": 123,
"interval_duration_seconds": 123,
"max_distribute_at_interval": 123
}
],
"image_url": "<string>",
"references": [
{
"ref_name": "<string>",
"ref_url": "<string>"
}
],
"is_hidden": true
}{
"error": "<string>"
}Authorizations
Path Parameters
Body
Where rewards stored
"EQCZ_pV6EJNSr6XpvPaa-IVkT6ImqkiPftRMOICJP1B_75wZ"
"EQCZ_pV6EJNSr6XpvPaa-IVkT6ImqkiPftRMOICJP1B_75wZ"
Show child attributes
Show child attributes
How many tokens will be distributed to users
How many tokens already distributed to users
Begin cashback promo in unix seconds
End cashback promo in unix seconds
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
Created cashback
Where rewards stored
"EQCZ_pV6EJNSr6XpvPaa-IVkT6ImqkiPftRMOICJP1B_75wZ"
"EQCZ_pV6EJNSr6XpvPaa-IVkT6ImqkiPftRMOICJP1B_75wZ"
Show child attributes
Show child attributes
How many tokens will be distributed to users
How many tokens already distributed to users
Begin cashback promo in unix seconds
End cashback promo in unix seconds
Can this cashback program accrue tokens to participants
Show child attributes
Show child attributes
Show child attributes
Show child attributes