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 0–9 plus the letters a–z 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.

    Some identifiers name a record Luigi’s Box writes rather than an entity you set up: one synchronization run of a feed is one. Records accumulate without limit, so their identifiers are longer.

    RecordPrefixExampleWhere you see it
    Feed sync runlbsr_lbsr_7k2m9xq4vdRun history
    Catalog synclbsy_lbsy_4n8w2c6t0qTriggering a sync

    A record identifier is a prefix, an underscore, and ten characters from the same Crockford base32 alphabet, in lowercase. It is random: it says nothing about when the record was written or how many came before it.

    lbsr_7k2m9xq4vd, lbsy_4n8w2c6t0q and lbs_search_main are unrelated: the underscore ends the prefix, so neither lbsr nor lbsy is a surface.

    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_similar
    lbs_collection_default

    The intent in the ID says which endpoint the surface belongs to. Sending lbs_recommender_similar 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.

    A membership or curated collection’s ID is built from its registration, so you know it before registering. For a membership collection it is the two types; for a curated collection it is the slug you send and the member type. An all collection is not registered at all: its ID exists for every type. The member type is part of the ID, where search and recommendation requests take a type beside it, so one value names everything a collection request lists.

    KindRegistered asA request names
    Membershipcollection:category/member:productone object of it: collection:category/shirts/member:product
    Curatedcollection:curated/new_arrivals/member:productthe same ID
    Allnothingcollection:all/member:category

    The ID contains / and is sent in a path as is. See Collections.

    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.