This article will cover the following:
When to use these endpoints:
Use these endpoints to automate invoice generation at billing cycle end, update invoice status as payments are processed, and export invoice-level conversion data to accounting systems.
Use these endpoints to automate invoice generation at billing cycle end, update invoice status as payments are processed, and export invoice-level conversion data to accounting systems.
Authentication: All CAKE API requests require your
api_key parameter. Find yours under Setup → System Access → API Keys.Part of a series: This focused guide covers specific endpoints from the complete CAKE API — Billing & Payments reference, which documents all available endpoints for this feature area.
Available Endpoints
Get Invoices
Retrieves invoice records based on filter criteria. Use for reconciliation, exporting to external accounting systems, auditing payment history, or monitoring pending/approved invoices.
When to use: Pull invoice data for reconciliation; export to QuickBooks or other accounting systems; monitor payment status across a billing period.
GET /api/2/invoices.json| Parameter | Type | Required | Description |
|---|---|---|---|
| api_key | string | Yes | Your CAKE API key. |
| invoice_id | integer | No | Filter to a specific invoice. |
| affiliate_id | integer | No | Filter by affiliate. |
| advertiser_id | integer | No | Filter by advertiser. |
| invoice_status | string | No | Pending | Approved | Paid | Void |
| start_date | date | No | Start of date range (YYYY-MM-DD). |
| end_date | date | No | End of date range (YYYY-MM-DD). |
| start_at_row | integer | No | Pagination offset. Default 1. |
| row_limit | integer | No | Max records. Default 100, max 10000. |
Sample request
GET https://yourdomain.cakemarketing.com/api/2/invoices.json?api_key=YOUR_API_KEY&affiliate_id=67890&invoice_status=Approved&start_date=2026-01-01&end_date=2026-01-31&start_at_row=1&row_limit=50Sample response
{
"request_status": "Success",
"response": {
"invoices": [
{
"invoice_id": 10042,
"invoice_date": "2026-01-31",
"invoice_status": "Approved",
"affiliate_id": 67890,
"affiliate_name": "MediaBridge Partners",
"billing_cycle_name": "Net 30",
"currency_symbol": "USD",
"total_payout": "4825.50",
"payment_type": "PayPal",
"date_approved": "2026-02-05"
}
],
"total_rows": 1
}
}You may also be interested in:
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.