Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.omneo.io/llms.txt

Use this file to discover all available pages before exploring further.

This guide shows how to read a customer’s Omneo lists, generate a share code for a list, and fetch a shared list using that code, from a Shopify Liquid theme or App UI Extension.
This guide assumes you already have an Omneo ID Proxy token. See Shopify Authentication for how to obtain one.

Prerequisites

RequirementDetails
ID Proxy tokenObtained from /apps/cx in a Liquid theme, or your Remix route in a UI Extension. See Shopify Authentication.
List DefinitionAt least one list definition (for example, a wishlist) configured in Omneo. See List Definitions.
SDKThe @omneo/omneo-sdk package installed in your Shopify app or theme bundle.

Initialise the SDK

Construct an ID client with the token, tenant, and expiry returned from the auth flow.
import { ID } from '@omneo/omneo-sdk'

const client = new ID({
  tenant,
  IDToken: token,
  IDTokenExpiry: expiry
})
All client.profile.* calls are scoped to the customer the token was issued for.

Fetch a customer’s lists

Return all lists associated with the logged-in profile.
const lists = await client.profile.lists.list()
lists is an array of list objects. Each list includes its id, list definition handle, items, and metadata. If the customer has no lists yet, the array is empty.

Generate a share code

Generate a unique, shareable handle for a list by posting to its shares endpoint. The handle can be embedded in a URL and used by another browser to view the list.
const [firstList] = lists

const { data } = await client.call({
  endpoint: `/profiles/me/lists/${firstList.id}/shares`,
  method: 'POST'
})

const shareCode = data.handle
Each call creates a new share record. Store the returned handle if you want to render a stable shareable URL for the customer.

Fetch a list by share code

A list opened by share code reads from the public /lists/shares/{handle} endpoint. This call works with an anonymous token, so recipients without an Omneo profile can still open the list.
const sharedList = await client.call({
  endpoint: `/lists/shares/${shareCode}`,
  method: 'GET'
})

End-to-end example

import { ID } from '@omneo/omneo-sdk'

// token, tenant and expiry come from the auth flow
const client = new ID({
  tenant,
  IDToken: token,
  IDTokenExpiry: expiry
})

const lists = await client.profile.lists.list()
const [firstList] = lists

const { data } = await client.call({
  endpoint: `/profiles/me/lists/${firstList.id}/shares`,
  method: 'POST'
})

const shareCode = data.handle

const sharedList = await client.call({
  endpoint: `/lists/shares/${shareCode}`,
  method: 'GET'
})

Further reading

Lists overview

What lists are and how they work across surfaces.

List Definitions

Configure list types and their rules.

Shopify Authentication

How to obtain the ID Proxy token used by this guide.

Lists API reference

Endpoint-level reference for lists, items, and shares.