Consent
Create a consumer consent record (direct, server-to-server). Returns a consent_id used for all subsequent queries.
Create a consumer consent record (direct, server-to-server). Returns a consent_id used for all subsequent queries.
POST
/
v1
/
consent
/
consumer
Create a consumer consent record (direct, server-to-server). Returns a consent_id used for all subsequent queries.
curl --request POST \
--url https://api.solo.one/v1/consent/consumer \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"network_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"did_gather_consent_from_consumer_prior": true,
"consumer_consent_identity": {
"date_of_birth": "2023-11-07T05:31:56Z",
"first_name": "<string>",
"last_name": "<string>",
"personal_email": "<string>",
"phone_number": "<string>",
"social_security_number": "<string>"
},
"consumer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://api.solo.one/v1/consent/consumer"
payload = {
"network_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"did_gather_consent_from_consumer_prior": True,
"consumer_consent_identity": {
"date_of_birth": "2023-11-07T05:31:56Z",
"first_name": "<string>",
"last_name": "<string>",
"personal_email": "<string>",
"phone_number": "<string>",
"social_security_number": "<string>"
},
"consumer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
network_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
did_gather_consent_from_consumer_prior: true,
consumer_consent_identity: {
date_of_birth: '2023-11-07T05:31:56Z',
first_name: '<string>',
last_name: '<string>',
personal_email: '<string>',
phone_number: '<string>',
social_security_number: '<string>'
},
consumer_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://api.solo.one/v1/consent/consumer', 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.solo.one/v1/consent/consumer",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'network_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'did_gather_consent_from_consumer_prior' => true,
'consumer_consent_identity' => [
'date_of_birth' => '2023-11-07T05:31:56Z',
'first_name' => '<string>',
'last_name' => '<string>',
'personal_email' => '<string>',
'phone_number' => '<string>',
'social_security_number' => '<string>'
],
'consumer_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.solo.one/v1/consent/consumer"
payload := strings.NewReader("{\n \"network_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"did_gather_consent_from_consumer_prior\": true,\n \"consumer_consent_identity\": {\n \"date_of_birth\": \"2023-11-07T05:31:56Z\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"personal_email\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"social_security_number\": \"<string>\"\n },\n \"consumer_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\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))
}HttpResponse<String> response = Unirest.post("https://api.solo.one/v1/consent/consumer")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"network_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"did_gather_consent_from_consumer_prior\": true,\n \"consumer_consent_identity\": {\n \"date_of_birth\": \"2023-11-07T05:31:56Z\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"personal_email\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"social_security_number\": \"<string>\"\n },\n \"consumer_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.solo.one/v1/consent/consumer")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"network_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"did_gather_consent_from_consumer_prior\": true,\n \"consumer_consent_identity\": {\n \"date_of_birth\": \"2023-11-07T05:31:56Z\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"personal_email\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"social_security_number\": \"<string>\"\n },\n \"consumer_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"consent_id": "<string>",
"field_access_grants": [
{
"furnishing_entity_id": "<string>",
"field_definitions": [],
"effective_from": "<string>",
"effective_to": "<string>"
}
],
"created_at": "<string>",
"events": "<string>",
"scope": "<string>",
"expires_at": "<string>",
"consented_fields": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Create a consumer consent record (direct, server-to-server). Returns a consent_id used for all subsequent queries.
Response
Successful Response
Create a consumer consent record (direct, server-to-server). Returns a consent_id used for all subsequent queries.
⌘I
Create a consumer consent record (direct, server-to-server). Returns a consent_id used for all subsequent queries.
curl --request POST \
--url https://api.solo.one/v1/consent/consumer \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"network_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"did_gather_consent_from_consumer_prior": true,
"consumer_consent_identity": {
"date_of_birth": "2023-11-07T05:31:56Z",
"first_name": "<string>",
"last_name": "<string>",
"personal_email": "<string>",
"phone_number": "<string>",
"social_security_number": "<string>"
},
"consumer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://api.solo.one/v1/consent/consumer"
payload = {
"network_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"did_gather_consent_from_consumer_prior": True,
"consumer_consent_identity": {
"date_of_birth": "2023-11-07T05:31:56Z",
"first_name": "<string>",
"last_name": "<string>",
"personal_email": "<string>",
"phone_number": "<string>",
"social_security_number": "<string>"
},
"consumer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
network_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
did_gather_consent_from_consumer_prior: true,
consumer_consent_identity: {
date_of_birth: '2023-11-07T05:31:56Z',
first_name: '<string>',
last_name: '<string>',
personal_email: '<string>',
phone_number: '<string>',
social_security_number: '<string>'
},
consumer_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://api.solo.one/v1/consent/consumer', 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.solo.one/v1/consent/consumer",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'network_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'did_gather_consent_from_consumer_prior' => true,
'consumer_consent_identity' => [
'date_of_birth' => '2023-11-07T05:31:56Z',
'first_name' => '<string>',
'last_name' => '<string>',
'personal_email' => '<string>',
'phone_number' => '<string>',
'social_security_number' => '<string>'
],
'consumer_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.solo.one/v1/consent/consumer"
payload := strings.NewReader("{\n \"network_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"did_gather_consent_from_consumer_prior\": true,\n \"consumer_consent_identity\": {\n \"date_of_birth\": \"2023-11-07T05:31:56Z\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"personal_email\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"social_security_number\": \"<string>\"\n },\n \"consumer_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\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))
}HttpResponse<String> response = Unirest.post("https://api.solo.one/v1/consent/consumer")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"network_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"did_gather_consent_from_consumer_prior\": true,\n \"consumer_consent_identity\": {\n \"date_of_birth\": \"2023-11-07T05:31:56Z\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"personal_email\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"social_security_number\": \"<string>\"\n },\n \"consumer_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.solo.one/v1/consent/consumer")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"network_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"did_gather_consent_from_consumer_prior\": true,\n \"consumer_consent_identity\": {\n \"date_of_birth\": \"2023-11-07T05:31:56Z\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"personal_email\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"social_security_number\": \"<string>\"\n },\n \"consumer_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"consent_id": "<string>",
"field_access_grants": [
{
"furnishing_entity_id": "<string>",
"field_definitions": [],
"effective_from": "<string>",
"effective_to": "<string>"
}
],
"created_at": "<string>",
"events": "<string>",
"scope": "<string>",
"expires_at": "<string>",
"consented_fields": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}