Inventory
This API is used to list all of the available surveys.
Command
"livealert/inventory/1"
Recommended Frequency
No longer than once every 10 minutes. If the lastModified field is more recent than the last time you made the call for a survey, you should call the targeting command for that survey. We refresh our cache every 60 seconds, so you should try and call this command as close to this as possible to ensure you have the most up to date information about each project.
Inputs
The following values are expected in the JSON body:
Name | Type | Required | Description |
---|---|---|---|
command | String | Must be "livealert/inventory/1" |
|
country | String | Optional 2 digit ISO Country Code, e.g. US, GB, CA, etc... Restricts projects to match this country. |
|
allowRecontacts | Long | Optional boolean parameter that indicates if projects with recontacts should be included in the inventory. Default is false. |
|
type | Integer | Optional parameter that indicates the kind of projects that should be returned:
|
|
category | String | Optional parameter that indicates the category of projects that should be returned: B2B B2C |
Outputs
Name | Type | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
projects | Date[] | List of projects. Each 'project' contains:
|
Example Command
{
"command": "livealert/inventory/1",
"country": "CA",
"allowRecontacts": false,
category: "B2C"
}
Example Response
{
"response":{
"projects":[
{
"rfg_id":"RFG780558-001",
"title":"Share your opinion with us!",
"country":"CA",
"cpi":"$1.25",
"estimatedIR":15,
"estimatedLOI":30,
"desiredCompletes":400,
"currentCompletes":12,
"collectsPII":false,
"state":2,
"datapoints":[
"Age",
"Gender",
"Language"
],
"lastModified":"2014-08-08T01:30:49Z",
"isRecontact":false,
"mobileOptimized":"confirmed",
type: 1,
category: "B2C"
},
...,
{
"rfg_id":"RFG92713-050",
"title":"Please share your opinion!",
"country":"CA",
"cpi":"$2.10",
"estimatedIR":16,
"estimatedLOI":33,
"desiredCompletes":28,
"currentCompletes":9,
"collectsPII":false,
"state":2,
"datapoints":[
"Age",
"Gender",
"Household Residents",
"List of FSAs (CA)"
],
"lastModified":"2014-08-08T00:33:40Z",
"isRecontact":false,
"mobileOptimized":"confirmed",
type: 1,
category: "B2C"
}
]
}
}