Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

You may use this endpoint to retrieve all surveys in your account.

Request


GET $apihost/$basepath/surveys

($apihost is the environment against which you are testing,  All Buy API calls will require access_token parameter in the header) 

Considerations

This endpoint will return surveys that are live by default.  You may use the query string parameter "status" to retrieve surveys of a different status

Query String Parameters:

Response ParameterTypeDescription Example
status

integer - enum:

22: return live surveys (default)

11: return draft surveys

33: return paused surveys

44: return closed surveys

You may select the status to be returned by this API endpointstatus=22
fromDateinteger - format=YYYYMMDDReturns only surveys created on or after the value in fromDate.  These dates are in Pacific Time.fromDate=20190101
toDateinteger - format=YYYYMMDDReturns only surveys created on or before the value in fromDate.  These dates are in Pacific Time.toDate=20191231
targeting

integer - enum:

1: returns the normal survey response with qualification and quota arrays. (default)

0: suppresses the qualifications and quotas array to reduce response size

Using targeting=0 will suppress the response of the qualifications and quotas arraytargeting=0

Sample Request: 

Sample Request
GET api.spectrumsurveys.com/buyers/v2/surveys?status=11&fromDate=20190101&toDate=20190131&targeting=0


Response



Response Code

200

Response Body

[
{
"click_balancing": 0,
"estimated_clicks": 0,
"ps_survey_status": 22,
"offer_price": 0.5,
"incl_excl": 0,
"survey_title": "Test Survey 1",
"live_url": "http://mysurvey.com/survey/1",
"completes_required": 2,
"field_time": 15,
"billing_id": "1234",
"buyer_message": "This is a test survey,
"uniqueLinks": false,
"survey_category_code": 231,
"quotas": [],
"qualifications": [],
"expected_loi": 15,
"expected_ir": 15,
"ps_survey_id": 123456,
"buyer_surveygroup_ref": null,
"test_ps_survey_entry_link": "https://spectrumsurveys.com/#/start-survey?survey_id=123456supplier_id=0",
"survey_localization": "en_US"
},
{
"click_balancing": 0,
"estimated_clicks": 0,
"ps_survey_status": 22,
"offer_price": 0.5,
"incl_excl": 0,
"survey_title": "Test Survey 2",
"live_url": "http://mysurvey.com/survey/2",
"completes_required": 2,
"field_time": 15,
"billing_id": "1234",
"buyer_message": "This is a test survey",
"uniqueLinks": false,
"survey_category_code": 231,
"quotas": [],
"qualifications": [],
"expected_loi": 15,
"expected_ir": 15,
"ps_survey_id": 123457,
"buyer_surveygroup_ref": null,
"test_ps_survey_entry_link": "https://spectrumsurveys.com/#/start-survey?survey_id=123457&supplier_id=0",
"survey_localization": "en_US"
}
]


  • No labels