Affiliate
onelence_get_affiliateOne affiliate partner by id or referral code: status, codes, clicks, conversions and conversion rate, all time unless start or end is passed; with start, compare=previous_period adds the period before. Metrics are null when attribution could not be read. For the partner's Decision use onelence_list_decisions with type=affiliate.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"affiliate_id": "<affiliate_id>"
},
"name": "onelence_get_affiliate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | No | Count up to this date (inclusive) or ISO 8601 date-time. Without end, there is no upper bound. | |
| start | No | Count clicks and conversions from this date (YYYY-MM-DD) or ISO 8601 date-time. Without start, there is no lower bound; without either, all time. | |
| compare | No | previous_period adds each partner's clicks and conversions in the same-length window right before start, with the percent change (default none). Needs start. | |
| affiliate_id | Yes | The partner id from the affiliates list, or its referral code. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| code | Yes | ||
| name | Yes | ||
| clicks | Yes | ||
| object | Yes | ||
| status | Yes | ||
| window | Yes | ||
| site_id | Yes | ||
| comparison | Yes | ||
| created_at | Yes | ||
| conversions | Yes | ||
| coupon_codes | Yes | ||
| metrics_state | Yes | ||
| previous_clicks | No | ||
| clicks_change_pct | No | ||
| conversion_rate_pct | Yes | ||
| previous_conversions | No | ||
| conversions_change_pct | No |