curl --request GET \
--url https://api.baselayer.com/issuance/credentials/presets \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.baselayer.com/issuance/credentials/presets"
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://api.baselayer.com/issuance/credentials/presets', 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.baselayer.com/issuance/credentials/presets",
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://api.baselayer.com/issuance/credentials/presets"
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://api.baselayer.com/issuance/credentials/presets")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.baselayer.com/issuance/credentials/presets")
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[
{
"key": "consumer_ecommerce",
"label": "<string>",
"requires_business": true,
"individual_disclosed_fields": [
"<string>"
],
"business_disclosed_fields": [
"<string>"
],
"business_actor_disclosed_fields": [
"<string>"
],
"is_individual_default": true,
"is_business_default": true
}
]{
"type": "validation_failed",
"code": 7112,
"message": "The request is invalid.",
"metadata": {}
}List the presets an L3 mint can disclose by
Lists the credential presets, by name by default, a page at a time (limit, default 10, maximum 1000; follow X-Next-Cursor): a use case an L3 mint can name as preset instead of listing disclosed_fields, with the exact paths it requests on an individual mint and on a business mint. Paths with nothing on file are skipped at mint time. is_individual_default and is_business_default name the most conservative preset per hat, the one a mint uses when it names none. The list is the same for every caller and fixed for an API release, so it may be cached for an hour.
curl --request GET \
--url https://api.baselayer.com/issuance/credentials/presets \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.baselayer.com/issuance/credentials/presets"
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://api.baselayer.com/issuance/credentials/presets', 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.baselayer.com/issuance/credentials/presets",
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://api.baselayer.com/issuance/credentials/presets"
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://api.baselayer.com/issuance/credentials/presets")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.baselayer.com/issuance/credentials/presets")
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[
{
"key": "consumer_ecommerce",
"label": "<string>",
"requires_business": true,
"individual_disclosed_fields": [
"<string>"
],
"business_disclosed_fields": [
"<string>"
],
"business_actor_disclosed_fields": [
"<string>"
],
"is_individual_default": true,
"is_business_default": true
}
]{
"type": "validation_failed",
"code": 7112,
"message": "The request is invalid.",
"metadata": {}
}Authorizations
Query Parameters
Maximum number of records to return in a single page. Must be between 1 and 1000.
1 <= x <= 1000Number of records to skip from the beginning. Use 0 for the first page. Cannot be used with cursor.
x >= 0Opaque pagination cursor token that identifies the position in the result set. Use the cursor from the previous response to get the next page. Cannot be used with offset.
name: the preset's label, ignoring case; ties break on key. Defaults to name asc.
What the credential presets list sorts by.
name asc or desc, for every key of the sort. Defaults to the field's own: name asc.
asc, desc Response
The presets, in the requested order.
The value a mint sends as preset.
consumer_ecommerce, age_gated, consumer_regulated, b2b_ecommerce, b2b_regulated Display name.
Whether only a business mint (a person at a business) accepts it.
The subject claim paths an individual mint by this preset requests; null when it requires a business.
The business credential's paths a business mint by this preset requests.
The actor credential's unprefixed paths a business mint by this preset requests, as actor_disclosed_fields.
Whether this is the preset to preselect for a person on their own: the most conservative one an individual mint accepts.
Whether this is the preset to preselect for a person at a business: the most conservative one a business mint accepts.