shop.product.reviews.getTree

Returns product reviews tree.

Parameters

  • product_id GET

    Product ID.

  • parent_id GET Optional

    Id of the review which should be considered as the tree root. If not specified then method returns the entire reviews tree.

  • depth GET Optional

    Number of tree levels which should be returned. If not specified, the entire reviews tree is returned.

  • format GET Optional

    Sets response format. Available options: json (default), xml.

Return value

Product reviews data array with the following keys:

  • auth_provider string Information about the authorization of the review author: 'user' (authorized with a password), 'guest' (unauthorized) or the ID of one of the authorization adapaters used by the review author — 'facebook', 'google', 'twitter', 'yandex', 'mailru', 'vkontakte'.
  • comments array Array of comments posted to a review. The sub-array of each comment contains values with the same keys as the main reviews array, including its own 'comments' array item.
  • contact_id int ID of the review author contact if the author was authorized when posting the review.
  • datetime datetime Review publication date and time.
  • depth int Review nesting level in the reviews tree, starting with 0.
  • email string Email address specified by the review author.
  • id Review or comment ID.
  • images_count int Number of images attached to the review.
  • ip int Review author’s IP address processed by the ip2long() function.
  • name string Name specified by an unauthorized review author.
  • parent_id int ID of a review or a comment to which the current comment belongs. Or 0 if the current message is not a comment.
  • product_id int ID of the product to which the review or comment belongs.
  • rate float Rating selected by the review author.
  • review_id int ID of the review to which the current comment belongs. Or 0 if the current message is not a comment.
  • site string Website address specified by an unauthorized review author.
  • status string Review publication status — 'approved' (published), 'deleted', 'moderation' (pending moderation).
  • text Review or comment text.
  • title Review title.

Example

https://demo1.webasyst.com/api.php/shop.product.reviews.getTree?