Get your keys
Each organisation has its own Admin Portal subdomain, so enter yours to open the API keys page directly.The link opens the API keys page if you are already signed in, and the login screen if you are not. Both
commercengine.io and commercengine.dev resolve to the same portal.What signup already created
When you signed up, Commerce Engine provisioned a working set for you:
For a single web storefront, that default set is all you need. Copy the Store ID and the Storefront API key into your environment variables and continue with the Quickstart.
Stores, channels, and keys
This is the part worth understanding before you build, because it determines which products your storefront can see.- Products are linked to channels. A product that is not assigned to a channel does not exist as far as that channel is concerned.
- API keys are scoped to one channel. The key you use decides which slice of the catalog you can read.
- A store can have several channels. Each gets its own key.
Channel types
This is why POS has its own SDK and its own authentication model, and why the API reference has a separate marketplace catalog: they are different channels, not different stores.
If your catalog comes back empty
An API key scoped to the wrong channel does not return an error. It returns an empty list.1
Confirm the key's channel
In the Admin Portal, open the API key and note which channel it belongs to.
2
Confirm the products are assigned to that channel
A product visible in the Admin Portal is not automatically visible to every channel.
3
Confirm the environment matches
Staging and production have separate data. A staging key against a production store ID returns nothing useful.
Environments
The SDK selects the base URL from the
environment option, so you set it once in configuration rather than per call. See Configuration.
Next steps
Quickstart
Install the SDK, set environment variables, and make your first catalog call.
Configuration
Every SDK option, including environment and token storage selection.