Individual Consent Acceptance
Accept required consents (Terms & Conditions, Privacy Policy, Data Processing) for individual customers as part of the onboarding verification flow.
Base URL: https://sandbox.finhub.cloud/api/v2.1
All three consents must be accepted before the customer account can be activated.
Accept Terms and Conditions
Endpoint
POST /api/v2.1/customer/individual/{customerId}/consents/{consentType}
Path Parameters
Individual customer identifier
Type of consent to acceptValid Values:
terms — Terms and Conditions
privacy — Privacy Policy
data-processing — Data Processing Agreement
Bearer token for authentication
Source identifier for request origin tracking
Client platform identifier. Also accepted as sec-ch-ua-platform
Unique device identifier. Also accepted as X-Device-Id or device-id
Request Body
Must be true to accept the terms and conditions
Version of the terms being acceptedExample: "1.0"
Code Examples
curl -X POST "https://sandbox.finhub.cloud/api/v2.1/customer/individual/{customerId}/consents/terms" \
-H "Accept: application/json, text/plain, */*" \
-H "Content-Type: application/json" \
-H "X-Tenant-ID: 97e7ff29-15f3-49ef-9681-3bbfcce4f6cd" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "X-Forwarded-From: e2e-test" \
-H "platform: web" \
-H "deviceId: e2e-test-device" \
-d '{
"accepted": true,
"version": "1.0"
}'
{
"code": 200,
"message": "terms and conditions accepted successfully",
"data": {
"id": "consent-cust-8947f987-90be-4129-b397-43ffc1aae87c",
"consentType": "TERMS_AND_CONDITIONS",
"isRequired": true,
"isGranted": true,
"version": "1.0",
"status": "ACCEPTED"
}
}
Accept Privacy Policy
Endpoint
POST /api/v2.1/customer/individual/{customerId}/consents/privacy
Request Body
Version of the privacy policy being acceptedExample: "1.0"
Code Examples
curl -X POST "https://sandbox.finhub.cloud/api/v2.1/customer/individual/{customerId}/consents/privacy" \
-H "Accept: application/json, text/plain, */*" \
-H "Content-Type: application/json" \
-H "X-Tenant-ID: 97e7ff29-15f3-49ef-9681-3bbfcce4f6cd" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "X-Forwarded-From: e2e-test" \
-H "platform: web" \
-H "deviceId: e2e-test-device" \
-d '{
"accepted": true,
"version": "1.0"
}'
{
"code": 200,
"message": "privacy policy accepted successfully",
"data": {
"id": "consent-cust-dfe348a4-aac4-4a7b-a836-962b1a910ca8",
"consentType": "PRIVACY_POLICY",
"isRequired": true,
"isGranted": true,
"version": "1.0",
"status": "ACCEPTED"
}
}
Accept Data Processing
Endpoint
POST /api/v2.1/customer/individual/{customerId}/consents/data-processing
Request Body
Version of the data processing agreement being acceptedExample: "1.0"
Code Examples
curl -X POST "https://sandbox.finhub.cloud/api/v2.1/customer/individual/{customerId}/consents/data-processing" \
-H "Accept: application/json, text/plain, */*" \
-H "Content-Type: application/json" \
-H "X-Tenant-ID: 97e7ff29-15f3-49ef-9681-3bbfcce4f6cd" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "X-Forwarded-From: e2e-test" \
-H "platform: web" \
-H "deviceId: e2e-test-device" \
-d '{
"accepted": true,
"version": "1.0"
}'
{
"code": 200,
"message": "data processing accepted successfully",
"data": {
"id": "consent-cust-2d604549-aab8-4ccc-b706-68202cb9f540",
"consentType": "DATA_PROCESSING",
"isRequired": true,
"isGranted": true,
"version": "1.0",
"status": "ACCEPTED"
}
}
Complete Consent Flow
Accept all three consents in sequence:
const acceptAllConsents = async (customerId) => {
const consents = ['terms', 'privacy', 'data-processing'];
for (const consent of consents) {
const response = await fetch(
`https://sandbox.finhub.cloud/api/v2.1/customer/individual/${customerId}/consents/${consent}`,
{
method: 'POST',
headers: {
'Accept': 'application/json, text/plain, */*',
'Content-Type': 'application/json',
'X-Tenant-ID': '97e7ff29-15f3-49ef-9681-3bbfcce4f6cd',
'Authorization': `Bearer ${accessToken}`,
'X-Forwarded-From': 'e2e-test',
'platform': 'web',
'deviceId': 'e2e-test-device'
},
body: JSON.stringify({ accepted: true, version: '1.0' })
}
);
const result = await response.json();
console.log(`${consent}: ${result.data.status}`);
}
};
Next Steps
Client/application Ip address
Client/application identifier for request source tracking
Example:"97e7ff29-15f3-49ef-9681-3bbfcce4f6cd"
Authenticated user identifier
Example:"87b3af37-4ac1-402b-a0ea-53cfdc695e02"
Client platform identifier. Also accepted as sec-ch-ua-platform
Bearer token from admin or customer session creation
Consent type to accept (terms, privacy, or data-processing)
Available options:
terms,
privacy,
data-processing
Individual customer identifier (UUID)
Example:"ff72a196-426a-4ab3-a2d3-e4c583a9bc88"
Consent accepted successfully
Standard API response wrapper used by all endpoints
Response from consent acceptance endpoints
Human-readable status message