web
GET
https://lucidace.com /v1/projects/{project_id}/web/budget/curves Scope insight:readParameters
project_idstringpathrequiredconversion_eventstringquerygoal_idstringqueryfromstringquerytostringquerylookback_daysintegerquerydimensionstringquerymodelstringqueryhalf_life_daysintegerqueryrevenue_propertystringqueryCode samples
cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/web/budget/curves"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200
Example
{
"base_currency": "string",
"channels": [
{
"a": 0,
"avg_daily_conversions": 0,
"avg_daily_spend": 0,
"b": 0,
"curve": [
{
"conversions": 0,
"high": 0,
"low": 0,
"spend": 0
}
],
"days": 0,
"key": "string",
"kind": "string",
"marginal_at_current": 0,
"observed": [
{
"conversions": 0,
"high": 0,
"low": 0,
"spend": 0
}
],
"r2": 0,
"revenue_per_conversion": 0
}
],
"dimension": "string",
"model": "string"
}Schema
base_currencystringrequiredchannelsChannelCurve[]requiredShow child parameters
anumberrequiredavg_daily_conversionsnumberrequiredavg_daily_spendnumberrequiredMean spend per day over the days with spend.
bnumberrequiredcurveCurvePoint[]requiredThe fitted curve from 0 to twice the largest observed daily spend.
Show child parameters
conversionsnumberrequiredhighnumberrequiredlownumberrequiredspendnumberrequiredSpend per day.
daysintegerrequiredDays used for the fit.
keystringrequiredkindstringrequiredpower (a * spend^b) or linear (too few days to fit a curve).marginal_at_currentnumberrequiredExtra conversions per extra unit of spend at the current daily spend.
observedCurvePoint[]requiredObserved
(spend, conversions) days.Show child parameters
conversionsnumberrequiredhighnumberrequiredlownumberrequiredspendnumberrequiredSpend per day.
r2numberrequiredrevenue_per_conversionnumberrequiredAttributed revenue per attributed conversion (base currency).
dimensionstringrequiredmodelstringrequired400
404
503
POST
https://lucidace.com /v1/projects/{project_id}/web/budget/scenario Scope insight:readParameters
project_idstringpathrequiredconversion_eventstringquerygoal_idstringqueryfromstringquerytostringquerylookback_daysintegerquerydimensionstringquerymodelstringqueryhalf_life_daysintegerqueryrevenue_propertystringqueryRequest body
application/json
boundsobjectOptional per-key bounds for the optimizer.
budgetsobjectBudget per key for the whole period. Keys left out plan at their current daily spend.
daysintegerLength of the planned period in days (default 30, max 366).
optimizebooleanRe-allocate the budget across keys to maximise projected conversions.
total_budgetnumberTotal budget for the period; with
optimize it is split by marginal return, else the current spend mix is scaled to it.{
"bounds": {},
"budgets": {},
"days": 0,
"optimize": true,
"total_budget": 0
}Code samples
cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/web/budget/scenario" \
-H "Content-Type: application/json" \
-d '{"bounds":{},"budgets":{},"days":0,"optimize":true,"total_budget":0}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
200
Example
{
"base_currency": "string",
"baseline": {
"conversions": 0,
"conversions_high": 0,
"conversions_low": 0,
"cpa": 0,
"revenue": 0,
"roas": 0,
"spend": 0
},
"days": 0,
"rows": [
{
"conversions": 0,
"conversions_high": 0,
"conversions_low": 0,
"cpa": 0,
"current_spend": 0,
"key": "string",
"revenue": 0,
"roas": 0,
"spend": 0
}
],
"totals": {
"conversions": 0,
"conversions_high": 0,
"conversions_low": 0,
"cpa": 0,
"revenue": 0,
"roas": 0,
"spend": 0
}
}Schema
base_currencystringrequiredbaselineobjectrequiredThe same budget at the current spend mix, as the baseline.
Show child parameters
conversionsnumberrequiredconversions_highnumberrequiredconversions_lownumberrequiredcpanumberrevenuenumberrequiredroasnumberspendnumberrequireddaysintegerrequiredrowsBudgetPlanRow[]requiredShow child parameters
conversionsnumberrequiredconversions_highnumberrequiredconversions_lownumberrequiredcpanumberProjected cost per conversion.
current_spendnumberrequiredSpend over the period at the current daily rate, for comparison.
keystringrequiredrevenuenumberrequiredroasnumberspendnumberrequiredSpend over the period.
totalsobjectrequiredShow child parameters
conversionsnumberrequiredconversions_highnumberrequiredconversions_lownumberrequiredcpanumberrevenuenumberrequiredroasnumberspendnumberrequired400
404
503
GET
https://lucidace.com /v1/projects/{project_id}/web/channel-rules Scope insight:readParameters
project_idstringpathrequiredCode samples
cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/web/channel-rules"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200
Example
{
"custom": true,
"rules": [
{
"campaign": "string",
"channel": "string",
"click_id": [
"string"
],
"has_medium": true,
"kind": [
"string"
],
"medium": "string",
"source": "string",
"utm": true
}
]
}Schema
custombooleanrequiredFalse while the shipped defaults are in effect.
rulesRule[]requiredShow child parameters
campaignstringchannelstringrequiredclick_idstring[]Click-id params (
gclid, fbclid, ...), any present.has_mediumbooleankindstring[]Any of
search|social|ai|email|video|other|none.mediumstringsourcestringutmboolean404
PUT
https://lucidace.com /v1/projects/{project_id}/web/channel-rules Scope insight:writeParameters
project_idstringpathrequiredRequest body
application/json
rulesRule[]requiredShow child parameters
campaignstringchannelstringrequiredclick_idstring[]Click-id params (
gclid, fbclid, ...), any present.has_mediumbooleankindstring[]Any of
search|social|ai|email|video|other|none.mediumstringsourcestringutmboolean{
"rules": [
{
"campaign": "string",
"channel": "string",
"click_id": [
"string"
],
"has_medium": true,
"kind": [
"string"
],
"medium": "string",
"source": "string",
"utm": true
}
]
}Code samples
cURL
curl -X PUT "https://lucidace.com/v1/projects/{project_id}/web/channel-rules" \
-H "Content-Type: application/json" \
-d '{"rules":[{"campaign":"string","channel":"string","click_id":["string"],"has_medium":true,"kind":["string"],"medium":"string","source":"string","utm":true}]}'TypeScript
Python
Go
PHP
Ruby
Java
DELETE
https://lucidace.com /v1/projects/{project_id}/web/channel-rules Scope insight:writeParameters
project_idstringpathrequiredCode samples
cURL
curl -X DELETE "https://lucidace.com/v1/projects/{project_id}/web/channel-rules"TypeScript
Python
Go
PHP
Ruby
Java
Responses
204 Back to the shipped defaults
403
404
GET
https://lucidace.com /v1/projects/{project_id}/web/content Scope insight:readParameters
project_idstringpathrequiredfromstringquerytostringquerylimitintegerqueryCode samples
cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/web/content"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200
Example
[
{
"impressions": 0,
"interaction_rate": 0,
"interactions": 0,
"name": "string",
"piece": "string",
"visitors": 0
}
]Schema
impressionsintegerrequiredinteraction_ratenumberinteractions / impressions; null without impressions.interactionsintegerrequirednamestringrequiredpiecestringrequiredvisitorsintegerrequired400
404
503
Updated