Network Tokens
Get token details
Retrieves details of a specific network token by its ID.
GET
/
api
/
network
/
tokens
/
{id}
Get token details
curl --request GET \
--url https://{instance}.{env}.on-hellgate.cloud/api/network/tokens/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://{instance}.{env}.on-hellgate.cloud/api/network/tokens/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{instance}.{env}.on-hellgate.cloud/api/network/tokens/{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://{instance}.{env}.on-hellgate.cloud/api/network/tokens/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://{instance}.{env}.on-hellgate.cloud/api/network/tokens/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{instance}.{env}.on-hellgate.cloud/api/network/tokens/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{instance}.{env}.on-hellgate.cloud/api/network/tokens/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "123e4567-e89b-12d3-a456-426614174000",
"created_at": "2023-10-01T12:00:00Z",
"card": {
"cardholder_name": "John Doe",
"expiry_month": 12,
"expiry_year": 2025,
"masked_account_number": "411111******1111",
"scheme": "visa"
},
"network_token": {
"status": "active",
"type": "vts"
},
"pci_token_id": "42510fee-ee8a-4377-a6e9-8aca381578ea"
}{
"code": 401,
"message": "No valid means of authentication was provided",
"classifier": "UNAUTHORIZED"
}{
"code": 403,
"message": "Not allowed to access this resource or feature",
"classifier": "FORBIDDEN"
}{
"code": 404,
"message": "The requested resource was not found.",
"classifier": "NOT_FOUND"
}Authorizations
bearerAuthAPIKey
JWT bearer token obtained via the OAuth2 client-credentials grant from the platform Authentication API. The token's scopes gate the endpoints it may call, and its audience names the Guardian instance. This is the standard way to authenticate to Guardian.
Path Parameters
The ID of the token to retrieve.
Response
Success response.
Example:
"123e4567-e89b-12d3-a456-426614174000"
Show child attributes
Show child attributes
Example:
{
"cardholder_name": "John Doe",
"expiry_month": 12,
"expiry_year": 2025,
"masked_account_number": "411111******1111",
"scheme": "visa"
}
Example:
"2023-10-01T12:00:00Z"
Show child attributes
Show child attributes
The ID of the PCI token that represents the card
Metadata consisting of key-value entries.
- Maximum 20 key-value pairs.
- Maximum 20 characters per key.
- Maximum 80 characters per value.
Example:
{ "order_ref": "order-1234567890" }
⌘I
Get token details
curl --request GET \
--url https://{instance}.{env}.on-hellgate.cloud/api/network/tokens/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://{instance}.{env}.on-hellgate.cloud/api/network/tokens/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{instance}.{env}.on-hellgate.cloud/api/network/tokens/{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://{instance}.{env}.on-hellgate.cloud/api/network/tokens/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://{instance}.{env}.on-hellgate.cloud/api/network/tokens/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{instance}.{env}.on-hellgate.cloud/api/network/tokens/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{instance}.{env}.on-hellgate.cloud/api/network/tokens/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "123e4567-e89b-12d3-a456-426614174000",
"created_at": "2023-10-01T12:00:00Z",
"card": {
"cardholder_name": "John Doe",
"expiry_month": 12,
"expiry_year": 2025,
"masked_account_number": "411111******1111",
"scheme": "visa"
},
"network_token": {
"status": "active",
"type": "vts"
},
"pci_token_id": "42510fee-ee8a-4377-a6e9-8aca381578ea"
}{
"code": 401,
"message": "No valid means of authentication was provided",
"classifier": "UNAUTHORIZED"
}{
"code": 403,
"message": "Not allowed to access this resource or feature",
"classifier": "FORBIDDEN"
}{
"code": 404,
"message": "The requested resource was not found.",
"classifier": "NOT_FOUND"
}