curl --request POST \
--url https://api.quidkey.com/v1/merchants/{id}/agreement-acceptances \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"agreement": {
"id": "<string>",
"_link": "<string>",
"_type": "agreement"
},
"is_accepted": true,
"accepted_at": "2023-11-07T05:31:56Z",
"accepted_by": {
"full_name": "<string>",
"email": "jsmith@example.com"
},
"accepted_ip": "127.0.0.1",
"wording": "<string>",
"locale": "<string>"
}
'import requests
url = "https://api.quidkey.com/v1/merchants/{id}/agreement-acceptances"
payload = {
"agreement": {
"id": "<string>",
"_link": "<string>",
"_type": "agreement"
},
"is_accepted": True,
"accepted_at": "2023-11-07T05:31:56Z",
"accepted_by": {
"full_name": "<string>",
"email": "jsmith@example.com"
},
"accepted_ip": "127.0.0.1",
"wording": "<string>",
"locale": "<string>"
}
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({
agreement: {id: '<string>', _link: '<string>', _type: 'agreement'},
is_accepted: true,
accepted_at: '2023-11-07T05:31:56Z',
accepted_by: {full_name: '<string>', email: 'jsmith@example.com'},
accepted_ip: '127.0.0.1',
wording: '<string>',
locale: '<string>'
})
};
fetch('https://api.quidkey.com/v1/merchants/{id}/agreement-acceptances', 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.quidkey.com/v1/merchants/{id}/agreement-acceptances",
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([
'agreement' => [
'id' => '<string>',
'_link' => '<string>',
'_type' => 'agreement'
],
'is_accepted' => true,
'accepted_at' => '2023-11-07T05:31:56Z',
'accepted_by' => [
'full_name' => '<string>',
'email' => 'jsmith@example.com'
],
'accepted_ip' => '127.0.0.1',
'wording' => '<string>',
'locale' => '<string>'
]),
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.quidkey.com/v1/merchants/{id}/agreement-acceptances"
payload := strings.NewReader("{\n \"agreement\": {\n \"id\": \"<string>\",\n \"_link\": \"<string>\",\n \"_type\": \"agreement\"\n },\n \"is_accepted\": true,\n \"accepted_at\": \"2023-11-07T05:31:56Z\",\n \"accepted_by\": {\n \"full_name\": \"<string>\",\n \"email\": \"jsmith@example.com\"\n },\n \"accepted_ip\": \"127.0.0.1\",\n \"wording\": \"<string>\",\n \"locale\": \"<string>\"\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.quidkey.com/v1/merchants/{id}/agreement-acceptances")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"agreement\": {\n \"id\": \"<string>\",\n \"_link\": \"<string>\",\n \"_type\": \"agreement\"\n },\n \"is_accepted\": true,\n \"accepted_at\": \"2023-11-07T05:31:56Z\",\n \"accepted_by\": {\n \"full_name\": \"<string>\",\n \"email\": \"jsmith@example.com\"\n },\n \"accepted_ip\": \"127.0.0.1\",\n \"wording\": \"<string>\",\n \"locale\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.quidkey.com/v1/merchants/{id}/agreement-acceptances")
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 \"agreement\": {\n \"id\": \"<string>\",\n \"_link\": \"<string>\",\n \"_type\": \"agreement\"\n },\n \"is_accepted\": true,\n \"accepted_at\": \"2023-11-07T05:31:56Z\",\n \"accepted_by\": {\n \"full_name\": \"<string>\",\n \"email\": \"jsmith@example.com\"\n },\n \"accepted_ip\": \"127.0.0.1\",\n \"wording\": \"<string>\",\n \"locale\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"result": {
"_type": "agreement_acceptance",
"_uri": "<string>",
"_view": "full",
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"merchant": {
"_link": "<string>",
"_type": "merchant",
"id": "<string>"
},
"agreement": {
"_link": "<string>",
"_type": "agreement",
"id": "<string>"
},
"bank_account": {
"_link": "<string>",
"_type": "bank_account",
"id": "<string>"
},
"accepted_at": "2023-11-07T05:31:56Z"
},
"entities": {},
"not_included": [
{
"link": {
"_link": "<string>",
"_type": "<string>",
"id": "<string>"
},
"reason": "no_permission"
}
]
}{
"result": {
"_type": "agreement_acceptance",
"_uri": "<string>",
"_view": "full",
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"merchant": {
"_link": "<string>",
"_type": "merchant",
"id": "<string>"
},
"agreement": {
"_link": "<string>",
"_type": "agreement",
"id": "<string>"
},
"bank_account": {
"_link": "<string>",
"_type": "bank_account",
"id": "<string>"
},
"accepted_at": "2023-11-07T05:31:56Z"
},
"entities": {},
"not_included": [
{
"link": {
"_link": "<string>",
"_type": "<string>",
"id": "<string>"
},
"reason": "no_permission"
}
]
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
],
"retryable": true,
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
],
"retryable": true,
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
],
"retryable": true,
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
],
"retryable": true,
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
],
"retryable": true,
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
],
"retryable": true,
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
],
"retryable": true,
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
],
"retryable": true,
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
],
"retryable": true,
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
],
"retryable": true,
"request_id": "<string>"
}
}Record an agreement acceptance
Records that a person accepted one version of an agreement for a merchant. You state that they accepted, who, when and the exact wording they saw, and you are attesting to it. These details are never returned. Any agreement the merchant accepts can be recorded here, including one a create could have taken in consent. A bank_debit_authorization names the account in bank_account. A nacha_acknowledgment or a bank_debit_authorization needs the merchant’s legal entity first. Safe to repeat: a version already on file for this merchant, for the same account where it names one, answers 200 with the existing acceptance, and nothing is recorded, even once a newer version is current or accepted_at would now be refused. CONSENT_AGREEMENT_STALE names the current version in details.
Credentials: partner, merchant
Permission: agreement-acceptances:create
curl --request POST \
--url https://api.quidkey.com/v1/merchants/{id}/agreement-acceptances \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"agreement": {
"id": "<string>",
"_link": "<string>",
"_type": "agreement"
},
"is_accepted": true,
"accepted_at": "2023-11-07T05:31:56Z",
"accepted_by": {
"full_name": "<string>",
"email": "jsmith@example.com"
},
"accepted_ip": "127.0.0.1",
"wording": "<string>",
"locale": "<string>"
}
'import requests
url = "https://api.quidkey.com/v1/merchants/{id}/agreement-acceptances"
payload = {
"agreement": {
"id": "<string>",
"_link": "<string>",
"_type": "agreement"
},
"is_accepted": True,
"accepted_at": "2023-11-07T05:31:56Z",
"accepted_by": {
"full_name": "<string>",
"email": "jsmith@example.com"
},
"accepted_ip": "127.0.0.1",
"wording": "<string>",
"locale": "<string>"
}
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({
agreement: {id: '<string>', _link: '<string>', _type: 'agreement'},
is_accepted: true,
accepted_at: '2023-11-07T05:31:56Z',
accepted_by: {full_name: '<string>', email: 'jsmith@example.com'},
accepted_ip: '127.0.0.1',
wording: '<string>',
locale: '<string>'
})
};
fetch('https://api.quidkey.com/v1/merchants/{id}/agreement-acceptances', 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.quidkey.com/v1/merchants/{id}/agreement-acceptances",
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([
'agreement' => [
'id' => '<string>',
'_link' => '<string>',
'_type' => 'agreement'
],
'is_accepted' => true,
'accepted_at' => '2023-11-07T05:31:56Z',
'accepted_by' => [
'full_name' => '<string>',
'email' => 'jsmith@example.com'
],
'accepted_ip' => '127.0.0.1',
'wording' => '<string>',
'locale' => '<string>'
]),
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.quidkey.com/v1/merchants/{id}/agreement-acceptances"
payload := strings.NewReader("{\n \"agreement\": {\n \"id\": \"<string>\",\n \"_link\": \"<string>\",\n \"_type\": \"agreement\"\n },\n \"is_accepted\": true,\n \"accepted_at\": \"2023-11-07T05:31:56Z\",\n \"accepted_by\": {\n \"full_name\": \"<string>\",\n \"email\": \"jsmith@example.com\"\n },\n \"accepted_ip\": \"127.0.0.1\",\n \"wording\": \"<string>\",\n \"locale\": \"<string>\"\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.quidkey.com/v1/merchants/{id}/agreement-acceptances")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"agreement\": {\n \"id\": \"<string>\",\n \"_link\": \"<string>\",\n \"_type\": \"agreement\"\n },\n \"is_accepted\": true,\n \"accepted_at\": \"2023-11-07T05:31:56Z\",\n \"accepted_by\": {\n \"full_name\": \"<string>\",\n \"email\": \"jsmith@example.com\"\n },\n \"accepted_ip\": \"127.0.0.1\",\n \"wording\": \"<string>\",\n \"locale\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.quidkey.com/v1/merchants/{id}/agreement-acceptances")
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 \"agreement\": {\n \"id\": \"<string>\",\n \"_link\": \"<string>\",\n \"_type\": \"agreement\"\n },\n \"is_accepted\": true,\n \"accepted_at\": \"2023-11-07T05:31:56Z\",\n \"accepted_by\": {\n \"full_name\": \"<string>\",\n \"email\": \"jsmith@example.com\"\n },\n \"accepted_ip\": \"127.0.0.1\",\n \"wording\": \"<string>\",\n \"locale\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"result": {
"_type": "agreement_acceptance",
"_uri": "<string>",
"_view": "full",
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"merchant": {
"_link": "<string>",
"_type": "merchant",
"id": "<string>"
},
"agreement": {
"_link": "<string>",
"_type": "agreement",
"id": "<string>"
},
"bank_account": {
"_link": "<string>",
"_type": "bank_account",
"id": "<string>"
},
"accepted_at": "2023-11-07T05:31:56Z"
},
"entities": {},
"not_included": [
{
"link": {
"_link": "<string>",
"_type": "<string>",
"id": "<string>"
},
"reason": "no_permission"
}
]
}{
"result": {
"_type": "agreement_acceptance",
"_uri": "<string>",
"_view": "full",
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"merchant": {
"_link": "<string>",
"_type": "merchant",
"id": "<string>"
},
"agreement": {
"_link": "<string>",
"_type": "agreement",
"id": "<string>"
},
"bank_account": {
"_link": "<string>",
"_type": "bank_account",
"id": "<string>"
},
"accepted_at": "2023-11-07T05:31:56Z"
},
"entities": {},
"not_included": [
{
"link": {
"_link": "<string>",
"_type": "<string>",
"id": "<string>"
},
"reason": "no_permission"
}
]
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
],
"retryable": true,
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
],
"retryable": true,
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
],
"retryable": true,
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
],
"retryable": true,
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
],
"retryable": true,
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
],
"retryable": true,
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
],
"retryable": true,
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
],
"retryable": true,
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
],
"retryable": true,
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
],
"retryable": true,
"request_id": "<string>"
}
}