Skip to main content
POST
Step 5 — Save as a draft RoyaltySource
This endpoint requires authentication. Include your Bearer token in the Authorization header.

Description

POST /source-creator/save Description: Persists the session as a new RoyaltySource (created private, public: false, type: 'user_created') plus a TenantDataSource link and SourceColumnMapping rows. Derives a typed BigQuery schema from the sample data, populates multi-class taxonomy fields (dataClass, grain, economicRole, encoding, periodParser) from what the session captured, and — for “copy & modify” sessions — versions the table name and copies fee/period config from the parent source. Triggers a v_sales_data rebuild after the transaction commits. Requires session status generating or testing (i.e. queries generated; the test step is optional). Rate limited via heavyOperationLimiter (creates DB records + triggers a BigQuery rebuild). Authorization:
  • Required role: admin or higher
Method: POST

Code Examples

Authorizations

Authorization
string
header
required

JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"

Body

application/json
sessionId
string<uuid>
required
feeRate
number | null

Fee rate as a decimal (e.g. 0.015 = 1.5%). Only applied when > 0.

feeType
enum<string>
default:percentage
Available options:
percentage,
fixed
feeDescription
string | null

Response

Draft source created successfully

status
string
Example:

"success"

message
string
Example:

"Draft source created successfully"

data
object