Assets

When using Stelace, you search, filter and rank assets. Assets can be cars, services, real estate or anything specific to your business requirements.

Creating your first asset is a two-step process:

  • Create an Asset Type to represent your business requirements
  • Create an Asset

Asset Type

Asset types make search relevant and specific to your assets.

If you plan to enable “Purchase” and “Rental” use cases on your marketplace, then you’ll likely have two asset types. They imply different workflows as “Rental” depends on some duration and availability periods while “Purchase” can just depend on stock quantities.

Asset types refer to the type of availability constraints you need for your assets.

The following table highlights the flexibility provided by asset types.

Asset types examples

Asset Type examples by use case

Creating an asset type is as simple as:

stelace.assetTypes.create({
  name: 'Rental',
  TIME: 'TIME_FLEXIBLE',
  QUANTITY: 'UNIQUE'
})

Asset

Should your business requirement evolve, all updates to “Rental” Asset Type configuration will be propagated to related assets.

Let’s create an asset of type “Rental” with a simple API call:

stelace.assets.create({
  name: 'Delorean DMC-12',
  assetTypeId: 'typ_T3ZfQps1I3a1gJYz2I3a'
})