ThoughtMetric

Customers

Customer lifetime value

GET https://thoughtmetric.io/api/v1/customer_ltv

The stored lifetime value series for your store. Each row is a point in time with lifetime value measured over several horizons.

Example request

curl -G https://thoughtmetric.io/api/v1/customer_ltv \
  -H "Authorization: Bearer 2019962dcf7a7b1fedc4563b9aaf9fc87426f278" \
  -d projectId=ID-bcd0aa692ce7e6b2 \
  -d startDate=2024-01-01 \
  -d endDate=2024-01-31 \
  -d interval=day

Query parameters

projectId string, required The Project ID of the store you are querying, e.g. ID-bcd0aa692ce7e6b2. Find it under Configure → API in the dashboard. The older numeric project ID is also accepted.
startDate string, required Start of the reporting window, YYYY-MM-DD. Inclusive.
endDate string, required End of the reporting window, YYYY-MM-DD. Inclusive. The window may not exceed six months.
interval string, required Bucket size for the over_time series: day, week, month or year.

Response

over_time array

One object per recorded point, oldest first.

timestamp string ISO 8601 timestamp for the data point.
ltv number Lifetime value across all time.
ltv30 number Lifetime value measured 30 days after first order.
ltv90 number Lifetime value measured 90 days after first order.
ltv1 number Lifetime value after one year.
ltv2 number Lifetime value after two years.
ltv5 number Lifetime value after five years.
total object

Always an empty object on this endpoint. All of the data is in over_time.

Example response

200 OK
{
  "total": {},
  "total_last_period": {},
  "over_time": [
    {
      "timestamp": "2024-01-01T00:00:00.000Z",
      "ltv": 184.22,
      "ltv30": 110.45,
      "ltv90": 142.80,
      "ltv1": 171.05,
      "ltv2": 180.90,
      "ltv5": 184.22
    }
  ],
  "over_time_last_period": []
}

Notes

  • This endpoint still returns the legacy envelope, so total_last_period and over_time_last_period are present but always empty.
  • interval is required by the API but does not affect the result. The series comes back at its stored resolution.