Partners
B2B attribution: partner analytics, strategy policy and revenue share reporting
Returns chains supported by the partners service.
Admin key for privileged operations (create/edit/delete).
OK
Distributor is the TokenDistributor contract address on this chain (empty if not deployed)
Internal Server Error
GET /api/v1/partners/supported-chains HTTP/1.1
Host: core-dev.yifi.io
Authorization: YOUR_API_KEY
Accept: */*
[
{
"chain_id": 1,
"chain_name": "text",
"distributor": "text",
"provider": "text"
}
]Returns all API keys for a partner.
Admin key for privileged operations (create/edit/delete).
Partner ID
OK
essential key to be used by
чтобы декриптнуть локально
this is his secret token to sign, shown just one time
Internal Server Error
GET /api/v1/partners/{partner_id}/api-keys HTTP/1.1
Host: core-dev.yifi.io
Authorization: YOUR_API_KEY
Accept: */*
[
{
"api_key": "text",
"created_at": "text",
"hash": [
1
],
"meta": null,
"name": "text",
"prefix": "text",
"revoked_at": "text",
"secret_byte": [
1
],
"status": true
}
]Creates a new API key for a partner.
Admin key for privileged operations (create/edit/delete).
Partner ID
OK
essential key to be used by
чтобы декриптнуть локально
this is his secret token to sign, shown just one time
Bad Request
Internal Server Error
POST /api/v1/partners/{partner_id}/api-keys HTTP/1.1
Host: core-dev.yifi.io
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 15
{
"name": "text"
}{
"api_key": "text",
"created_at": "text",
"hash": [
1
],
"meta": null,
"name": "text",
"prefix": "text",
"revoked_at": "text",
"secret": "text",
"secret_byte": [
1
],
"status": true
}Revokes a partner API key.
Admin key for privileged operations (create/edit/delete).
Partner ID
API key
OK
Bad Request
Internal Server Error
DELETE /api/v1/partners/{partner_id}/api-keys/{api_key} HTTP/1.1
Host: core-dev.yifi.io
Authorization: YOUR_API_KEY
Accept: */*
{
"message": "text"
}Returns all claim addresses for a partner.
Admin key for privileged operations (create/edit/delete).
Partner ID
OK
Internal Server Error
GET /api/v1/partners/{partner_id}/claim-addresses HTTP/1.1
Host: core-dev.yifi.io
Authorization: YOUR_API_KEY
Accept: */*
[
{
"address": "text",
"chain_id": 1,
"created_at": "text",
"name": "text",
"partner_id": "text",
"status": true,
"updated_at": "text"
}
]Adds a new claim address for a partner.
Admin key for privileged operations (create/edit/delete).
Partner ID
OK
Bad Request
Internal Server Error
POST /api/v1/partners/{partner_id}/claim-addresses HTTP/1.1
Host: core-dev.yifi.io
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 65
{
"address": "text",
"chain_id": 1,
"name": "text",
"partner_id": "text"
}{
"message": "text"
}Updates an existing claim address for a partner.
Admin key for privileged operations (create/edit/delete).
Partner ID
Claim address
OK
Bad Request
Internal Server Error
PUT /api/v1/partners/{partner_id}/claim-addresses/{address} HTTP/1.1
Host: core-dev.yifi.io
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 119
{
"address": "text",
"chain_id": 1,
"created_at": "text",
"name": "text",
"partner_id": "text",
"status": true,
"updated_at": "text"
}{
"message": "text"
}Returns the current fee balance for a partner.
Admin key for privileged operations (create/edit/delete).
Partner ID
OK
Internal Server Error
GET /api/v1/partners/{partner_id}/fee-balance HTTP/1.1
Host: core-dev.yifi.io
Authorization: YOUR_API_KEY
Accept: */*
{
"available_usd": "text",
"partner_id": "text",
"tokens": [
{
"amount": {
"free": "text",
"pending": "text",
"total": "text"
},
"chain_id": 1,
"token_id": "text"
}
],
"updated_at": "text"
}Submits a fee claim for a partner.
Admin key for privileged operations (create/edit/delete).
Partner ID
OK
Data is the unsigned claim()/claimAll() calldata the partner signs from their claim address (From) to the distributor (To), value 0.
Bad Request
Internal Server Error
POST /api/v1/partners/{partner_id}/fees/claim HTTP/1.1
Host: core-dev.yifi.io
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 103
{
"chain_id": "text",
"claim_address": "text",
"is_token_native": true,
"partner_id": "text",
"token_id": "text"
}{
"amount_sent": "text",
"chain_id": 1,
"claim_id": "text",
"data": "text",
"from": "text",
"to": "text",
"token_id": "text",
"tx_hash": "text"
}Claims every token's whole fee balance on a chain for a partner.
Admin key for privileged operations (create/edit/delete).
Partner ID
OK
Data is the unsigned claim()/claimAll() calldata the partner signs from their claim address (From) to the distributor (To), value 0.
Bad Request
Internal Server Error
POST /api/v1/partners/{partner_id}/fees/claim-all HTTP/1.1
Host: core-dev.yifi.io
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 2
{}{
"amount_sent": "text",
"chain_id": 1,
"claim_id": "text",
"data": "text",
"from": "text",
"to": "text",
"token_id": "text",
"tx_hash": "text"
}Returns aggregated partner metrics for the given time range.
Admin key for privileged operations (create/edit/delete).
Partner ID
From date (RFC3339 or YYYY-MM-DD)
To date (RFC3339 or YYYY-MM-DD)
OK
last time user updated (or us) his summuary (хранится в кэше, обновлять можно руками, можем сами)
Bad Request
Internal Server Error
GET /api/v1/partners/{partner_id}/metrics HTTP/1.1
Host: core-dev.yifi.io
Authorization: YOUR_API_KEY
Accept: */*
{
"items": [
{
"deposits_usd": "text",
"fees_earned_usd": "text",
"strategy_id": "text",
"users_count": 1,
"withdrawals_usd": "text"
}
],
"partner_id": "text",
"updated_at": "text"
}Returns the active policy for a partner.
Admin key for privileged operations (create/edit/delete).
Partner ID
OK
Internal Server Error
GET /api/v1/partners/{partner_id}/policy HTTP/1.1
Host: core-dev.yifi.io
Authorization: YOUR_API_KEY
Accept: */*
{
"allow_strategy_ids": [
"text"
],
"allowed_category_ids": [
"text"
],
"allowed_chain_ids": [
"text"
],
"deny_strategy_ids": [
"text"
],
"fees_policies": {
"common_fee": "text",
"strategies_fee": [
{
"partner_fee_preference": "text",
"strategy_id": "text"
}
]
},
"max_risk_level": "text",
"min_rate": "text",
"min_tvl_usd": "text",
"rate_type": "text",
"updated_at": "text"
}Replaces the partner policy.
Admin key for privileged operations (create/edit/delete).
Partner ID
OK
Bad Request
Internal Server Error
PUT /api/v1/partners/{partner_id}/policy HTTP/1.1
Host: core-dev.yifi.io
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 335
{
"allow_strategy_ids": [
"text"
],
"allowed_category_ids": [
"text"
],
"allowed_chain_ids": [
"text"
],
"deny_strategy_ids": [
"text"
],
"fees_policies": {
"common_fee": "text",
"strategies_fee": [
{
"partner_fee_preference": "text",
"strategy_id": "text"
}
]
},
"max_risk_level": "text",
"min_rate": "text",
"min_tvl_usd": "text",
"rate_type": "text",
"updated_at": "text"
}{
"message": "text"
}Returns summary stats for a partner for the given time range.
Admin key for privileged operations (create/edit/delete).
Partner ID
From date (RFC3339 or YYYY-MM-DD)
To date (RFC3339 or YYYY-MM-DD)
OK
last time user updated (or us) his summuary (хранится в кэше, обновлять можно руками, можем сами)
Bad Request
Internal Server Error
GET /api/v1/partners/{partner_id}/summary HTTP/1.1
Host: core-dev.yifi.io
Authorization: YOUR_API_KEY
Accept: */*
{
"deposits_usd": "text",
"fees_earned_usd": "text",
"from": "text",
"partner_id": "text",
"to": "text",
"updated_at": "text",
"users_count": 1,
"withdrawals_usd": "text"
}Last updated
Was this helpful?