The CostReport API handles cost reporting for advertisers, allowing them to export cost-related data in JSON or CSV format.
Endpoints
1. Export (JSON Format)
URL: /api/v1/costReporting/GoKart/json
HTTP Method: GET
Request Body: CostReportFilter (JSON)
2. Export CSV (CSV Format)
URL: /api/v1/costReporting/GoKart/csv
HTTP Method: GET
Request Body: CostReportFilter (JSON)
Authentication
All requests must include an Advertiser API token in the Authorization header, which GoKart uses to identify your integration system.
Request Header:
Authorization: ApiToken {your-token}Replace {your-token} with the actual token provided by GoKart.
Follow these instructions to generate your Advertiser API Key
Request Schema
Field | Type | Description | Example |
date_from | DateTime | The start date for the report. |
|
date_to | DateTime | The end date for the report. |
|
offerId | UUID | (Optional) Filter results for a specific offer. |
|
Request URL - JSON
https://api.TENANT.getgokart.ai/api/v1/integrations/cost-report/json?date_from=2024-01-22&date_to=2025-01-22&OfferId=3fa85f64-5717-4562-b3fc-2c963f66afa6
Request URL - CSV
https://api.TENANT.getgokart.ai/api/v1/integrations/cost-report/csv?date_from=2024-01-22&date_to=2025-01-22&OfferId=3fa85f64-5717-4562-b3fc-2c963f66afa6
Response Schema
Field | Type | Description | Example |
offerId | Guid | Unique identifier for the offer. | "7df30136-..." |
offerName | string | The name of the offer. | "Advertised Test" |
totalConversions | int | Total conversions for the offer within the specified period. | 3 |
totalClicks | int | Total clicks for the offer within the specified period. | 5 |
totalViews | int | Total views for the offer within the specified period. | 5 |
revenue | decimal | Total revenue generated by the offer. | 69 |
publisherName | string | Name of the publisher associated with the offer. | "Brown Boots" |
Example Responses
1. Success Response (JSON Export)
{
"data": [
{
"offerId": "7df30136-ff83-4551-b877-fa0f0d8b8f72",
"offerName": "Advertised Test",
"totalConversions": 3,
"totalClicks": 5,
"totalViews": 5,
"revenue": 69,
"publisherName": "Limestone Digital"
},
{
"offerId": "4bbd29ab-c88e-432f-94c8-610790333d32",
"offerName": "Spin Royale",
"totalConversions": 0,
"totalClicks": 3,
"totalViews": 27,
"revenue": 0,
"publisherName": "Limestone Digital"
}
]
}2. Error Responses
Error Code | Message | Possible Cause |
400 Bad Request | "Invalid filter parameters provided." | Invalid fields in parameters. |
401 Unauthorized | "Advertiser not authenticated." | Token missing, expired, or invalid; AdvertiserId claim not found. |
403 Forbidden | Access denied | Insufficient permissions for the authenticated token |
500 Internal Server Error | "An unexpected error occurred." | Internal exception during data processing or export. |
