Get cashbacks info
curl --request GET \
--url https://backend.swap.coffee/v1/cashback/ \
--header 'X-Api-Key: <api-key>'import requests
url = "https://backend.swap.coffee/v1/cashback/"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://backend.swap.coffee/v1/cashback/', 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/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://backend.swap.coffee/v1/cashback/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://backend.swap.coffee/v1/cashback/")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://backend.swap.coffee/v1/cashback/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"count": 123,
"infos": [
{
"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>"
}Cashback
Get cashbacks info
GET
/
v1
/
cashback
/
Get cashbacks info
curl --request GET \
--url https://backend.swap.coffee/v1/cashback/ \
--header 'X-Api-Key: <api-key>'import requests
url = "https://backend.swap.coffee/v1/cashback/"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://backend.swap.coffee/v1/cashback/', 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/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://backend.swap.coffee/v1/cashback/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://backend.swap.coffee/v1/cashback/")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://backend.swap.coffee/v1/cashback/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"count": 123,
"infos": [
{
"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
Query Parameters
Address, from which, token will be distributed to participants
Example:
"UQCNTO0Nh0Z7QNyRW1BLWfk08f2dAOw4izrx9sO6OUPg4DoV"
Cashback token
Example:
"EQCZ_pV6EJNSr6XpvPaa-IVkT6ImqkiPftRMOICJP1B_75wZ"
Filter out active promotions only
Required range:
1 <= x <= 100Required range:
x >= 1Transfer available in claim-center tokens from one account to another. For internal usage onlyCreate new cashback distribution. For internal usage only
⌘I