web

Embed
Preview of the card
<a href="https://lucidace.com/docs/ref-web"><img src="https://lucidace.com/docs/_api/public/orgs/af34862a-c837-4478-8335-0505efe40459/spaces/da916cd3-c0fc-4b63-b971-b3c13623daf3/pages/c98607d6-613a-4769-ba8d-1fd655470740/social-card.svg?v=3e7ae33eec8b" alt="web" width="600" height="315"></a>
GEThttps://lucidace.com/v1/projects/{project_id}/web/revenue/breakdownScope insight:read

Parameters

project_idstringpathrequired
fromstringpathrequired
tostringpathrequired
bystringpathrequired
product (default), coupon, event, currency, property, person or group.
propertystringpathrequired
The property for by=property.
group_type_indexintegerpathrequired
Group type index 0..=4 for by=group.
limitintegerpathrequired
Keys 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_currencystringrequired
bystringrequired
dailyRevenueBreakdownDay[]required
Daily revenue of the returned keys.
Show child parameters
daystringrequired
keystringrequired
revenuenumberrequired
other_revenuenumberrequired
Revenue of keys beyond limit.
rowsRevenueBreakdownRow[]required
Top keys by revenue, highest first. An empty key means the property was not set.
Show child parameters
keystringrequired
purchasesintegerrequired
revenuenumberrequired
sharenumberrequired
Share of total revenue, 0..=1.
total_revenuenumberrequired
unconverted_purchasesintegerrequired
400
404
503
GEThttps://lucidace.com/v1/projects/{project_id}/web/revenue/configScope insight:read

Parameters

project_idstringpathrequired

Code 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_currencystring
= USD
churn_at_last_eventboolean
Date implicit churn at the last event instead of at the end of the dropoff.
= false
churn_dropoff_daysinteger
Implicit churn: a subscription with no event for this many days is churned.
= null
coupon_propertystring
currency_propertystring
= $currency
extra_eventsRevenueEvent[]
Up to 19 more revenue events.
= []
Show child parameters
currency_propertystring
Empty: the static currency (or the base) applies.
eventstringrequired
revenue_propertystringrequired
fx_feedstring
Automatic 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_errorstring
Last feed sync error, empty when it worked (read-only).
fx_feed_synced_atstring
Last feed sync (read-only).
= null
fx_feed_urlstring
https:// URL of the JSON rates feed (fx_feed = "url"), e.g. an exchange-rate API endpoint.
minor_unitsboolean
Amounts arrive in minor units (cents); divided by the currency's exponent.
= false
mrr_propertystring
= $mrr
period_end_propertystring
= period_end
period_start_propertystring
Service-period properties of invoice events, for deferred revenue.
= period_start
product_propertystring
Breakdown properties; empty when not tracked.
purchase_eventstring
= $purchase
revenue_propertystring
= $revenue
static_currencystring
Currency of events that carry none (empty: the base currency).
sub_cancelled_eventstring
= $subscription_cancelled
sub_renewed_eventstring
= $subscription_renewed
sub_started_eventstring
= $subscription_started
subscription_id_propertystring
= $subscription_id
404
PUThttps://lucidace.com/v1/projects/{project_id}/web/revenue/configScope insight:write

Parameters

project_idstringpathrequired

Request body

application/json
base_currencystring
= USD
churn_at_last_eventboolean
Date implicit churn at the last event instead of at the end of the dropoff.
= false
churn_dropoff_daysinteger
Implicit churn: a subscription with no event for this many days is churned.
= null
coupon_propertystring
currency_propertystring
= $currency
extra_eventsRevenueEvent[]
Up to 19 more revenue events.
= []
Show child parameters
currency_propertystring
Empty: the static currency (or the base) applies.
eventstringrequired
revenue_propertystringrequired
fx_feedstring
Automatic 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_errorstring
Last feed sync error, empty when it worked (read-only).
fx_feed_synced_atstring
Last feed sync (read-only).
= null
fx_feed_urlstring
https:// URL of the JSON rates feed (fx_feed = "url"), e.g. an exchange-rate API endpoint.
minor_unitsboolean
Amounts arrive in minor units (cents); divided by the currency's exponent.
= false
mrr_propertystring
= $mrr
period_end_propertystring
= period_end
period_start_propertystring
Service-period properties of invoice events, for deferred revenue.
= period_start
product_propertystring
Breakdown properties; empty when not tracked.
purchase_eventstring
= $purchase
revenue_propertystring
= $revenue
static_currencystring
Currency of events that carry none (empty: the base currency).
sub_cancelled_eventstring
= $subscription_cancelled
sub_renewed_eventstring
= $subscription_renewed
sub_started_eventstring
= $subscription_started
subscription_id_propertystring
= $subscription_id
{
  "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

Responses

400
403
404
GEThttps://lucidace.com/v1/projects/{project_id}/web/revenue/customersScope insight:read

Parameters

project_idstringpathrequired
limitintegerquery
cursorstringquery

Code 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[]required
Show child parameters
created_atstringrequired
customer_idstringrequired
person_idstringrequired
next_cursorstring
404
PUThttps://lucidace.com/v1/projects/{project_id}/web/revenue/customers/{customer_id}Scope insight:write

Parameters

project_idstringpathrequired
customer_idstringpathrequired

Request body

application/json
person_idstringrequired
The 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_atstringrequired
customer_idstringrequired
person_idstringrequired
400
403
404
DELETEhttps://lucidace.com/v1/projects/{project_id}/web/revenue/customers/{customer_id}Scope insight:write

Parameters

project_idstringpathrequired
customer_idstringpathrequired

Code 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