web
GET
https://lucidace.com /v1/projects/{project_id}/web/revenue/breakdown Scope insight:readParameters
project_idstringpathrequiredfromstringpathrequiredtostringpathrequiredbystringpathrequiredproduct (default), coupon, event, currency, property, person or group.propertystringpathrequiredThe property for
by=property.group_type_indexintegerpathrequiredGroup type index 0..=4 for
by=group.limitintegerpathrequiredKeys returned (1..=100, default 20); the rest is summed into
other.Code samples
cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/web/revenue/breakdown"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200
Example
{
"base_currency": "string",
"by": "string",
"daily": [
{
"day": "string",
"key": "string",
"revenue": 0
}
],
"other_revenue": 0,
"rows": [
{
"key": "string",
"purchases": 0,
"revenue": 0,
"share": 0
}
],
"total_revenue": 0,
"unconverted_purchases": 0
}Schema
base_currencystringrequiredbystringrequireddailyRevenueBreakdownDay[]requiredDaily revenue of the returned keys.
Show child parameters
daystringrequiredkeystringrequiredrevenuenumberrequiredother_revenuenumberrequiredRevenue of keys beyond
limit.rowsRevenueBreakdownRow[]requiredTop keys by revenue, highest first. An empty key means the property was not set.
Show child parameters
keystringrequiredpurchasesintegerrequiredrevenuenumberrequiredsharenumberrequiredShare of total revenue, 0..=1.
total_revenuenumberrequiredunconverted_purchasesintegerrequired400
404
503
GET
https://lucidace.com /v1/projects/{project_id}/web/revenue/config Scope insight:readParameters
project_idstringpathrequiredCode samples
cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/web/revenue/config"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Saved mapping, or the defaults
Example
{
"base_currency": "USD",
"churn_at_last_event": false,
"churn_dropoff_days": null,
"coupon_property": "",
"currency_property": "$currency",
"extra_events": [],
"fx_feed": "",
"fx_feed_error": "",
"fx_feed_synced_at": null,
"fx_feed_url": "",
"minor_units": false,
"mrr_property": "$mrr",
"period_end_property": "period_end",
"period_start_property": "period_start",
"product_property": "",
"purchase_event": "$purchase",
"revenue_property": "$revenue",
"static_currency": "",
"sub_cancelled_event": "$subscription_cancelled",
"sub_renewed_event": "$subscription_renewed",
"sub_started_event": "$subscription_started",
"subscription_id_property": "$subscription_id"
}Schema
base_currencystringchurn_at_last_eventbooleanDate implicit churn at the last event instead of at the end of the dropoff.
churn_dropoff_daysintegerImplicit churn: a subscription with no event for this many days is churned.
coupon_propertystringcurrency_propertystringextra_eventsRevenueEvent[]Up to 19 more revenue events.
Show child parameters
currency_propertystringEmpty: the static currency (or the base) applies.
eventstringrequiredrevenue_propertystringrequiredfx_feedstringAutomatic dated rates:
"" (off), "ecb" (European Central Bank reference rates, daily) or "url" (a JSON rates document at fx_feed_url, fetched by lc-connectors).fx_feed_errorstringLast feed sync error, empty when it worked (read-only).
fx_feed_synced_atstringLast feed sync (read-only).
fx_feed_urlstringhttps:// URL of the JSON rates feed (fx_feed = "url"), e.g. an exchange-rate API endpoint.minor_unitsbooleanAmounts arrive in minor units (cents); divided by the currency's exponent.
mrr_propertystringperiod_end_propertystringperiod_start_propertystringService-period properties of invoice events, for deferred revenue.
product_propertystringBreakdown properties; empty when not tracked.
purchase_eventstringrevenue_propertystringstatic_currencystringCurrency of events that carry none (empty: the base currency).
sub_cancelled_eventstringsub_renewed_eventstringsub_started_eventstringsubscription_id_propertystring404
PUT
https://lucidace.com /v1/projects/{project_id}/web/revenue/config Scope insight:writeParameters
project_idstringpathrequiredRequest body
application/json
base_currencystringchurn_at_last_eventbooleanDate implicit churn at the last event instead of at the end of the dropoff.
churn_dropoff_daysintegerImplicit churn: a subscription with no event for this many days is churned.
coupon_propertystringcurrency_propertystringextra_eventsRevenueEvent[]Up to 19 more revenue events.
Show child parameters
currency_propertystringEmpty: the static currency (or the base) applies.
eventstringrequiredrevenue_propertystringrequiredfx_feedstringAutomatic dated rates:
"" (off), "ecb" (European Central Bank reference rates, daily) or "url" (a JSON rates document at fx_feed_url, fetched by lc-connectors).fx_feed_errorstringLast feed sync error, empty when it worked (read-only).
fx_feed_synced_atstringLast feed sync (read-only).
fx_feed_urlstringhttps:// URL of the JSON rates feed (fx_feed = "url"), e.g. an exchange-rate API endpoint.minor_unitsbooleanAmounts arrive in minor units (cents); divided by the currency's exponent.
mrr_propertystringperiod_end_propertystringperiod_start_propertystringService-period properties of invoice events, for deferred revenue.
product_propertystringBreakdown properties; empty when not tracked.
purchase_eventstringrevenue_propertystringstatic_currencystringCurrency of events that carry none (empty: the base currency).
sub_cancelled_eventstringsub_renewed_eventstringsub_started_eventstringsubscription_id_propertystring{
"base_currency": "USD",
"churn_at_last_event": false,
"churn_dropoff_days": null,
"coupon_property": "",
"currency_property": "$currency",
"extra_events": [],
"fx_feed": "",
"fx_feed_error": "",
"fx_feed_synced_at": null,
"fx_feed_url": "",
"minor_units": false,
"mrr_property": "$mrr",
"period_end_property": "period_end",
"period_start_property": "period_start",
"product_property": "",
"purchase_event": "$purchase",
"revenue_property": "$revenue",
"static_currency": "",
"sub_cancelled_event": "$subscription_cancelled",
"sub_renewed_event": "$subscription_renewed",
"sub_started_event": "$subscription_started",
"subscription_id_property": "$subscription_id"
}Code samples
cURL
curl -X PUT "https://lucidace.com/v1/projects/{project_id}/web/revenue/config" \
-H "Content-Type: application/json" \
-d '{"base_currency":"USD","churn_at_last_event":false,"churn_dropoff_days":null,"coupon_property":"","currency_property":"$currency","extra_events":[],"fx_feed":"","fx_feed_error":"","fx_feed_synced_at":null,"fx_feed_url":"","minor_units":false,"mrr_property":"$mrr","period_end_property":"period_end","period_start_property":"period_start","product_property":"","purchase_event":"$purchase","revenue_property":"$revenue","static_currency":"","sub_cancelled_event":"$subscription_cancelled","sub_renewed_event":"$subscription_renewed","sub_started_event":"$subscription_started","subscription_id_property":"$subscription_id"}'TypeScript
Python
Go
PHP
Ruby
Java
GET
https://lucidace.com /v1/projects/{project_id}/web/revenue/customers Scope insight:readParameters
project_idstringpathrequiredlimitintegerquerycursorstringqueryCode samples
cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/web/revenue/customers"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Page of CustomerMapping by customer id
Example
{
"data": [
{
"created_at": "2024-01-01T00:00:00Z",
"customer_id": "string",
"person_id": "string"
}
],
"next_cursor": "string"
}Schema
dataCustomerMapping[]requiredShow child parameters
created_atstringrequiredcustomer_idstringrequiredperson_idstringrequirednext_cursorstring404
PUT
https://lucidace.com /v1/projects/{project_id}/web/revenue/customers/{customer_id} Scope insight:writeParameters
project_idstringpathrequiredcustomer_idstringpathrequiredRequest body
application/json
person_idstringrequiredThe person the customer's revenue counts for.
{
"person_id": "string"
}Code samples
cURL
curl -X PUT "https://lucidace.com/v1/projects/{project_id}/web/revenue/customers/{customer_id}" \
-H "Content-Type: application/json" \
-d '{"person_id":"string"}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Created or re-pointed; applies at the next lifetime refresh
Example
{
"created_at": "2024-01-01T00:00:00Z",
"customer_id": "string",
"person_id": "string"
}Schema
created_atstringrequiredcustomer_idstringrequiredperson_idstringrequired400
403
404
DELETE
https://lucidace.com /v1/projects/{project_id}/web/revenue/customers/{customer_id} Scope insight:writeParameters
project_idstringpathrequiredcustomer_idstringpathrequiredCode samples
cURL
curl -X DELETE "https://lucidace.com/v1/projects/{project_id}/web/revenue/customers/{customer_id}"TypeScript
Python
Go
PHP
Ruby
Java
Responses
204
403
404
Updated