In this article, we will go over the responses endpoint that the Bizrate Survey API offers for retrieving survey data. For more information on the API, please check out our ReadMe documentation.
In order to access the Bizrate Survey API, you must have an access token granted to you by following the steps in the previous article. Each request to the endpoints listed in this article must contain the access token in the Authorization field of the HTTP request header.
GET Retrieve all response data given a time frame (optional) and survey type(s) (optional) ordered by response date.
Request:
Query Parameters
Type
Required
Default Value
Description
surveyType
array
false
n/a
Array of survey types that will be used to filter out responses that contain the given types. If empty, no filter will be applied to the responses.
cursor
string
false
first response after the beginTime value
The starting cursor index for filtering responses. If cursor is specified, but not size, then size defaults to 500. If size is specified, but not cursor, then cursor defaults to the first response after beginTime param.
size
integer
false
500
The max number of responses to return. If cursor is specified, but not size, then size defaults to 500. If size is specified, but not cursor, then cursor defaults to the first response after beginTime. Max size is 500 and any value greater will return a 400 error code.
beginTime
integer
true
n/a
Timestamp to start search from, epoch time in milliseconds. beginTime must be less than endTime and both should be within the duration of the merchant’s subscription period.
endTime
integer
true
n/a
Timestamp to stop searching at, epoch time in milliseconds. endTime should be greater than beginTime and both should be within the duration of the merchant’s subscription period.
Response:
The object returned will contain two “root-level” fields: responses and cursor. The responses array will contain one or more response objects that are also the ‘parent’ object to several child objects including device_info and meta_data. The second “root-level” field is cursor, which will provide a value that can be used as a query parameter in subsequent requests to retrieve the next set of responses.
Fields for Response object
Type
Description
response_id
string
Survey response ID
respondent_id
string
Unique id of the individual who took the survey
merchant_id
string
Merchant ID
survey_date
string
The date that the survey was taken. Dates are returned in Pacific Standard Time.
survey_type
string
Type of the survey taken. Refer to the section below to review the list of survey_type.