Giới thiệu
Tạo hoặc cập nhật mã giới thiệu và tỷ lệ rebate
Tạo hoặc cập nhật mã giới thiệu và tỷ lệ rebate
POST
https://api-gw.verolabs.co
/
api
/
v1
/
referral
/
refcode
Tạo hoặc cập nhật mã giới thiệu và tỷ lệ rebate
curl --request POST \
--url https://api-gw.verolabs.co/api/v1/referral/refcode \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"refCode": "<string>",
"rebateRate": 0.5
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({refCode: '<string>', rebateRate: 0.5})
};
fetch('https://api-gw.verolabs.co/api/v1/referral/refcode', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api-gw.verolabs.co/api/v1/referral/refcode"
payload = {
"refCode": "<string>",
"rebateRate": 0.5
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-gw.verolabs.co/api/v1/referral/refcode"
payload := strings.NewReader("{\n \"refCode\": \"<string>\",\n \"rebateRate\": 0.5\n}")
req, _ := http.NewRequest("POST", 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))
}using RestSharp;
var options = new RestClientOptions("https://api-gw.verolabs.co/api/v1/referral/refcode");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"refCode\": \"<string>\",\n \"rebateRate\": 0.5\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);falseCURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_WRITEDATA, stdout);
curl_easy_setopt(hnd, CURLOPT_URL, "https://api-gw.verolabs.co/api/v1/referral/refcode");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Authorization: Bearer <token>");
headers = curl_slist_append(headers, "Content-Type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"refCode\": \"<string>\",\n \"rebateRate\": 0.5\n}");
CURLcode ret = curl_easy_perform(hnd);{
"status": "<string>",
"message": "<string>",
"refCode": "<string>",
"ownerAccountId": "<string>",
"rebateRate": 123
}{
"error": "<string>",
"message": "<string>",
"detail": "<string>",
"details": "<string>",
"status": 123
}{
"error": "<string>",
"message": "<string>",
"detail": "<string>",
"details": "<string>",
"status": 123
}{
"error": "<string>",
"message": "<string>",
"detail": "<string>",
"details": "<string>",
"status": 123
}{
"error": "<string>",
"message": "<string>",
"detail": "<string>",
"details": "<string>",
"status": 123
}Ủy quyền
Bearer token used for protected REST API requests.
Nội dung
application/json
Referral code payload. refCode is required and rebateRate must be between 0 and 1.
⌘I
Tạo hoặc cập nhật mã giới thiệu và tỷ lệ rebate
curl --request POST \
--url https://api-gw.verolabs.co/api/v1/referral/refcode \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"refCode": "<string>",
"rebateRate": 0.5
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({refCode: '<string>', rebateRate: 0.5})
};
fetch('https://api-gw.verolabs.co/api/v1/referral/refcode', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api-gw.verolabs.co/api/v1/referral/refcode"
payload = {
"refCode": "<string>",
"rebateRate": 0.5
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-gw.verolabs.co/api/v1/referral/refcode"
payload := strings.NewReader("{\n \"refCode\": \"<string>\",\n \"rebateRate\": 0.5\n}")
req, _ := http.NewRequest("POST", 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))
}using RestSharp;
var options = new RestClientOptions("https://api-gw.verolabs.co/api/v1/referral/refcode");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"refCode\": \"<string>\",\n \"rebateRate\": 0.5\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);falseCURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_WRITEDATA, stdout);
curl_easy_setopt(hnd, CURLOPT_URL, "https://api-gw.verolabs.co/api/v1/referral/refcode");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Authorization: Bearer <token>");
headers = curl_slist_append(headers, "Content-Type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"refCode\": \"<string>\",\n \"rebateRate\": 0.5\n}");
CURLcode ret = curl_easy_perform(hnd);{
"status": "<string>",
"message": "<string>",
"refCode": "<string>",
"ownerAccountId": "<string>",
"rebateRate": 123
}{
"error": "<string>",
"message": "<string>",
"detail": "<string>",
"details": "<string>",
"status": 123
}{
"error": "<string>",
"message": "<string>",
"detail": "<string>",
"details": "<string>",
"status": 123
}{
"error": "<string>",
"message": "<string>",
"detail": "<string>",
"details": "<string>",
"status": 123
}{
"error": "<string>",
"message": "<string>",
"detail": "<string>",
"details": "<string>",
"status": 123
}
