Skip to content

ProductReview

Type: schema

TypeScript Definition

typescript
ProductReview: {{
            /**
             * Format: double
             * @description The rating of the product review. Must be in rang 1-5 (multiple of 0.5)
             */
            readonly rating?: number;
            /** @description The text for the product review. */
            readonly review_text?: string;
            /** @description The name of the reviewer. */
            readonly name?: string;
            /**
             * Format: email
             * @description The email of the reviewer. Must be a valid email, or an empty string.
             * @example mr@bees.com
             */
            readonly email?: string;
            /**
             * @description Reviews with approved status will be displayed.
             * @enum {string}
             */
            readonly status?: "approved";
            /** @default false */
            is_featured: boolean;
            tags?: string[];
            /**
             * Format: date-time
             * @description The ISO 8601 date-time for when review was first submitted or last modified by the original submitter.
             */
            readonly review_date?: string;
            images?: {
                blur_url?: string;
                thumbnail_url?: string;
                standard_url?: string;
            }[];
            videos?: {
                cover_image_url?: string;
                video_preview_url?: string;
                playback?: {
                    hls?: string;
                    dash?: string;
                };
                /** @description seconds */
                duration?: string;
                /** @description bytes */
                size?: string;
            }[];
            /**
             * Format: date-time
             * @description The ISO 8601 date-time for when review is created.
             * @example 2023-05-25T14:15:22Z
             */
            readonly created_at?: string;
            /**
             * Format: date-time
             * @description The ISO 8601 date-time for when review was last modified.
             * @example 2023-05-25T14:15:22Z
             */
            readonly modified_at?: string;
        };
        /** ProductShipping */
}

OpenAPI Schema

json
{
  "title": "ProductReview",
  "type": "object",
  "externalDocs": {
    "url": "https://llm-docs.commercengine.io/storefront/schemas/ProductReview",
    "description": "API reference for the ProductReview schema"
  },
  "properties": {
    "rating": {
      "description": "The rating of the product review. Must be in rang 1-5 (multiple of 0.5)",
      "type": "number",
      "format": "double",
      "maximum": 5,
      "minimum": 1,
      "multipleOf": 0.5,
      "readOnly": true
    },
    "review_text": {
      "description": "The text for the product review.",
      "type": "string",
      "readOnly": true
    },
    "name": {
      "description": "The name of the reviewer.",
      "type": "string",
      "readOnly": true
    },
    "email": {
      "description": "The email of the reviewer. Must be a valid email, or an empty string.",
      "type": "string",
      "format": "email",
      "examples": [
        "mr@bees.com"
      ],
      "readOnly": true
    },
    "status": {
      "description": "Reviews with approved status will be displayed.",
      "type": "string",
      "enum": [
        "approved"
      ],
      "readOnly": true
    },
    "is_featured": {
      "type": "boolean",
      "default": false
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "review_date": {
      "description": "The ISO 8601 date-time for when review was first submitted or last modified by the original submitter.",
      "type": "string",
      "format": "date-time",
      "readOnly": true
    },
    "images": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "blur_url": {
            "type": "string"
          },
          "thumbnail_url": {
            "type": "string"
          },
          "standard_url": {
            "type": "string"
          }
        }
      }
    },
    "videos": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "cover_image_url": {
            "type": "string"
          },
          "video_preview_url": {
            "type": "string"
          },
          "playback": {
            "type": "object",
            "properties": {
              "hls": {
                "type": "string"
              },
              "dash": {
                "type": "string"
              }
            }
          },
          "duration": {
            "description": "seconds",
            "type": "string"
          },
          "size": {
            "description": "bytes",
            "type": "string"
          }
        }
      }
    },
    "created_at": {
      "description": "The ISO 8601 date-time for when review is created.",
      "type": "string",
      "format": "date-time",
      "examples": [
        "2023-05-25T14:15:22Z"
      ],
      "readOnly": true
    },
    "modified_at": {
      "description": "The ISO 8601 date-time for when review was last modified.",
      "type": "string",
      "format": "date-time",
      "examples": [
        "2023-05-25T14:15:22Z"
      ],
      "readOnly": true
    }
  },
  "examples": []
}

Auto-generated from OpenAPI spec and TypeScript definitions

Last updated: