Skip to content
CCPEDIAby Unity Nodes
Documentation/Canton Network Docs/Splice APIsValidator APIsWallet API (External)View on Canton Network Docs

POST /v0/wallet/buy-traffic-requests/:tracking_id/status

POST
/
api
/
validator
/
v0
/
wallet
/
buy-traffic-requests
/
{tracking_id}
/
status
Try it
cURL
Python
JavaScript
PHP
Go
Java
Ruby
curl --request POST \
  --url 'https://example.com/api/validator/v0/wallet/buy-traffic-requests/{tracking_id}/status' \
  --header 'Authorization: Bearer $TOKEN'
import json
import requests

url = "https://example.com/api/validator/v0/wallet/buy-traffic-requests/{tracking_id}/status"
headers = {'Authorization': 'Bearer <token>'}
response = requests.request("POST", url, headers=headers)

print(response.text)
const response = await fetch('https://example.com/api/validator/v0/wallet/buy-traffic-requests/{tracking_id}/status', {
  method: 'POST',
  headers: {
  "Authorization": "Bearer <token>"
},
});

console.log(await response.text());
<?php
$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => 'https://example.com/api/validator/v0/wallet/buy-traffic-requests/{tracking_id}/status',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer <token>"
    ],
]);

$response = curl_exec($curl);
echo $response;
package main

import (
  "fmt"
  "io"
  "net/http"
)

func main() {
  req, _ := http.NewRequest("POST", "https://example.com/api/validator/v0/wallet/buy-traffic-requests/{tracking_id}/status", nil)
  req.Header.Set("Authorization", "Bearer <token>")
  response, _ := http.DefaultClient.Do(req)
  defer response.Body.Close()
  body, _ := io.ReadAll(response.Body)
  fmt.Println(string(body))
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

var request = HttpRequest.newBuilder()
    .uri(URI.create("https://example.com/api/validator/v0/wallet/buy-traffic-requests/{tracking_id}/status"))
    .header("Authorization", "Bearer <token>")
    .method("POST", HttpRequest.BodyPublishers.noBody())
    .build();
var response = HttpClient.newHttpClient().send(
    request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
require 'net/http'
require 'uri'

uri = URI('https://example.com/api/validator/v0/wallet/buy-traffic-requests/{tracking_id}/status')
request = Net::HTTP::Post.new(uri)
request['Authorization'] = 'Bearer <token>'
response = Net::HTTP.start(uri.hostname, uri.port) do |http|
  http.request(request)
end
puts response.body
200
404
{
  "status": "<string>"
}
{
  "error": "<string>"
}

Check the status of a buy traffic request with a given tracking id.

OpenAPI
cURL
Python
JavaScript
PHP
Go
Java
Ruby
curl --request POST \
  --url 'https://example.com/api/validator/v0/wallet/buy-traffic-requests/{tracking_id}/status' \
  --header 'Authorization: Bearer $TOKEN'
import json
import requests

url = "https://example.com/api/validator/v0/wallet/buy-traffic-requests/{tracking_id}/status"
headers = {'Authorization': 'Bearer <token>'}
response = requests.request("POST", url, headers=headers)

print(response.text)
const response = await fetch('https://example.com/api/validator/v0/wallet/buy-traffic-requests/{tracking_id}/status', {
  method: 'POST',
  headers: {
  "Authorization": "Bearer <token>"
},
});

console.log(await response.text());
<?php
$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => 'https://example.com/api/validator/v0/wallet/buy-traffic-requests/{tracking_id}/status',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer <token>"
    ],
]);

$response = curl_exec($curl);
echo $response;
package main

import (
  "fmt"
  "io"
  "net/http"
)

func main() {
  req, _ := http.NewRequest("POST", "https://example.com/api/validator/v0/wallet/buy-traffic-requests/{tracking_id}/status", nil)
  req.Header.Set("Authorization", "Bearer <token>")
  response, _ := http.DefaultClient.Do(req)
  defer response.Body.Close()
  body, _ := io.ReadAll(response.Body)
  fmt.Println(string(body))
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

var request = HttpRequest.newBuilder()
    .uri(URI.create("https://example.com/api/validator/v0/wallet/buy-traffic-requests/{tracking_id}/status"))
    .header("Authorization", "Bearer <token>")
    .method("POST", HttpRequest.BodyPublishers.noBody())
    .build();
var response = HttpClient.newHttpClient().send(
    request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
require 'net/http'
require 'uri'

uri = URI('https://example.com/api/validator/v0/wallet/buy-traffic-requests/{tracking_id}/status')
request = Net::HTTP::Post.new(uri)
request['Authorization'] = 'Bearer <token>'
response = Net::HTTP.start(uri.hostname, uri.port) do |http|
  http.request(request)
end
puts response.body
200
404
{
  "status": "<string>"
}
{
  "error": "<string>"
}

Authorizations

walletUserAuth

Authorization
string
required
HTTP bearer authentication. Send the token as Authorization: Bearer &lt;token&gt;. Bearer format: JWT. JWT token as described by the spliceAppBearerAuth security scheme. The subject of the token must be ledger API user of the user whose wallet the endpoint affects.

Path parameters

tracking_id
string
required

Responses

200

A request to buy traffic with this tracking id has been submitted before, check the response for details.
application/json
value
GetBuyTrafficRequestStatusResponse
required

Show child attributes

BuyTrafficRequestCreatedResponse
BuyTrafficRequestCreatedResponse

Show child attributes

status
string
required
The status of the traffic request created: The request to buy traffic has been created and is waiting for the wallet automation to pick it up. completed: The traffic has been purchased. transaction_id points to the transaction that purchased traffic. failed: The request to buy traffic has failed permanently and no CC has been transferred. Refer to failure_reason for details. Use a new tracking_id if you want to retry buying traffic.
BuyTrafficRequestCompletedResponse
BuyTrafficRequestCompletedResponse

Show child attributes

status
string
required
The status of the traffic request created: The request to buy traffic has been created and is waiting for the wallet automation to pick it up. completed: The traffic has been purchased. transaction_id points to the transaction that purchased traffic. failed: The request to buy traffic has failed permanently and no CC has been transferred. Refer to failure_reason for details. Use a new tracking_id if you want to retry buying traffic.
transaction_id
string
required
Id of the transaction that purchased traffic.
BuyTrafficRequestFailedResponse
BuyTrafficRequestFailedResponse

Show child attributes

status
string
required
The status of the traffic request created: The request to buy traffic has been created and is waiting for the wallet automation to pick it up. completed: The traffic has been purchased. transaction_id points to the transaction that purchased traffic. failed: The request to buy traffic has failed permanently and no CC has been transferred. Refer to failure_reason for details. Use a new tracking_id if you want to retry buying traffic.
failure_reason
string
required
The reason for the failure of the request to buy traffic. expired: The wallet automation did not process the request in time. rejected: The wallet automation rejected the request, e.g., due to insufficient funds or operational reasons.Allowed values: expired, rejected.
rejection_reason
string
Human readable description of the rejection reason.

404

No request with this tracking id was found.
application/json
error
string
required