Contents

RecommendationQueryRequest

The structured request body for all recommendation query endpoints.

Declaration

object RecommendationQueryRequest

Properties

NameTypeDescription
filters[RecommendationFilterCondition]

Array of filter conditions. promotedObjectId and promotedObjectType filters are required on every request. See FilterCondition.

sorting[RecommendationSorting]

Array of sort specifications. Multiple entries are applied in order (primary sort first). See Sorting.

paginationRecommendationQueryRequestPagination

Pagination parameters controlling offset and page size. Defaults: offset 0, pageSize 20. See QueryRequestPagination.

Discussion

The QueryRequest object is the request body for all POST .../query endpoints in the Recommendations API. Two filter conditions are mandatory on every request:

[
  {
    "field": "promotedObjectId",
    "operator": "EQUALS",
    "value": [
      "123456"
    ]
  },
  {
    "field": "promotedObjectType",
    "operator": "EQUALS",
    "value": [
      "APPSTORE_APP"
    ]
  }
]

Omitting either required filter returns a 400 error with a MISSING_REQUIRED_FILTER detail in the response. Additional optional filters narrow the result set. For example, state or campaignId. The API combines all filter conditions with AND logic.

Example

{
  "filters": [
    {
      "field": "promotedObjectId",
      "operator": "EQUALS",
      "value": [
        "123456789"
      ]
    },
    {
      "field": "promotedObjectType",
      "operator": "EQUALS",
      "value": [
        "APPSTORE_APP"
      ]
    },
    {
      "field": "state",
      "operator": "EQUALS",
      "value": [
        "AVAILABLE"
      ],
      "ignoreCase": false
    }
  ],
  "sorting": [
    {
      "field": "creationTime",
      "order": "DESC"
    }
  ],
  "pagination": {
    "offset": 0,
    "pageSize": 20
  }
}

See Also