The Seed Datasets API provides pre-built dataset packs that populate the platform with realistic sample data. Each pack includes schemas, categories, offers, channels, creatives, qualification rules, contact policies, algorithm models, decision flows, segments, and synthetic customer/interaction data.
Base path
List available datasets
Returns all registered dataset packs with their metadata and current load status.
Response 200
{
"datasets": [
{
"key": "starbucks",
"name": "Starbucks Rewards",
"description": "Coffee loyalty rewards program with seasonal promotions.",
"source": "synthetic",
"csvFiles": [],
"testingFocus": "Multi-channel loyalty offers with frequency capping",
"schemaCount": 2,
"offerCount": 12,
"modelCount": 2,
"channelCount": 4,
"categoryCount": 3,
"creativeCount": 24,
"loaded": false
}
],
"currentlyLoaded": null
}
Field reference
| Field | Type | Description |
|---|
key | string | Unique dataset identifier used in load/delete URLs. |
loaded | boolean | Whether this dataset is currently loaded for the tenant. |
currentlyLoaded | string | null | Key of the currently loaded dataset, or null if none. |
Load a dataset
POST /api/v1/seed-dataset/{key}
Loads a dataset pack into the platform. Creates all entities in correct foreign-key dependency order: schemas, categories, channels, offers, creatives, rules, models, decision flows, segments, synthetic data rows, and interaction history.
Path parameters
| Parameter | Required | Type | Description |
|---|
key | Yes | string | Dataset key (e.g., "starbucks"). |
Query parameters
| Parameter | Required | Type | Description |
|---|
force | No | string | Set to "true" to replace a currently loaded dataset. |
Response 201
{
"message": "Starbucks Rewards loaded successfully",
"counts": {
"schemas": 2,
"categories": 3,
"subCategories": 6,
"channels": 4,
"offers": 12,
"creatives": 24,
"qualificationRules": 5,
"contactPolicies": 3,
"outcomeTypes": 10,
"models": 2,
"experiments": 1,
"decisionFlows": 1,
"segments": 1,
"customers_rows": 1000,
"transactions_rows": 1000,
"interactions": 500,
"interactionSummaries": 500,
"segmentCustomers": 450
},
"datasetKey": "starbucks"
}
Error codes
| Code | Reason |
|---|
404 | Dataset key not found in registry. |
409 | Another dataset is already loaded (use ?force=true to replace). |
409 | Same dataset is already loaded. |
429 | Rate limited (5 requests per 60 seconds). |
Response 409 (dataset conflict)
{
"status": 409,
"currentlyLoaded": "banking",
"requestedLoad": "starbucks",
"message": "Banking NBA is currently loaded. Add ?force=true to remove it and load Starbucks Rewards."
}
Remove a dataset
DELETE /api/v1/seed-dataset/{key}
Removes all entities belonging to a dataset pack in reverse foreign-key dependency order. Drops associated PostgreSQL tables and segment views.
Path parameters
| Parameter | Required | Type | Description |
|---|
key | Yes | string | Dataset key to remove. |
Response 200
{
"message": "Starbucks Rewards removed successfully",
"counts": {
"interactions": 500,
"interactionSummaries": 500,
"creatives": 24,
"offers": 12,
"experiments": 1,
"decisionFlows": 1,
"channels": 4,
"categories": 3,
"qualificationRules": 5,
"contactPolicies": 3,
"models": 2,
"runs": 0,
"segments": 1,
"schemas": 2
}
}
Error codes
| Code | Reason |
|---|
404 | Dataset key not found in registry. |
Role requirements
| Method | Minimum role |
|---|
| GET | admin |
| POST | admin |
| DELETE | admin |
Loading a dataset creates real PostgreSQL tables with synthetic data rows. In a production environment, only use this for testing purposes.