*.onsleek.io API endpoints to the new *.onsleek.ai endpoints for cashback offers, coupons, promotions, and transactions.
The migration primarily involves:
-
Changing the base API URL
All requests should now usehttps://api.onsleek.ai/instead ofhttps://api.onsleek.io/. -
Adding a
/deals/prefix to all endpoints
Endpoints for cashback offers, coupons, promotions, and transactions are now grouped under the/v1/deals/namespace.
For example,/v1/cashback-offers/becomes/v1/deals/cashback-offers/. -
Switching activation ID from query parameter to path parameter
Activation endpoints no longer use query parameters like?couponId=abc123.
Instead, IDs are passed directly in the path:/v1/deals/coupons/{id}/activate. -
Preserving GET activation behavior
GETactivation endpoints still perform a302redirect to the affiliate URL.
There is no change in behavior, only the URL format has changed. -
Updating POST activation response structure
POSTactivation endpoints still return the affiliate URL, but instead of a plain string,
the response is now a JSON object:
{ "url": "https://affiliate.example.com" }
TL;DR
- ✅ Update your base URL to
https://api.onsleek.ai/ - ✅ Use
{id}in the path for activation endpoints instead of query parameters - ✅ All deal endpoints now live under
/v1/deals/... - ✅ Activation behavior (
POST+302redirect) remains the same
Cashback Offers
| Method | Old Endpoint | New Endpoint |
|---|---|---|
GET | /v1/cashback-offers/activate?cashbackOfferId={id}&orgId=... | /v1/deals/cashback-offers/{id}/activate?orgId=... |
POST | /v1/cashback-offers/activate?cashbackOfferId={id}&orgId=... | /v1/deals/cashback-offers/{id}/activate?orgId=... |
GET | /v1/cashback-offers/ | /v1/deals/cashback-offers/ |
GET | /v1/cashback-offers/{id} | /v1/deals/cashback-offers/{id} |
Change 1: Activation endpoints now use a path param
{id} instead of the cashbackOfferId query param.Change 2: The new activation endpoints are under
/deals/.Change 3:
GET activation endpoint triggers a 302 redirect (same behavior), but POST now returns a structured JSON response: { url: string } (previously a raw string).GET: 302 redirect to affiliate URLPOST: Returns{ url: "https://..." }
- Get Cashback Offers
- Get Cashback Offer by ID
- Activate Cashback Offer (Redirect)
- Activate Cashback Offer (JSON)
Coupons
| Method | Old Endpoint | New Endpoint |
|---|---|---|
GET | /v1/coupons/activate?couponId={id}&orgId=... | /v1/deals/coupons/{id}/activate?orgId=... |
POST | /v1/coupons/activate?couponId={id}&orgId=... | /v1/deals/coupons/{id}/activate?orgId=... |
GET | /v1/coupons/ | /v1/deals/coupons/ |
GET | /v1/coupons/{id} | /v1/deals/coupons/{id} |
Change 4: Activation endpoints now use a path param
{id} instead of the couponId query param.Change 5: The new activation endpoints are under
/deals/.Change 6:
GET activation endpoint triggers a 302 redirect (same behavior), but POST now returns a structured JSON response: { url: string } (previously a raw string).GET: 302 redirect to affiliate URLPOST: Returns{ url: "https://..." }
Promotions
| Method | Old Endpoint | New Endpoint |
|---|---|---|
GET | /v1/promotions/activate?promotionId={id}&orgId=... | /v1/deals/promotions/{id}/activate?orgId=... |
POST | /v1/promotions/activate?promotionId={id}&orgId=... | /v1/deals/promotions/{id}/activate?orgId=... |
GET | /v1/promotions/ | /v1/deals/promotions/ |
GET | /v1/promotions/{id} | /v1/deals/promotions/{id} |
Change 7: Activation endpoints now use a path param
{id} instead of the promotionId query param.Change 8: The new activation endpoints are under
/deals/.Change 9:
GET activation endpoint triggers a 302 redirect (same behavior), but POST now returns a structured JSON response: { url: string } (previously a raw string).GET: 302 redirect to affiliate URLPOST: Returns{ url: "https://..." }
Transactions
| Method | Old Endpoint | New Endpoint |
|---|---|---|
GET | /v1/transactions/ | /v1/deals/transactions/ |
Change 10: Transactions endpoint is now namespaced under
/deals/.
