TheDocumentation Index
Fetch the complete documentation index at: https://docs.omneo.io/llms.txt
Use this file to discover all available pages before exploring further.
ID client is the customer-facing half of the Omneo SDK. Use it whenever you cannot safely ship an admin token: storefronts, profile portals, in-app customer UIs, and any browser code that needs to read or update a single profile.
The full admin client lives separately. See Using the Omneo SDK if you need server-side access to the full API.
How it works
The flow has three steps:Server holds an admin token
Your backend keeps a long-lived Omneo API token, created in CX Manager.
Server mints a profile-scoped token
Your backend calls
id.auth.requestAuthToken({ id }). Omneo returns a short-lived JWT (IDToken) bound to that single profile.ID client targets https://api.[tenant].getomneo.com/id/api/v1, a different surface from the admin API.
Server-side: minting the token
Install the SDK and callrequestAuthToken from a trusted server. Pass the admin token only at this step.
id_handle:
Anonymous tokens
Omit theid field to mint a token with no profile association. Anonymous tokens can only create or upsert a profile, they cannot read or update an existing one.
Browser-side: using the token
In the browser, initialise the client with the pre-fetchedIDToken. Never pass omneoAPIToken here.
Token helpers
TheID client tracks token expiry internally once a token is set on the constructor or returned by requestAuthToken.
| Helper | Returns | Use when |
|---|---|---|
id.auth.isTokenExpired() | Boolean | Checking whether to mint a fresh token before making a call. |
id.auth.getProfileID() | The pid claim from the JWT | You need the profile’s UUID without making a network request. |
id.reset() | void | Clearing the token, for example on logout. |
getProfileID() decodes the JWT using Node’s Buffer. In a browser bundle that does not polyfill Buffer (some lean Vite or esbuild setups), this helper throws. The rest of the ID surface is browser-safe.Profile methods
Theid.profile namespace operates on the profile bound to the token. No profile ID is passed.
| Method | Purpose |
|---|---|
get() | Fetch the bound profile. |
update(data) | Update profile fields. |
delete() | Soft-delete the profile. |
purge() | Permanently remove profile data. |
resync() | Force a resync from connected systems. |
isSubscribed(channel), isUnsubscribed(channel) | Check comms subscription state. |
subscribe(channel), unsubscribe(channel, opts) | Update comms subscription state. |
redeem(amount) | Redeem an amount from the profile’s reward balance. |
updateType(type) | Change the profile type. |
transactionProducts(params) | List products from the profile’s transactions. |
Connection(connectionID) | Accessor for a linked connected profile. |
achievements, addresses, aggregations, attributes, balances, benefits, connections, credits, identities, interactions, ledgers, lists, orders, points, redemptions, regions, rewards, tiers, transactionClaims, transactions.
Each sub-resource exposes the same shape as the Omneo client, without the profile ID argument.
Anonymous use: create a profile
With an anonymous token, the only supported action is to create or upsert a profile. The most common pattern is a sign-up form that converts the resulting profile into a logged-in session by minting a fresh, profile-scoped token server-side.Locations through the ID API
The ID API exposes a read-only locations endpoint, useful for store finders on a storefront. Call it throughid.call():
Shopify integration
The Omneo Shopify plugin handles the mint-and-store cycle for you. It stores theIDToken in localStorage under the key shapes:omneo:shapestoken:{customer_id}. The shapes: prefix is a legacy naming artefact, preserved so that already-deployed stores keep working. Read it first, mint a fresh token if missing or expired:
customerSignature is the HMAC-SHA256 of the Shopify customer.id, signed with the plugin secret stored in shop metafields. In Liquid:
Escape hatch: id.call()
Use id.call() for any ID endpoint the SDK does not yet wrap natively. Authentication and base URL are handled for you.
omneo.call(). See Using the Omneo SDK for the reference.