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. Product
  • 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. Product

Get price

This endpoint returns the price of a product. It only needs the id of the product whose price is on need.

Payload#

GetPricePayload
id
number 
required
The id of the product that will be added to the cart.
quantity
number 
required
The quantity of the item that will be added to the cart.
Default:
1
options
object 
optional
The key-pair for option id and option value
Example:
["option id 1","option value 1",212344122,"option value 2"]
Additional properties
object 
optional
Additional properties
integer  | number  | string  | boolean 
optional

Response#

Success
Error
product.getPrice.success
success
boolean 
success
required
Response flag
status
enum<number> 
status
required
Allowed values:
200201202
data
object 
data
optional
Response data.
price
number 
required
Product selling price which includes any given discount.
regular_price
number 
required
Product normal price without any discount
has_sale_price
boolean 
required
Discount availability. True if the price is on sale

Usage#

To perform the action of getting a product's price, the developer may call the method getPrice() along with the product's id.

Simple Product#

Variable product#

Events#

This endpoint may trigger two events, the onPriceUpdated and onPriceUpdateFailed events.

onPriceUpdated#

This event is triggered when getting a product's price is done without having any errors coming back from the backend.

onPriceUpdateFailed#

This event is triggered when getting a product's price is not completed and an error has occurred.
Modified at 2024-02-18 09:55:22
Previous
Product
Next
Product availability