Add Tenant Source
Adds a source association for the current tenant. Supports two modes:
Description
Mode 1: Add by Source ID (royaltySourceId)
Add a specific source variant by its UUID.Mode 2: Add by Source Name (sourceName)
Add a source by name. The system automatically selects the current variant (the one with no end date, or the most recent if all have end dates). Note: The system will automatically associate additional variants as needed when processing royalty files with different date ranges.Required Role
adminorownerrole within the tenant
Business Rules
- Must provide either
royaltySourceIdORsourceName(not both) - Source must have
public=trueandisActive=trueto be associated - Cannot add duplicate associations
- Association is automatically set to
isActive=trueon creation
Side Effects
- Triggers regeneration of tenant’s sales data query cache
- Updates tenant-specific BigQuery query configurations
- Required role:
adminor higher
Code Examples
Authorizations
JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"
Body
UUID of a specific royalty source variant to associate. Use this OR sourceName, not both.
"src-1"
Name of the source to associate ALL variants of (case-insensitive). Use this OR royaltySourceId, not both. Example: "africori", "alterk", "spotify"
"alterk"
Tenant-specific settings for this source
Field mapping/replacement rules
Response
Tenant source association created
Association between a tenant and a royalty source. Note: The composite key is (TenantId, RoyaltySourceId).
Tenant ID (automatically set from authenticated user)
1
Royalty source ID
"src-1"
Whether this source association is active for the tenant
true
Tenant-specific settings for this source
Tenant-specific field replacements/mappings
Number of files processed for this tenant-source association
42
Timestamp of the most recently processed file
"2026-03-04T14:30:00.000Z"
ID of the most recently processed file
"a1b2c3d4-e5f6-7890-abcd-ef1234567890"
When tenant-specific settings were last modified
TenantUserId who last updated the settings