Reference - ICM REST API - B2C Front End - Rating and Review 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: 

API Specification

Introduction

OpenAPI Version: 3.0.1
Rating & Reviews Version: 1.0.0

This is Intershop ICM REST API documentation.

This reference lists the REST API for storefront development. The REST API covers features of both, the B2C (SMB - Small and Medium-sized businesses) and the B2B storefront development.
This reference is intended for developers who want to make use of an easy-to-use API when developing frontend solutions.
You can find more information at Intershop Communications. Contact our Intershop experts at Support - Intershop Communications

Introduction

This API is documented in OpenAPI format.

Rating and Review API

/categories/{categoriesKey}/products/{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

LocationNameFormatDescription
in pathcategoriesKeystringRequired | The key or UUID to resolve a single item | Example: ExampleKey
in pathproductKeystringRequired | The key or UUID to resolve a single item | Example: ExampleKey
in queryattrsstringattrs 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 queryownbooleanFlag that determines if the review list should contain only reviews owned by the requested user or only reviews from other authors.

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

Response

200 - OK

ResourceCollectionROLinkRO application/json
ResourceCollectionROLinkRO -> elements -> [..] -> itemId can be used as {ReviewKey} in subsequent requests. Links to item of type ReviewRO.

401 - Unauthorized

404 - Not Found

POST: Creates product 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

LocationNameFormatDescription
in pathcategoriesKeystringRequired | The key or UUID to resolve a single item | Example: ExampleKey
in pathproductKeystringRequired | The key or UUID to resolve a single item | Example: ExampleKey

Response

201 - Created

LinkRO application/json

400 - Bad Request

- Invalid query parameters

401 - Unauthorized

403 - Forbidden

404 - Not Found

422 - Unprocessable Entity

The customer already created a review for this product.

500 - Internal Server Error

/categories/{categoriesKey}/products/{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

LocationNameFormatDescription
in pathcategoriesKeystringRequired | The key or UUID to resolve a single item | Example: ExampleKey
in pathproductKeystringRequired | The key or UUID to resolve a single item | Example: ExampleKey
in pathReviewKeystringRequired | The key or UUID to resolve a single item | Example: ExampleKey

Response

200 - OK

ReviewRO application/json

401 - Unauthorized

404 - Not Found

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

LocationNameFormatDescription
in pathcategoriesKeystringRequired | The key or UUID to resolve a single item | Example: ExampleKey
in pathproductKeystringRequired | The key or UUID to resolve a single item | Example: ExampleKey
in pathReviewKeystringRequired | The key or UUID to resolve a single item | Example: ExampleKey

Response

204 - No Content

401 - Unauthorized

404 - Not Found

/products/{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

LocationNameFormatDescription
in pathproductKeystringRequired | The key or UUID to resolve a single item | Example: ExampleKey
in queryattrsstringattrs 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 queryownbooleanFlag that determines if the review list should contain only reviews owned by the requested user or only reviews from other authors.

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

Response

200 - OK

ResourceCollectionROLinkRO application/json
ResourceCollectionROLinkRO -> elements -> [..] -> itemId can be used as {ReviewKey} in subsequent requests. Links to item of type ReviewRO.

401 - Unauthorized

404 - Not Found

POST: Creates product 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

LocationNameFormatDescription
in pathproductKeystringRequired | The key or UUID to resolve a single item | Example: ExampleKey

Response

201 - Created

LinkRO application/json

400 - Bad Request

- Invalid query parameters

401 - Unauthorized

403 - Forbidden

404 - Not Found

422 - Unprocessable Entity

The customer already created a review for this product.

500 - Internal Server Error

/products/{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

LocationNameFormatDescription
in pathproductKeystringRequired | The key or UUID to resolve a single item | Example: ExampleKey
in pathReviewKeystringRequired | The key or UUID to resolve a single item | Example: ExampleKey

Response

200 - OK

ReviewRO application/json

401 - Unauthorized

404 - Not Found

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

LocationNameFormatDescription
in pathproductKeystringRequired | The key or UUID to resolve a single item | Example: ExampleKey
in pathReviewKeystringRequired | The key or UUID to resolve a single item | Example: ExampleKey

Response

204 - No Content

401 - Unauthorized

404 - Not 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.
    }
}
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. Still I 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.
    }
}
ResourceCollectionROLinkRO 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
    This is a constant: ResourceCollection | Example: ResourceCollection
  • "sortKeys":
    array
    An array of string literals. the keys to sort for
  • "name":
    string
    the name of the returned element
}
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. Still I 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