Skip to content

List reviews

Pages a product's reviews.

Needs the read scope.

Pages its answer: pass the cursor back for the next page, at most 100 items a page.

Filters: rating (eq, in, gte, lte).

Sorts: created, rating.

Call

  • Tool: list_reviews
  • Scope: read
  • Reads only.
  • Acts on a store.

Arguments

Name Type Required Description
product object Yes
query object No
{
  "type": "object",
  "properties": {
    "product": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          },
          "required": [
            "id"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "slug": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            }
          },
          "required": [
            "slug"
          ],
          "additionalProperties": false
        }
      ]
    },
    "query": {
      "type": "object",
      "properties": {
        "filter": {
          "type": "object",
          "properties": {
            "rating": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "object",
                  "properties": {
                    "eq": {
                      "type": "number"
                    },
                    "in": {
                      "type": "array",
                      "items": {
                        "type": "number"
                      },
                      "minItems": 1,
                      "maxItems": 50
                    },
                    "gte": {
                      "type": "number"
                    },
                    "lte": {
                      "type": "number"
                    }
                  },
                  "minProperties": 1,
                  "additionalProperties": false
                }
              ]
            }
          },
          "additionalProperties": false
        },
        "sort": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "enum": [
                "created",
                "rating"
              ]
            },
            "direction": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            }
          },
          "additionalProperties": false
        },
        "limit": {
          "type": "integer",
          "minimum": 1,
          "maximum": 100
        },
        "cursor": {
          "type": "string",
          "maxLength": 8192
        },
        "count": {
          "type": "boolean"
        }
      },
      "additionalProperties": false
    }
  },
  "required": [
    "product"
  ],
  "additionalProperties": false
}

Answer

Name Type Required Description
items array of object Yes
cursor string or null Yes
total number No
facets object No

The answer’s full shape is on its API reference page.

Type to search…

↑↓ navigate↵ selectEsc close