Get revenue attribution report
const url = 'https://api.ultimateteam.ai/api/v1/reports/revenue?period=7d';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/reports/revenue?period=7d' \ --header 'X-API-Key: <X-API-Key>'Returns revenue attribution data broken down by channel for the specified period.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters”Attribution period
Attribution period
Responses
Section titled “ Responses ”Successful Response
Envelope response for the revenue attribution endpoint.
Attributes: data: The revenue attribution payload. meta: Standard response metadata.
object
Inner data payload for revenue attribution responses.
Attributes: period: The reporting period (e.g. “7d”, “30d”, “90d”). total_revenue: Total revenue across all channels. channels: Per-channel revenue breakdown. generated_at: When the report was generated.
object
Revenue attributed to a single channel or source.
Attributes: channel: Name of the revenue channel. revenue: Total revenue from this channel. percentage: Share of total revenue. actions_count: Number of agent actions that contributed.
object
Standard metadata included in every API response.
Attributes: request_id: Unique identifier for this request. timestamp: When the response was generated.
object
Unique identifier for this request
When the response was generated
Example
{ "data": { "channels": [ { "actions_count": 0, "percentage": 0, "revenue": 0 } ], "total_revenue": 0 }}Validation Error
object
object
object
Examplegenerated
{ "detail": [ { "ctx": {}, "input": "example", "loc": [ "example" ], "msg": "example", "type": "example" } ]}