Salla Docs
Merchant API
  • Merchant API
  • Salla OAuth 2.0
Partner APIs
  • App API
  • Shipment API
Storefront
  • Twilight Engine
  • Twilight SDK
  • Web Components
  • Change Log
Salla CLI
Merchant API
  • Merchant API
  • Salla OAuth 2.0
Partner APIs
  • App API
  • Shipment API
Storefront
  • Twilight Engine
  • Twilight SDK
  • Web Components
  • Change Log
Salla CLI
Salla - Opensource
Salla - Developers Community
  1. Rating
  • Overview
  • Languages
  • Notify
  • Event
  • Storage
  • Configuration
  • Forms
  • Helpers
  • Auth
    • Login
    • Logout
    • Verify
    • Resend
    • Register
    • Refresh
  • Cart
    • Latest
    • Details
    • Quick Add
    • Add Item
    • Delete Item
    • Delete Image
    • Add Coupon
    • Remove Coupon
    • Get Upload Image
    • Get Quick Order Settings
    • Create Quick Order
    • Order Status
    • Get Current Cart Id
    • Price Quote
  • Wishlist
    • Add
    • Remove
    • Toggle
  • Loyalty
    • Get Program
    • Exchange
    • Reset
  • Comment
    • Add Comment
    • Fetch
    • Get Page Comments
    • Get Product Comments
  • Profile
    • Update profile
    • Update contact
  • Product
    • Get price
    • Product availability
    • Categories
    • Offer details
    • Search products
    • Get Gift Details
    • Add Gift To Cart
    • Upload Gift Image
    • Get Product Details
    • Fetch
    • Fetch Options
    • Size Guides
  • Order
    • Create cart from order
    • Cancel
    • Send invoice
    • Show order
  • Booking
    • Add
  • Rating
    • Order
    • Store
    • Products
    • Shipping
  • Currency
    • Change
    • List
  • Component
    • Reviews
    • Menus
  1. Rating

Store

This endpoint is used for the purpose of rating a store. The customer will be able to send a review to a store after placing an order with that store.

TIP

The store rating endpoint has been implemented in the Rating Web Component, and It's all setup to save developer's time and effort.

Payload authenticated#

Response#

```

Usage#

To perform the action of rating a store after placing an order, the developer may use the method store() as follows.

salla.rating.store({
  comment: "Fast delivery",
  order_id: 587,
  rating: 5,
})
.then((response) => {
  /* add your code here */
});

Events#

This endpoint may trigger two events, the onStoreRated and onStoreFailed events.

onStoreRated#

This event is triggered when rating a store by the customer is done without having any errors coming back from the backend.

salla.event.rating.onStoreRated((response) => {
  console.log(response)
});

onStoreFailed#

This event is triggered when rating a store by the customer is not completed and an error has occurred.

salla.event.rating.onStoreFailed((errorMessage) => {
  console.log(errorMessage)
});
Previous
Order
Next
Products