Approve earn provider terms of service
Approves earn provider terms of service for this workspace (one-time per tenant).
When isTermsApprovalRequired is true on a provider (see list providers),
call this once before creating or executing earn actions with providers that require it.
After success, GET /earn/providers reflects isTermsOfServiceApproved.
POST
/
earn
/
providers
/
approve_terms_of_service
TypeScript
const response: Promise<FireblocksResponse<void>> = fireblocks.earn.approveTermsOfService(earnApiApproveTermsOfServiceRequest);CompletableFuture<ApiResponse<Void>> response = fireblocks.earn().approveTermsOfService(idempotencyKey);response = fireblocks.earn.approve_terms_of_service(idempotency_key);curl --request POST \
--url https://api.fireblocks.io/v1/earn/providers/approve_terms_of_serviceconst options = {method: 'POST'};
fetch('https://api.fireblocks.io/v1/earn/providers/approve_terms_of_service', 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.fireblocks.io/v1/earn/providers/approve_terms_of_service",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$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://api.fireblocks.io/v1/earn/providers/approve_terms_of_service"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://api.fireblocks.io/v1/earn/providers/approve_terms_of_service")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"message": "<string>",
"code": 123
}{
"message": "<string>",
"code": 123
}{
"message": "<string>",
"code": 123
}{
"message": "<string>",
"code": 123
}{
"message": "<string>",
"code": 123
}{
"message": "<string>",
"code": 123
}Was this page helpful?
⌘I
TypeScript
const response: Promise<FireblocksResponse<void>> = fireblocks.earn.approveTermsOfService(earnApiApproveTermsOfServiceRequest);CompletableFuture<ApiResponse<Void>> response = fireblocks.earn().approveTermsOfService(idempotencyKey);response = fireblocks.earn.approve_terms_of_service(idempotency_key);curl --request POST \
--url https://api.fireblocks.io/v1/earn/providers/approve_terms_of_serviceconst options = {method: 'POST'};
fetch('https://api.fireblocks.io/v1/earn/providers/approve_terms_of_service', 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.fireblocks.io/v1/earn/providers/approve_terms_of_service",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$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://api.fireblocks.io/v1/earn/providers/approve_terms_of_service"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://api.fireblocks.io/v1/earn/providers/approve_terms_of_service")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"message": "<string>",
"code": 123
}{
"message": "<string>",
"code": 123
}{
"message": "<string>",
"code": 123
}{
"message": "<string>",
"code": 123
}{
"message": "<string>",
"code": 123
}{
"message": "<string>",
"code": 123
}