A referral code is a value you send with a Route or Bundle request so usage and rewards associated with that code can be tracked on-chain.
Definition
Request tracking tags the transaction the API builds with a referralCode. When the transaction runs, the executing Enso contract emits a ShortcutExecuted event that you can analyze later.
How it works
Add
referralCodeon Route or Bundle requests that should be attributed to a campaign or integration surface.Each of those transactions emits
ShortcutExecuted(accountId, requestId).accountIdis uniquely associated with your account and identifies requests from your project’s integration.In
requestId, the higher 16 bytes contain thereferralCode.
How Enso does this
The field is documented as referralCode on both /route and /bundle. Implementation is described in Request Tracking. You attribute volume by reading the on-chain event, not by a separate analytics parameter in the quote response.
FAQ
Does a referral code change the route path?
The request-tracking guide describes tagging for usage and rewards. It does not describe a change to pathfinding.
Is this the same as a partner fee?
No. Partner fees are configured in the Developer Portal and appear in feeAmount and feeBreakdown. A referral code is an on-chain tracking tag.
Related articles
How do I tag a request with a referral code?
How do I set a partner fee on user trades?
What is the Enso Route API?
What is the Enso Bundle API?
How do I authenticate Enso API requests?
