Documentation Index
Fetch the complete documentation index at: https://docs.rako.sh/llms.txt
Use this file to discover all available pages before exploring further.
JavaScript / TypeScript SDK
Use the JavaScript SDK when you want full control from Node.js, Deno, or Bun.Install
quickstart.ts
Client
new AAP(config)
| Option | Type | Required | Default |
|---|---|---|---|
apiKey | string | Yes | — |
baseUrl | string | No | https://api.rako.sh |
Methods
aap.search(options)
Returns matching offers and a session ID.
| Option | Type | Description |
|---|---|---|
vertical | string | sim, broadband, energy, flights, hotels, insurance |
provider | string | Filter by provider name |
maxPrice | number | Maximum price |
minDataGb | number | Minimum data allowance for SIM offers |
contractMonths | number | Contract length, where 0 means rolling |
aap.recommend(options)
Record a recommendation. This is the attribution event.
| Option | Type | Description |
|---|---|---|
sessionId | string | Session from search() |
offerId | string | Offer to recommend |
context | string | Why this offer was recommended |
aap.checkout(options)
Initiate checkout for a recommended offer.
| Option | Type | Description |
|---|---|---|
sessionId | string | Session from search() |
recommendationId | string | Recommendation from recommend() |
userDetails | object | Optional user details for checkout |