Bid Metrics via API
Our updated BUY API documentation is available here.
We hope you enjoy the new experience! Reach out to us with your feedback or questions on supportbuyapi@purespectrum.com
Happy programming! 🎉
Context:
Buyer API can use this API endpoints for bid metrics to understand the number of
overquotas,
dropoffs,
quality terminates,
standard terminates
for a given bid.
These would allow to understand our bid health in a more complete way via the API.
API CALL
GET <SERVER_BASE_URL>/buyers/v2/surveys/<SURVEY_ID>/performance
CASE 1 - When incorrect survey ID (non-existent) is passed
Response
404 Not FoundResponse:
{
"ps_api_response_code": 1006,
"ps_api_response_message": "Survey not found"
}
CASE 2 - When buyer is not the owner of the survey
Response
403 ForbiddenResponse:
{
"ps_api_response_code": 1020,
"ps_api_response_message": "You don't have permission for this survey"
}
CASE 3 - When buyer passes a correct survey ID
Response
200 OkResponse:
{
"ps_survey_status": 22,
"completes_fielded": 0,
"completes_goal": 5,
"cpi_forecast_at_launch": "123.65",
"current_cpi": "123.65",
"projected_acpi": "123.65",
"total_cost_forecast_at_launch": "618.25",
"current_cost": "0.00",
"projected_total_cost": "618.25",
"stated_loi": 20,
"current_overall_loi": 20,
"stated_incidence": 20,
"current_overall_incidence": 20,
"last_block_loi": null,
"last_block_incidence": null,
"over_quota_count": 0,
"drop_off_count": 0,
"quality_termination_count": 0,
"termination_count": 0
}
Note - This was complete re-write of the API, so need to check all the cases. And also need to check in case of QBP, TC, Clone or whatever kind of surveys we can think of.