Questions: List

Retrieve a list of Questions within an account.

path Parameters
accountId
required
string
query Parameters
v
required
string

A date in YYYYMMDD format.

filter
string

This parameter represents one or more filtering conditions that are applied to the set of entities that would otherwise be returned. This parameter should be provided as a URL-encoded string containing a JSON object.

For example, if the filter JSON is {"entityId":{"$eq":"location123"}}, then the filter param after URL-encoding will be: filter=%7B%22entityId%22%3A%7B%22%24eq%22%3A%22location123%22%7D%7D

Supported filters

  • id
  • entityId
  • publisherId
  • authorType
  • language
  • createTime
  • updateTime
  • answerCount
  • ownerAnswer

Basic Filter Structure

The filter object at its core consists of a matcher, a field, and an argument.

For example, in the following filter JSON:

{
"entityId":{
"$eq":"location123"
}
}

$eq is the matcher, or filtering operation (equals, in this example),

entityId is the field being filtered by, and

location123 is value to be matched against.

Combining Multiple Filters

Multiple filters can be combined into one object using combinators. For example, the following filter JSON combines multiple filters using the combinator $and. $or is also supported.

{
"$and":[
{
"entityId":{
"$eq":"location123"
}
},
{
"authorType":{
"$in":[
"LOCAL_GUIDE",
"MERCHANT"
]
}
}
]
}

Filter Negation

Certain filter types may be negated. For example:

{
"$not": {
"entityId": {
"$eq": "location123"
}
}
}

This can also be written more simply with a ! in the $eq parameter. The following filter would have the same effect:

{
"entityId":{
"!$eq":"location123"
}
}

TEXT

The TEXT filter type is supported for text fields. (e.g., entityId, authorType)

Matcher Details
$eq (equals)
{
"entityId":{
"$eq":"location123"
}
},
{
"authorType":{
"!$eq":"REGULAR_USER"
}
}

Supports negation. Case insensitive.

BOOLEAN

The BOOLEAN filter type is supported for boolean fields and Yes / No fields.

Matcher Details
$eq
{
"ownerAnswer": {
"$eq": true
}
}

For booleans, the filter takes a boolean value, not a string. Supports negation.

INTEGER, FLOAT, DATE, DATETIME, and TIME

These filter types are strictly ordered -- therefore, they support the following matchers:

  • Equals
  • Less Than / Less Than or Equal To
  • Greater Than / Greater Than or Equal To
Matcher Details
$eq

Equals

{
"answerCount": {
"$eq": 3
}
}

Supports negation.

$lt

Less than

{
"updateTime": {
"$lt": 1579711121392
}
}
$gt

Greater than

{
"answerCount": {
"$gt": 3
}
}
$le

Less than or equal to

{
"answerCount": {
"$le": 3
}
}
$ge

Greater than or equal to

{
"answerCount": {
"$ge": 3
}
}
Combinations

While we do not support "between" in our filtering syntax, it is possible to combine multiple matchers for a result similar to an "and" operation:

{
"answerCount : {
"$gt" : 1,
"$lt": 3
}
}
limit
integer <= 50
Default: 10

Number of results to return.

offset
integer
Default: 0

Number of results to skip. Used to page through results. Cannot be used together with pageToken.

pageToken
string

If a response to a previous request contained the nextPageToken field, pass that field's value as the pageToken parameter to retrieve the next page of data.

Responses

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "response": {
    }
}

Question: Get

Retrieve information for a Question

path Parameters
accountId
required
string
questionId
required
integer

ID of this Question.

query Parameters
v
required
string

A date in YYYYMMDD format.

Responses

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "response": {
    }
}

Answer: Create

Creates a new Answer on a Question.

path Parameters
accountId
required
string
questionId
required
integer

ID of this Question.

query Parameters
v
required
string

A date in YYYYMMDD format.

Request Body schema: application/json
content
string

The answer text.

Responses

Request samples

Content type
application/json
{
  • "content": "string"
}

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "response": {
    }
}

Answer: Update

Updates an Answer for a Question

path Parameters
accountId
required
string
questionId
required
integer

ID of this Question.

answerId
required
integer

ID of this Answer.

query Parameters
v
required
string

A date in YYYYMMDD format.

Request Body schema: application/json
content
string

The answer text.

Responses

Request samples

Content type
application/json
{
  • "content": "string"
}

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "response": {
    }
}

Answer: Delete

Deletes an Answer for a Question

path Parameters
accountId
required
string
questionId
required
integer

ID of this Question.

answerId
required
integer

ID of this Answer.

query Parameters
v
required
string

A date in YYYYMMDD format.

Responses

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "response": { }
}
Feedback