Add the referralCode field on a Route or Bundle request that should be attributed to a campaign or integration surface. The executing contract emits a ShortcutExecuted event you can analyze later.
Definition
Request tracking tags the transaction the API builds so usage and rewards associated with that code can be read on-chain.
How it works
Include
referralCodeonPOST /api/v1/shortcuts/routeorPOST /api/v1/shortcuts/bundle(on Bundle it is a request option, not an action field).When the transaction runs, the contract emits
ShortcutExecuted(accountId, requestId).Use
accountIdto identify requests from your project’s integration.In
requestId, the higher 16 bytes contain thereferralCode.
How Enso does this
The field and event layout are documented in Request Tracking. The Bundle API lists referralCode among request options. This is not a partner-fee parameter; fees are configured in the Developer Portal.
Use a stable code your backend can recognize later. The request-tracking guide does not describe the referral code as changing pathfinding or fees.
FAQ
Does the referral code belong in the action array?
No. On Bundle it is a request option (a query parameter in REST, or part of the first SDK argument), not an action.
Is a referral code required?
No. Add it only when you want that on-chain attribution.
Related articles
What is request tracking or a referral code?
How do I set a partner fee on user trades?
How do I call the Route API with curl?
How do I authenticate Enso API requests?
What is the Enso Bundle API?
