How to Pull Reports via the CAKE API

This article will cover the following:


Overview

CAKE's Reporting API gives you programmatic access to the same performance data available in the dashboard. All endpoints use GET requests, return paginated JSON, and require start_date and end_date in YYYY-MM-DD format.

Tip:
Use start_at_row and row_limit to paginate through large result sets. The response always includes a total row count so you can calculate remaining pages.

Offer Report

Returns performance metrics broken down by offer.

GET /api/2/report/offer.json
ParameterTypeRequiredDescription
start_datedateYesReport start date (YYYY-MM-DD).
end_datedateYesReport end date (YYYY-MM-DD).
offer_idintegerNoFilter to a single offer.
affiliate_idintegerNoFilter to a single affiliate.
advertiser_idintegerNoFilter to a single advertiser.
start_at_rowintegerNoPagination offset. Default: 0.
row_limitintegerNoMax rows. Default: 25.

Sample request

GET https://yourdomain.cakemarketing.com/api/2/report/offer.json ?api_key=YOUR_API_KEY &start_date=2024-01-01 &end_date=2024-01-31 &offer_id=12345

Sample response

{ "request_status": "Success", "offer_report": [{ "offer_id": 12345, "offer_name": "Summer Promo", "impressions": 14200, "clicks": 3840, "conversions": 192, "revenue": 1800.00, "cost": 900.00, "profit": 900.00, "cr": 0.0500 }] }

Affiliate Report

Returns performance metrics broken down by affiliate.

GET /api/2/report/affiliate.json
ParameterTypeRequiredDescription
start_datedateYesReport start date (YYYY-MM-DD).
end_datedateYesReport end date (YYYY-MM-DD).
affiliate_idintegerNoFilter to a single affiliate.
offer_idintegerNoFilter to a single offer.
start_at_rowintegerNoPagination offset. Default: 0.
row_limitintegerNoMax rows. Default: 25.

Sample request

GET https://yourdomain.cakemarketing.com/api/2/report/affiliate.json ?api_key=YOUR_API_KEY &start_date=2024-01-01 &end_date=2024-01-31 &affiliate_id=67890

Sample response

{ "request_status": "Success", "affiliate_report": [{ "affiliate_id": 67890, "affiliate_name": "Acme Media", "clicks": 2100, "conversions": 105, "revenue": 980.00, "cost": 490.00, "cr": 0.0500, "epc": 0.467 }] }

Advertiser Report

Returns performance metrics broken down by advertiser.

GET /api/2/report/advertiser.json
ParameterTypeRequiredDescription
start_datedateYesReport start date (YYYY-MM-DD).
end_datedateYesReport end date (YYYY-MM-DD).
advertiser_idintegerNoFilter to a single advertiser.
offer_idintegerNoFilter to a single offer.
start_at_rowintegerNoPagination offset. Default: 0.
row_limitintegerNoMax rows. Default: 25.

Sample request

GET https://yourdomain.cakemarketing.com/api/2/report/advertiser.json ?api_key=YOUR_API_KEY &start_date=2024-01-01 &end_date=2024-01-31 &advertiser_id=88

Sample response

{ "request_status": "Success", "advertiser_report": [{ "advertiser_id": 88, "advertiser_name": "Acme Financial", "clicks": 5400, "conversions": 270, "revenue": 14850.00, "cost": 12150.00, "profit": 2700.00 }] }

Conversion Report

Returns individual conversion records for reconciliation and dispute resolution.

GET /api/2/report/conversions.json
ParameterTypeRequiredDescription
start_datedateYesReport start date (YYYY-MM-DD).
end_datedateYesReport end date (YYYY-MM-DD).
offer_idintegerNoFilter to a single offer.
affiliate_idintegerNoFilter to a single affiliate.
conversion_statusstringNoFilter by status: approved, pending, or rejected.
start_at_rowintegerNoPagination offset. Default: 0.
row_limitintegerNoMax rows. Default: 100; max: 500.

Sample request

GET https://yourdomain.cakemarketing.com/api/2/report/conversions.json ?api_key=YOUR_API_KEY &start_date=2024-01-01 &end_date=2024-01-31 &conversion_status=approved

Sample response

{ "request_status": "Success", "total_rows": 270, "conversions": [{ "conversion_id": 4456789, "offer_id": 12345, "affiliate_id": 67890, "payout": 5.00, "conversion_status": "approved", "conversion_date": "2024-01-03T09:11:00Z" }] }

Sub ID Report

Returns performance broken down by the sub IDs affiliates pass in their tracking links — useful for granular placement-level analysis.

GET /api/2/report/sub_id.json
ParameterTypeRequiredDescription
start_datedateYesReport start date (YYYY-MM-DD).
end_datedateYesReport end date (YYYY-MM-DD).
affiliate_idintegerNoFilter to a single affiliate.
offer_idintegerNoFilter to a single offer.
sub_idstringNoFilter to a specific sub ID value.
start_at_rowintegerNoPagination offset. Default: 0.
row_limitintegerNoMax rows. Default: 25.

Sample request

GET https://yourdomain.cakemarketing.com/api/2/report/sub_id.json ?api_key=YOUR_API_KEY &start_date=2024-01-01 &end_date=2024-01-31 &affiliate_id=67890

Sample response

{ "request_status": "Success", "sub_id_report": [ {"sub_id": "placement_email", "clicks": 840, "conversions": 42, "revenue": 420.00}, {"sub_id": "placement_banner", "clicks": 1260, "conversions": 63, "revenue": 630.00} ] }

If you have any questions, please reach out to your dedicated CAKE Client Success Manager/Account Manager or contact the CAKE Support Team at support@getCAKE.com.


Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.