Skip to content

pos-list-product-reviews ​

Method: GET
Path: /pos/catalog/products/{product_id}/reviews

Tags: Reviews

Summary ​

List all product reviews

Description ​

Lists reviews for the requested product, with pagination, sorting, search and review filters.

Pos SDK Usage ​

SDK Method: pos.listProductReviews()

Example:

typescript
const { data, error } = await pos.listProductReviews(
  { product_id: "product-123" },
  { page: 1, limit: 10, rating: 5 }
);

TypeScript Definition ​

typescript
"pos-list-product-reviews": {
        parameters: {
            query?: {
                /** @description Page number, starting at 1. Non-integer values and values below 1 return 400. */
                page?: components["parameters"]["pageParam"];
                /** @description Results per page. Values outside 1–100 are clamped to that range. Non-integer input returns 400. */
                limit?: components["parameters"]["pageLimitParam"];
                /** @description search keyword */
                search?: components["parameters"]["searchKeyword"];
                /** @description Column filters as a JSON array of objects mapping field names to values. */
                filters?: string;
                name?: string;
                /** @description Filter reviews by an exact product ID in addition to the product in the path. */
                product_id?: string;
                rating?: number;
                /** @description filter review with review tag */
                review_tag?: string;
                /** @description Sort by review fields such as `rating`, `name` or `review_date`, using a JSON object of fields and `asc`/`desc` directions. */
                sort_by?: string;
            };
            header?: never;
            path: {
                /** @description id of a particular product */
                product_id: string;
            };
            cookie?: never;
        };
        requestBody?: never;
        responses: {
            /** @description Success response */
            200: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": {
                        message: string;
                        success: boolean;
                        content: {
                            reviews: components["schemas"]["ProductReview"][];
                            review_tags: string[] | null;
                            pagination: components["schemas"]["Pagination"];
                        };
                    };
                };
            };
            400: components["responses"]["BadRequest"];
            401: components["responses"]["Unauthorized"];
            403: components["responses"]["Forbidden"];
            404: components["responses"]["NotFound"];
            500: components["responses"]["InternalServerError"];
            504: components["responses"]["GatewayTimeout"];
        };
    };

Component References ​

ReferenceResolves To
components["parameters"]["pageParam"]pageParam
components["parameters"]["pageLimitParam"]pageLimitParam
components["parameters"]["searchKeyword"]searchKeyword
components["schemas"]["ProductReview"]ProductReview
components["schemas"]["Pagination"]Pagination
components["responses"]["BadRequest"]BadRequest
components["responses"]["Unauthorized"]Unauthorized
components["responses"]["Forbidden"]Forbidden
components["responses"]["NotFound"]NotFound
components["responses"]["InternalServerError"]InternalServerError
components["responses"]["GatewayTimeout"]GatewayTimeout

Parameters ​

  • page (query): Page number, starting at 1. Non-integer values and values below 1 return 400.
  • limit (query): Results per page. Values outside 1–100 are clamped to that range. Non-integer input returns 400.
  • search (query): search keyword
  • filters (query): Column filters as a JSON array of objects mapping field names to values.
  • name (query): No description
  • product_id (path): id of a particular product
  • product_id (query): Filter reviews by an exact product ID in addition to the product in the path.
  • rating (query): No description
  • review_tag (query): filter review with review tag
  • sort_by (query): Sort by review fields such as rating, name or review_date, using a JSON object of fields and asc/desc directions.

Responses ​

200 ​

Success response

400 ​

Bad request

401 ​

Authentication failed. Codes include token-required, token-expired and token_not_valid for an invalid or expired token.

403 ​

Access denied. token-required requires an authenticated session; permission-denied means the caller cannot access this resource. On POS, session-expired requires signing in again.

404 ​

Requested resource not found

500 ​

The request failed because of an unexpected error.

504 ​

The request timed out.

OpenAPI Definition ​

json
{
  "operationId": "pos-list-product-reviews",
  "summary": "List all product reviews",
  "description": "Lists reviews for the requested product, with pagination, sorting, search and review filters.",
  "parameters": [
    {
      "$ref": "#/components/parameters/pageParam"
    },
    {
      "$ref": "#/components/parameters/pageLimitParam"
    },
    {
      "$ref": "#/components/parameters/searchKeyword"
    },
    {
      "name": "filters",
      "in": "query",
      "description": "Column filters as a JSON array of objects mapping field names to values.",
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "name",
      "in": "query",
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "product_id",
      "in": "path",
      "description": "id of a particular product",
      "required": true,
      "schema": {
        "type": "string",
        "maxLength": 128,
        "minLength": 1,
        "pattern": "^[A-Za-z0-9_-]{1,128}$"
      }
    },
    {
      "name": "product_id",
      "in": "query",
      "description": "Filter reviews by an exact product ID in addition to the product in the path.",
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "rating",
      "in": "query",
      "schema": {
        "type": "number"
      }
    },
    {
      "name": "review_tag",
      "in": "query",
      "description": "filter review with review tag",
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "sort_by",
      "in": "query",
      "description": "Sort by review fields such as `rating`, `name` or `review_date`, using a JSON object of fields and `asc`/`desc` directions.",
      "required": false,
      "schema": {
        "description": "json string in format {'field_name':'asc', 'other_field_name':'desc', ...}",
        "type": "string",
        "examples": [
          "{\"rating\":\"desc\"}"
        ]
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success response",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "message": {
                "type": "string"
              },
              "success": {
                "type": "boolean"
              },
              "content": {
                "properties": {
                  "reviews": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/ProductReview"
                    }
                  },
                  "review_tags": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "items": {
                      "type": "string"
                    }
                  },
                  "pagination": {
                    "$ref": "#/components/schemas/Pagination"
                  }
                },
                "required": [
                  "reviews",
                  "review_tags",
                  "pagination"
                ],
                "type": "object"
              }
            },
            "required": [
              "message",
              "success",
              "content"
            ]
          }
        }
      }
    },
    "400": {
      "$ref": "#/components/responses/BadRequest"
    },
    "401": {
      "$ref": "#/components/responses/Unauthorized"
    },
    "403": {
      "$ref": "#/components/responses/Forbidden"
    },
    "404": {
      "$ref": "#/components/responses/NotFound"
    },
    "500": {
      "$ref": "#/components/responses/InternalServerError"
    },
    "504": {
      "$ref": "#/components/responses/GatewayTimeout"
    }
  },
  "externalDocs": {
    "url": "https://llm-docs.commercengine.io/admin-pos/operations/pos-list-product-reviews"
  },
  "security": [
    {
      "Authorization": []
    }
  ],
  "tags": [
    "Reviews"
  ],
  "x-speakeasy-group": "pos",
  "x-speakeasy-name-override": "listProductReviews"
}

Auto-generated from OpenAPI spec and TypeScript definitions

Last updated: