Complete cookie consent solution for B2B software companies. Multi-tenant compliance, API-first consent management, developer SDKs, and enterprise authentication integration.
B2B software companies face unique privacy compliance challenges
Managing consent across multiple customers, organizations, and regions with different privacy requirements.
Developers need programmatic access to consent data for real-time decision making in applications.
Integrating with SSO, SAML, OAuth, and other enterprise authentication systems while managing consent.
Handling data transfers across regions with different privacy laws and consent requirements.
Ensuring consent data stays in specific regions or countries as required by enterprise customers.
Managing consent across multiple features, data types, and user roles within complex SaaS applications.
Programmatic consent management for modern SaaS applications
// Get consent status for user
GET /api/v1/consent/{userId}
// Update consent preferences
POST /api/v1/consent/{userId}
// Get tenant-specific settings
GET /api/v1/tenant/{tenantId}/settings
// Webhook notifications
POST /webhooks/consent-updated// JavaScript SDK
npm install @cookiebanner/saas-sdk
import { ConsentManager } from '@cookiebanner/saas-sdk';
const consentManager = new ConsentManager({
apiKey: 'your-api-key',
tenantId: 'tenant-123'
});
// Check consent status
const hasConsent = await consentManager
.hasConsent('analytics');// Multi-tenant consent management
class ConsentManager {
constructor(config) {
this.tenantId = config.tenantId;
this.userId = config.userId;
this.apiKey = config.apiKey;
}
async getConsent(category) {
const response = await fetch(
`/api/v1/tenant/${this.tenantId}/consent/${this.userId}/${category}`,
{
headers: {
'Authorization': `Bearer ${this.apiKey}`,
'Content-Type': 'application/json'
}
}
);
return response.json();
}
async updateConsent(category, granted) {
return fetch(
`/api/v1/tenant/${this.tenantId}/consent/${this.userId}`,
{
method: 'POST',
headers: {
'Authorization': `Bearer ${this.apiKey}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
category,
granted,
timestamp: new Date().toISOString()
})
}
);
}
}Built for complex B2B software environments
See how leading SaaS companies implement consent management
// SAML/OAuth consent integration
class SSOConsentHandler {
async handleUserLogin(user, ssoProvider) {
// Get user's consent preferences from SSO context
const consentContext = await this.extractConsentFromSSO(user, ssoProvider);
// Apply tenant-specific consent rules
const tenantRules = await this.getTenantConsentRules(user.tenantId);
// Merge SSO consent with tenant requirements
const finalConsent = this.mergeConsentPreferences(
consentContext,
tenantRules
);
// Store consent in our system
await this.consentManager.updateConsent(user.id, finalConsent);
return finalConsent;
}
}// Consent-aware microservice
class AnalyticsService {
constructor(consentManager) {
this.consentManager = consentManager;
}
async trackEvent(userId, event) {
// Check consent before tracking
const hasConsent = await this.consentManager
.hasConsent(userId, 'analytics');
if (!hasConsent) {
return; // Skip tracking
}
// Proceed with tracking
await this.sendEventToAnalytics(event);
}
async getUserAnalytics(userId) {
const hasConsent = await this.consentManager
.hasConsent(userId, 'analytics');
return hasConsent ? this.getFullAnalytics(userId) : null;
}
}// WebSocket consent updates
class RealTimeConsentHandler {
constructor(websocket) {
this.websocket = websocket;
this.consentCache = new Map();
}
async handleConsentUpdate(update) {
const { userId, category, granted } = update;
// Update local cache
this.consentCache.set(`${userId}:${category}`, granted);
// Notify all connected clients
this.websocket.broadcast({
type: 'consent_update',
userId,
category,
granted
});
// Trigger feature updates
await this.updateUserFeatures(userId, category, granted);
}
async updateUserFeatures(userId, category, granted) {
// Disable/enable features based on consent
if (category === 'analytics' && !granted) {
await this.disableAnalyticsFeatures(userId);
}
}
}Get your B2B software compliant in 5 developer-friendly steps
Add our SDK to your application:
# Install the SDK
npm install @cookiebanner/saas-sdk
# Or with yarn
yarn add @cookiebanner/saas-sdk
# Initialize in your app
import { ConsentManager } from '@cookiebanner/saas-sdk';
const consentManager = new ConsentManager({
apiKey: process.env.COOKIE_CONSENT_API_KEY,
baseUrl: 'https://api.cookiebanner.ca'
});Set up tenant-specific consent configurations:
Connect consent management with your SSO/authentication system:
Add consent checks throughout your application:
Set up monitoring and scaling for enterprise use:
Join leading B2B software companies using our developer-friendly consent management solution. Enterprise-grade security, global compliance, and seamless integration.