Endpoint
Base URL: GET http://api.appsamurai.com/api/customer-pull/spent/{api_key}
Note: Replace {api_key}
with the unique API key provided by your account manager.
Query Parameters
You can include the following optional parameters in your request URL to filter the results:
start_date
(string): Specify the beginning date for the data retrieval period using the YYYY-MM-DD format.end_date
(string): Indicate the end date for the data retrieval period in YYYY-MM-DD format. If you omit this, the API will return data for the last 30 days.campaign_id
(string): Filter the data to include only a specific campaign ID.bundle_id
(string): Filter results based on a specific application bundle ID.platform
(string): Limit data to a particular platform (e.g.,ios
,play
).campaign_name
(string): Filter the data by the name of the campaign.country
(string): Filter results by country using the ISO 3166-1 alpha-2 format (e.g.,US
,GB
).
Example Request
Here's an example of how to structure your GET request with parameters:
GET http://api.appsamurai.com/api/customer-pull/spent/as9GulmRJ8GZJMvd3Z3JHae8Q8RXbyQmNJZj?start_date=2025-03-15&end_date=2025-03-19&campaign_id=12345&platform=play
Example Response Structure
The API response will include details such as:
Campaign ID, Bundle ID, App Title, Platform, CPI Bid, Status, Campaign Name
Event goals (including event name, CPI bid, and event token for different milestones like reaching specific levels)
Campaign names listed by their update date
Targeted countries
Daily spend data for the specified period
{"campaign_id": 12345,
"bundle_id": "com.play.tileverse",
"app_title": "Tileverse Matching",
"platform": "play",
"cpi_bid": 10.25,
"status": "ACTIVE",
"campaign_name": "TileVerse_AND_US_CPA_TBSDK",
"event_goal": [
{
"event_name": "10",
"cpi_bid": "0.05",
"event_token": "Reach Level 10"
},
{
"event_name": "25",
"cpi_bid": "0.2",
"event_token": "Reach Level 25"
},
{
"event_name": "50",
"cpi_bid": "0.4",
"event_token": "Reach Level 50"
},
{
"event_name": "75",
"cpi_bid": "0.6",
"event_token": "Reach Level 75"
},
{
"event_name": "100",
"cpi_bid": "1",
"event_token": "Reach Level 100"
},
{
"event_name": "300",
"cpi_bid": "3",
"event_token": "Reach Level 300"
},
{
"event_name": "600",
"cpl_bid": "5",
"event_token": "Reach Level 600"
}
],
"campaign_names_by_update_date": {
"2025-03-13 15:10:02": "TileVerse AND_US_CPA_TBSDK"
},
"countries": "US",
"spent": {
"2025-03-15": "0.00",
"2025-03-16": "0.00",
"2025-03-17": "0.50",
"2025-03-18": "1.85",
"2025-03-19": "0.60"
}
}
Error Responses
The API uses standard HTTP status codes to indicate errors:
400 Bad Request (
Invalid Date Format
): Ensure dates are in YYYY-MM-DD format.401 Unauthorized (
Unauthorized
): Check if your API key is valid and included correctly.404 Not Found (
Not Found
): No data matches the applied filters.500 Internal Server Error (
Internal Server Error
): An unexpected issue occurred on the server.
Additional Notes
Remember that the API defaults to the last 30 days of data if no date range is specified.
While parameters are optional, using them helps narrow down the information you receive.
Use standard ISO 3166-1 alpha-2 codes for the country parameter.
If you require further assistance, please reach out to your account manager.