Catalog is a separate module in the Headless CMS OneEntry interface that allows you to create a product catalog or a set of multimedia elements, such as a gallery.
Kotlin Multiplatform
Product Prices
Knowing the category URL (product page), you can retrieve prices for all products. The information can be useful for obtaining the maximum and minimum price.
val result = CatalogService.prices(
url = "heroes",
offset = 0,
limit = 30,
statusMarker = null,
sortOrder = SortOrder.DESC,
langCode = "en_US"
)
val prices = result.items
Retrieving and filtering all products in the catalog
Retrieving all products may be useful for a general catalog or filters within the application. The functionality supports features such as sorting and filtering
Knowing the product identifier, you can request information about it.
val productId: Int = //...
val product = CatalogService.product(
id = productId,
langCode = "en_US"
)
Quick search in catalog
Quick search is done by the product name and can be useful in client applications.
val products = CatalogService.quickSearch(
name = "Cat",
url = null,
langCode = "en_US"
)
Swift
Product Prices
Knowing the category URL (product page), you can retrieve prices for all products. The information can be useful for obtaining the maximum and minimum price.
let result = try await CatalogService.shared.prices(
url: "heroes",
offset: 0,
limit: 30,
statusMarker: nil,
sortOrder: .desc,
langCode: "en_US"
)
let prices = result.items()
Retrieving and filtering all products in the catalog
Retrieving all products may be useful for a general catalog or filters within the application. The functionality supports features such as sorting and filtering