Blocks
Kotlin Multiplatform
Getting all blocks
val result = BlockService.blocks()
You can also specify pagination parameters to limit the search for items and request only blocks of a specific type.
val result = BlockService.blocks(
offset = 0,
limit = 30,
type = BlockType.FOR_CATALOG_PRODUCTS,
langCode = "en_US"
)
Getting a block by its marker
When creating a block, a marker is specified. This is a unique identifier that allows you to retrieve any information associated with the block.
val block = BlockService.byMarker("dev")
Searching for blocks by name
val result = BlockService.quickSearch("dev")
Swift
For ease of use, the service has been moved to a separate variable.
let service = BlockService.shared
Getting all blocks
let result = try await service.blocks(
offset: 0,
limit: 30,
type: .forCatalogProducts,
langCode: "en_US"
)
Getting a block by its marker
When creating a block, a marker is specified. This is a unique identifier that allows you to retrieve any information associated with the block.
let block = try await service.byMarker(marker: "dev", langCode: "en_US")
Searching for blocks by name
let result = try await service.quickSearch(name: "dev", langCode: "en_US")
Last modified: 01 August 2025