OneEntry Platform 2.0.1 Help

Catalog

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

val result = CatalogService.all( offset = 0, limit = 30, sortKey = "price", sortOrder = SortOrder.DESC, langCode = "en_US", filter = { put { attributeMarker = "rate" conditionMarker = ConditionMarker.GREATER_THEN conditionValue = AttributeValue.fromDouble(5.0) } } )

Request for product information

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

let result = try await CatalogService.shared.all( offset: 0, limit: 30, sortKey: "price", sortOrder: .desc, langCode: "en_US", filter: { ConditionBlock( attributeMarker: "rate", conditionMarker: .greaterThen, conditionValue: .init(double: 5.0) ) } )

Request for product information

Knowing the product identifier, you can request information about it.

let productId: Int = //... let product = try await CatalogService.shared.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.

let products = try await CatalogService.shared.quickSearch( name: "Cat", url: nil, langCode: "en_US" )
Last modified: 18 February 2025