Related Documents
Document Properties
Kbid
29603V
Last Modified
23-Mar-2021
Added to KB
03-Sep-2020
Public Access
Everyone
Status
Online
Doc Type
References
Product
ICM 7.10

Reference - Rating and Review API 1.0.0


Product Version

7.10

Product To Version


Status

final

Download Specification 

This API specification is available for download as an Open API 3.0 YAML file: 

References

The following page lists available REST APIs for ICM 7.10 and their version dependencies:

API Specification

Introduction

OpenAPI Version: 3.0.1
Rating & Review Version: 1.0.0

The Intershop Rating & Review REST API contains operations that allow to create, retrieve and delete reviews.

Rating and Review API

The following operations for creating, retrieving and deleting reviews are available:

/categories/{categoriesKey}/products/{productKey}/reviews
POST: Creates a review for product

Description

This operation submits a user review for a product.

Java Method

public com.intershop.component.rest.capi.resourceobject.LinkRO com.intershop.sellside.rest.common.capi.resource.review.ReviewListResource.addReview(com.intershop.sellside.rest.common.capi.resourceobject.NewReviewRO)

Request Body

NewReviewRO application/json

Request Parameters

LocationNameFormatDefaultExampleDescription
in pathcategoriesKeystring153Required | The category ID
in pathproductKeystring10809311Required | The product SKU

Response

201 - Created - The review was successfully created.

LinkRO application/json

400 - Bad Request - At least one attribute is missing or invalid.

401 - Unauthorized - The user could not be authenticated.

404 - Not Found - The product could not be found.

422 - Unprocessable Entity - The customer already created a review for this product.

/categories/{categoriesKey}/products/{productKey}/reviews/{ReviewKey}
DELETE: Deletes product review by ID

Description

This operation deletes a specific user review of a specific product.

Java Method

public void com.intershop.sellside.rest.common.capi.resource.review.ReviewItemResource.deleteProductReviewByID()

Request Body

--

Request Parameters

LocationNameFormatDefaultExampleDescription
in pathcategoriesKeystring153Required | The category ID
in pathproductKeystring10809311Required | The product SKU
in pathReviewKeystringaUAKDgAFMa8AAAF2XvNMKHUMRequired | The review ID

Response

204 - No Content - The review was successfully deleted.

401 - Unauthorized - The user could not be authenticated.

403 - Forbidden - The supplied user is not allowed to delete this review.

404 - Not Found - The product or review could not be found.

/categories/{categoriesKey}/products{spgid}/{productKey}/reviews
GET: Returns reviews of a product

Description

This operation returns a list of all user reviews for a product.

Java Method

public com.intershop.component.rest.capi.resourceobject.ResourceCollectionRO com.intershop.sellside.rest.common.capi.resource.review.ReviewListResource.getProductReviews(java.lang.String,java.lang.Boolean,java.lang.Boolean)

Request Body

--

Request Parameters

LocationNameFormatDefaultExampleDescription
in pathspgidstringFUOGrzQ_VjORpGaN8DRGmLLE0000The secure personal group identifier (submitted as matrix parameter ;spgid=<PGID>).
in pathcategoriesKeystring153Required | The category ID
in pathproductKeystring10809311Required | The product SKU
in queryattrsstringstatus,ratingattrs can contain the following attribute names separated by comma:

- authorname: Name of the author (firstname and lastname, showAuthorNameFlag)
- content: Content of the review
- creationdate: Creation date of the review
- rating: Rating of the review (0..5)
- status: Status of the review (NEW, APPROVED)
- title: Title of the review
- localeid: Locale id of the review
- own: Flag if the review is owned by the requested user
in queryownbooleanfalseFlag that determines if the review list should contain only reviews owned by the requested user or only reviews from other authors.

If the flag is omitted, all reviews are returned.
in querylocalespecificbooleanfalsefalseFlag that determines if the review list should contain reviews for the requested locale or all reviews independent from the requested locale.

Response

200 - OK - The reviews for the given product.

LinkROResourceCollectionRO application/json

401 - Unauthorized - The user could not be authenticated.

404 - Not Found - The product could not be found.

/categories/{categoriesKey}/products{spgid}/{productKey}/reviews/{ReviewKey}
GET: Returns product review by ID

Description

This operation returns a specific user review of a specific product.

Java Method

public com.intershop.sellside.rest.common.capi.resourceobject.ReviewRO com.intershop.sellside.rest.common.capi.resource.review.ReviewItemResource.getProductReviewByID()

Request Body

--

Request Parameters

LocationNameFormatDefaultExampleDescription
in pathspgidstringFUOGrzQ_VjORpGaN8DRGmLLE0000The secure personal group identifier (submitted as matrix parameter ;spgid=<PGID>).
in pathcategoriesKeystring153Required | The category ID
in pathproductKeystring10809311Required | The product SKU
in pathReviewKeystringaUAKDgAFMa8AAAF2XvNMKHUMRequired | The review ID

Response

200 - OK - The review with the given ID.

ReviewRO application/json

401 - Unauthorized - The user could not be authenticated.

404 - Not Found - The product or review could not be found.

/products/{productKey}/reviews
POST: Creates review for a product

Description

This operation submits a user review for a product.

Java Method

public com.intershop.component.rest.capi.resourceobject.LinkRO com.intershop.sellside.rest.common.capi.resource.review.ReviewListResource.addReview(com.intershop.sellside.rest.common.capi.resourceobject.NewReviewRO)

Request Body

NewReviewRO application/json

Request Parameters

LocationNameFormatDefaultExampleDescription
in pathproductKeystring10809311Required | The product SKU

Response

201 - Created - The review was successfully created.

LinkRO application/json

400 - Bad Request - At least one attribute is missing or invalid.

401 - Unauthorized - The user could not be authenticated.

404 - Not Found - The product could not be found.

422 - Unprocessable Entity - The customer already created a review for this product.

/products/{productKey}/reviews/{ReviewKey}
DELETE: Deletes product review by ID

Description

This operation deletes a specific user review of a specific product.

Java Method

public void com.intershop.sellside.rest.common.capi.resource.review.ReviewItemResource.deleteProductReviewByID()

Request Body

--

Request Parameters

LocationNameFormatDefaultExampleDescription
in pathproductKeystring10809311Required | The product SKU
in pathReviewKeystringaUAKDgAFMa8AAAF2XvNMKHUMRequired | The review ID

Response

204 - No Content - The review was successfully deleted.

401 - Unauthorized - The user could not be authenticated.

403 - Forbidden - The supplied user is not allowed to delete this review.

404 - Not Found - The product or review could not be found.

/products{spgid}/{productKey}/reviews
GET: Returns reviews of a product

Description

This operation returns a list of all user reviews for a product.

Java Method

public com.intershop.component.rest.capi.resourceobject.ResourceCollectionRO com.intershop.sellside.rest.common.capi.resource.review.ReviewListResource.getProductReviews(java.lang.String,java.lang.Boolean,java.lang.Boolean)

Request Body

--

Request Parameters

LocationNameFormatDefaultExampleDescription
in pathspgidstringFUOGrzQ_VjORpGaN8DRGmLLE0000The secure personal group identifier (submitted as matrix parameter ;spgid=<PGID>).
in pathproductKeystring10809311Required | The product SKU
in queryattrsstringstatus,ratingattrs can contain the following attribute names separated by comma:

- authorname: Name of the author (firstname and lastname, showAuthorNameFlag)
- content: Content of the review
- creationdate: Creation date of the review
- rating: Rating of the review (0..5)
- status: Status of the review (NEW, APPROVED)
- title: Title of the review
- localeid: Locale id of the review
- own: Flag if the review is owned by the requested user
in queryownbooleanfalseFlag that determines if the review list should contain only reviews owned by the requested user or only reviews from other authors.

If the flag is omitted, all reviews are returned.
in querylocalespecificbooleanfalsefalseFlag that determines if the review list should contain reviews for the requested locale or all reviews independent from the requested locale.

Response

200 - OK - The reviews for the given product.

LinkROResourceCollectionRO application/json

401 - Unauthorized - The user could not be authenticated.

404 - Not Found - The product could not be found.

/products{spgid}/{productKey}/reviews/{ReviewKey}
GET: Returns product review by ID

Description

This operation returns a specific user review of a specific product.

Java Method

public com.intershop.sellside.rest.common.capi.resourceobject.ReviewRO com.intershop.sellside.rest.common.capi.resource.review.ReviewItemResource.getProductReviewByID()

Request Body

--

Request Parameters

LocationNameFormatDefaultExampleDescription
in pathspgidstringFUOGrzQ_VjORpGaN8DRGmLLE0000The secure personal group identifier (submitted as matrix parameter ;spgid=<PGID>).
in pathproductKeystring10809311Required | The product SKU
in pathReviewKeystringaUAKDgAFMa8AAAF2XvNMKHUMRequired | The review ID

Response

200 - OK - The review with the given ID.

ReviewRO application/json

401 - Unauthorized - The user could not be authenticated.

404 - Not Found - The product or review could not be found.

Request and Response Object Schemata

LinkRO application/json{
  • "name":
    string
    the name of the returned element
  • "type":
    string
    Readonly | This is a constant: Link | Example: Link
  • "attributes":
    array
    An array of ResourceAttribute objects. the list of attributes
    [
    ResourceAttribute: An attribute
    {
    • "name":
      string
      The attribute's name
    • "type":
      string
      This is a constant: ResourceAttribute | Example: ResourceAttribute
    • "value":
      object
      The attribute's value.
    }
    ]
  • "uri":
    string
    The uri
  • "relation":
    string
    The relation of the link | Documentation: Link Relations (www.iana.org) | Possible Values: aboutalternateappendixarchivesauthorbookmarkcanonicalchaptercollectioncontentscopyrightcreate-formcurrentdescribedbydescribesdisclosureduplicateeditedit-formedit-mediaenclosurefirstglossaryhelphostshubiconindexitemlastlatest-versionlicenselrddmonitormonitor-groupnextnext-archivenofollownoreferrerpaymentpredecessor-versionprefetchprevpreviewpreviousprev-archiveprivacy-policyprofilerelatedrepliessearchsectionselfservicestartstylesheetsubsectionsuccessor-versiontagterms-of-servicetypeupversion-historyviaworking-copyworking-copy-of
  • "title":
    string
    The title of the link
  • "description":
    string
    The description of the link
  • "itemId":
    string
    the Id of the linked item
  • "attribute":
    object
    A ResourceAttribute object. An attribute
    {
    • "name":
      string
      The attribute's name
    • "type":
      string
      This is a constant: ResourceAttribute | Example: ResourceAttribute
    • "value":
      object
      The attribute's value.
    }
}
LinkROResourceCollectionRO application/json{
  • "pageable":
    string
    The pageable ID
  • "total":
    integer
    The pageable amount total | Format: int32
  • "offset":
    integer
    The pageable offset | Format: int32
  • "amount":
    integer
    The pageable amount | Format: int32
  • "elements":
    array
    An array of LinkRO objects. The list of elements
    [
    LinkRO: A Link pointing to a resource
    {
    • "name":
      string
      the name of the returned element
    • "type":
      string
      Readonly | This is a constant: Link | Example: Link
    • "attributes":
      array
      An array of ResourceAttribute objects. the list of attributes
      [
      ResourceAttribute: An attribute
      {
      • "name":
        string
        The attribute's name
      • "type":
        string
        This is a constant: ResourceAttribute | Example: ResourceAttribute
      • "value":
        object
        The attribute's value.
      }
      ]
    • "uri":
      string
      The uri
    • "relation":
      string
      The relation of the link | Documentation: Link Relations (www.iana.org) | Possible Values: aboutalternateappendixarchivesauthorbookmarkcanonicalchaptercollectioncontentscopyrightcreate-formcurrentdescribedbydescribesdisclosureduplicateeditedit-formedit-mediaenclosurefirstglossaryhelphostshubiconindexitemlastlatest-versionlicenselrddmonitormonitor-groupnextnext-archivenofollownoreferrerpaymentpredecessor-versionprefetchprevpreviewpreviousprev-archiveprivacy-policyprofilerelatedrepliessearchsectionselfservicestartstylesheetsubsectionsuccessor-versiontagterms-of-servicetypeupversion-historyviaworking-copyworking-copy-of
    • "title":
      string
      The title of the link
    • "description":
      string
      The description of the link
    • "itemId":
      string
      the Id of the linked item
    • "attribute":
      object
      A ResourceAttribute object. An attribute
      {
      • "name":
        string
        The attribute's name
      • "type":
        string
        This is a constant: ResourceAttribute | Example: ResourceAttribute
      • "value":
        object
        The attribute's value.
      }
    }
    ]
  • "type":
    string
    The type of the object. This is normally a constant that can be used to differentiate objects by their type.
  • "sortKeys":
    array
    An array of string literals. The keys to sort for
  • "name":
    string
    The name of an element.
}
NewReviewRO application/json{
  • "name":
    string
    The name of an element.
  • "type":
    string
    The type of the object. This is normally a constant that can be used to differentiate objects by their type. | Example: NewReview
  • "attributes":
    array
    An array of ResourceAttribute objects. The list of attributes
    [
    ResourceAttribute: An attribute
    {
    • "name":
      string
      The attribute's name
    • "type":
      string
      This is a constant: ResourceAttribute | Example: ResourceAttribute
    • "value":
      object
      The attribute's value.
    }
    ]
  • "title":
    string
    The title of the new review | Example: Good choice
  • "content":
    string
    The content of the review | Example: I am satisfied with my purchase. The quality is very good for the price. I still wish there were more features.
  • "rating":
    integer
    The rating of the product from 0 to 5 | Format: int32 | Example: 5
  • "showAuthorNameFlag":
    boolean
    If rendered and true the reviewer can decide to show the name | Example: true
  • "attribute":
    object
    A ResourceAttribute object. An attribute
    {
    • "name":
      string
      The attribute's name
    • "type":
      string
      This is a constant: ResourceAttribute | Example: ResourceAttribute
    • "value":
      object
      The attribute's value.
    }
}
ReviewRO application/json{
  • "name":
    string
    The name of an element.
  • "type":
    string
    The type of the object. This is normally a constant that can be used to differentiate objects by their type. | Example: Review
  • "attributes":
    array
    An array of ResourceAttribute objects. The list of attributes
    [
    ResourceAttribute: An attribute
    {
    • "name":
      string
      The attribute's name
    • "type":
      string
      This is a constant: ResourceAttribute | Example: ResourceAttribute
    • "value":
      object
      The attribute's value.
    }
    ]
  • "authorFirstName":
    string
    The first name of the author | Example: Alexandra
  • "authorLastName":
    string
    The last name of the author | Example: Heimroth
  • "title":
    string
    The title of the review | Example: Good choice
  • "content":
    string
    The content of the review | Example: I am satisfied with my purchase. The quality is very good for the price. I still wish there were more features.
  • "id":
    string
    The ID of the review | Example: y60KDACwgR8AAAFB0MKGQOQj
  • "creationDate":
    string
    The creation date of the review | Format: date-time
  • "rating":
    integer
    The rating of the product from 0 to 5 | Format: int32 | Example: 5
  • "status":
    string
    The status of the review | Example: NEW (NOT APPROVED)
  • "showAuthorNameFlag":
    boolean
    If rendered and true the reviewer can decide to show the name | Example: true
  • "localeID":
    string
    The ID of the review's locale | Example: en_US
  • "attribute":
    object
    A ResourceAttribute object. An attribute
    {
    • "name":
      string
      The attribute's name
    • "type":
      string
      This is a constant: ResourceAttribute | Example: ResourceAttribute
    • "value":
      object
      The attribute's value.
    }
}

Disclaimer

The information provided in the Knowledge Base may not be applicable to all systems and situations. Intershop Communications will not be liable to any party for any direct or indirect damages resulting from the use of the Customer Support section of the Intershop Corporate Web site, including, without limitation, any lost profits, business interruption, loss of programs or other data on your information handling system.

Customer Support
Knowledge Base
Product Resources
Tickets