Per-tenant LTV prediction
GET
/api/v1/ml/ltv/{tenant_id}
const url = 'https://api.ultimateteam.ai/api/v1/ml/ltv/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = {method: 'GET', headers: {'X-API-Key': '<X-API-Key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.ultimateteam.ai/api/v1/ml/ltv/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'X-API-Key: <X-API-Key>'Return the latest LTV prediction for a single tenant (admin/owner).
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”tenant_id
required
Tenant Id
string format: uuid
Responses
Section titled “ Responses ”Successful Response
Media typeapplication/json
LTVPrediction
Output of the predictive LTV scoring model.
Attributes: tenant_id: Tenant this LTV score is for. ltv_amount: Predicted lifetime value in dollars, >= 0. segment: LTV segment classification. payback_months: Estimated months to recover acquisition cost. confidence: Model confidence, 0.0 to 1.0. cold_start: True if tenant has < 14 days of data. model_version: Version of the model used. computed_at: When this LTV was computed.
object
cold_start
required
Cold Start
boolean
computed_at
required
Computed At
string format: date-time
confidence
required
Confidence
number
ltv_amount
required
Ltv Amount
number
model_version
required
Model Version
integer
segment
required
Segment
string
tenant_id
required
Tenant Id
string format: uuid
Example
{ "segment": "high_value"}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{ "detail": [ { "ctx": {}, "input": "example", "loc": [ "example" ], "msg": "example", "type": "example" } ]}