Skip to content

    Pre-launch API. The concepts described here are settled, but the API shape is not: request and response fields, parameters and defaults can still change. Build against it, and talk to your Luigi's Box contact before you put an integration into production.

    Identifiers

    View source

    Almost every API call names at least one identifier. Luigi’s Box AI uses prefixed IDs: the prefix says what a value refers to, and a value pasted into the wrong parameter is rejected.

    These are assigned by Luigi’s Box when the entity is created. You never invent them.

    EntityPrefixExampleWhere you use it
    Organizationlbo_lbo_r2vn8cScoping list endpoints, creating catalogs
    Cataloglbc_lbc_8w3k2pIndexing, feed configuration, catalog metadata
    Channellbn_lbn_4hj9tvEvery discovery request, every analytics event
    Campaignlbm_lbm_p7q2zxBusiness rules
    Rulelbr_lbr_2m8xkdBusiness rules
    A/B testlba_lba_9v3npcExperiment reporting
    Taglbt_lbt_k4d7rqGrouping catalogs, channels or surfaces
    Sponsored-products providerlbad_lbad_9v3npcSponsored products
    Integration repositorylbdr_lbdr_8w3k2pDistribution

    The prefix is part of the value. Store and send lbc_8w3k2p, never 8w3k2p.

    An account identifier is a prefix, an underscore, and six characters from Crockford base32 — the digits 09 plus the letters az with i, l, o and u left out. The canonical form is lowercase.

    Input is forgiving: uppercase is accepted, hyphens are ignored, and i/l are read as 1 and o as 0. LBC-8W3K2P and lbc_8w3k2p name the same catalog.

    A surface is the configured discovery experience your storefront calls. Its ID has three parts:

    lbs_<intent>_<slug>
    • lbs — always.
    • <intent> — what kind of discovery the surface performs: search, recommender, or collection.
    • <slug> — a readable name chosen when the surface is created: lowercase letters, digits and underscores, starting with a letter, up to 48 characters.
    lbs_search_main
    lbs_recommender_homepage_carousel
    lbs_collection_category_pages

    The intent in the ID says which endpoint the surface belongs to. Sending lbs_recommender_homepage_carousel to /discovery/v1/search is rejected, because the intent in the ID does not match the endpoint.

    Slugs are unique within one catalog and intent, so the same catalog cannot have two lbs_search_main surfaces — but two different catalogs can.

    Catalog objects — products, categories, brands, articles — are identified by values you choose, not by Luigi’s Box. An identity is typed:

    <type>/<value>

    For example:

    product/sku-1001
    category/summer-shirts
    brand/northwear

    The type prefix must match the object’s @type. The value part is yours: a SKU, a slug, a database key. It only has to be unique within the catalog and stable over the object’s lifetime.

    The same <type>/<value> form is used everywhere an object is referenced — in @id, in @category and @brand references, in the reference field of analytics events, and in ids sent to the variants endpoint.

    See Types and IDs for the ingestion rules, and Object types and relationships for what each type is for.

    Credentials are not entity identifiers, and they have their own formats.

    CredentialPrefixUsed by
    Publishable keypub_Browser integrations — safe to ship in page source
    OAuth client IDlbk_Server-to-server integrations
    OAuth client secretlbe_Server-to-server integrations — secret, never in a browser

    Both parts of a credential carry the environment and region they belong to, so a test key cannot accidentally authenticate against production, and a European client cannot authenticate in the US region. See Authentication.