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

Fetch

This endpoint is used for fetching product lists from a Merchant Store. The endpoint accepts query parameters that are validated to ensure they are of the correct data type. If the validation succeeds, a GET request is made to the API endpoint and the response is returned. If the validation fails, an error message is returned via a Promise.
TIP
The fetch endpoint has been implemented in the Product List Web Component, and It's all setup to save developer's time and effort.

Payload#

FetchPayload

Response#

Success
Error
product.fetch.success

Usage#

To perform the action of retrieving a list of products, the developer may call the method fetch() as follows. For this method we define the query parameters as an object with a source property of categories and a source_value property of an array [1, 2, 3]. We then call the fetch() method of the salla.product object and pass in the query parameters as an argument.

Events#

This endpoint may trigger two events, the onProductListFetchSucceeded and onProductListFetchFailed events.

onProductListFetchSucceeded#

This event is triggered when the action of retrieving a list of products is done without having any errors coming back from the backend.

onProductListFetchFailed#

This event is triggered when the action of retrieving a list of products is not completed and an error has occurred.
Modified at 2025-03-04 12:54:02
Previous
Get Product Details
Next
Fetch Options