Skip to content

Get In Call Payments

GET
/api/v1/in-call-payments
curl --request GET \
--url 'https://api.ultimateteam.ai/api/v1/in-call-payments?period=7d' \
--header 'X-API-Key: <X-API-Key>'

Return in-call vs follow-up collection metrics for the period.

Args: period: One of 7d, 30d, 90d. FastAPI returns 422 on any other value via the Literal validator. current_tenant: Authenticated tenant context (RLS boundary). session: Async SQLAlchemy session.

Returns: :class:InCallPaymentMetrics scoped to the tenant.

period
Period
string
default: 30d
Allowed values: 7d 30d 90d

Successful Response

Media typeapplication/json
InCallPaymentMetrics

Aggregated collection metrics for a tenant over a period window.

All monetary values are cents. Conversion rates are 0.0-1.0 inclusive. avg_days_to_collect_* is None when the corresponding sample_count_* is zero – division by zero is not a zero, it’s undefined, and the frontend renders a dash.

object
avg_days_to_collect_followup
required
Any of:
number
avg_days_to_collect_in_call
required
Any of:
number
followup_conversion_rate
required
Followup Conversion Rate
number
<= 1
in_call_conversion_rate
required
In Call Conversion Rate
number
<= 1
period_days
required
Period Days
integer
> 0
sample_count_followup
required
Sample Count Followup
integer
sample_count_in_call
required
Sample Count In Call
integer
total_followup_cents
required
Total Followup Cents
integer
total_in_call_cents
required
Total In Call Cents
integer
Examplegenerated
{
"avg_days_to_collect_followup": 1,
"avg_days_to_collect_in_call": 1,
"followup_conversion_rate": 1,
"in_call_conversion_rate": 1,
"period_days": 1,
"sample_count_followup": 1,
"sample_count_in_call": 1,
"total_followup_cents": 1,
"total_in_call_cents": 1
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
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"
}
]
}