Set Up API Access
Enable your PWA Kit storefront to securely access data from Shopper APIs, including products, baskets, orders, and more. The technology that authorizes this API access is called the Shopper Login and API Access Service (SLAS), which is part of the Salesforce B2C Commerce API. In addition to authorizing API requests to the B2C Commerce API, SLAS also authorizes API requests to the Open Commerce API (OCAPI).
The setup process has recently been streamlined thanks to the new SLAS Admin UI.
Complete the instructions in Authorization for Shopper APIs in the B2C Commerce API documentation. After creating a public SLAS client, return to this guide and read on.
For certain features, your PWA Kit storefront must make requests to the Open Commerce API (OCAPI) on your B2C Commerce instance.
Here’s how to update your OCAPI settings for PWA Kit:
- Log in to Business Manager on your B2C Commerce instance.
- Go to Administration > Site Development > Open Commerce API Settings.
- Copy the JSON from Appendix A: OCAPI Settings of this guide.
- Go back to Business Manager and paste the JSON into the field.
- Replace the placeholder value for
PLACEHOLDER_CLIENT_IDwith the client ID for the public SLAS client that you created using the SLAS Admin UI.
- Scroll down to the bottom of the page.
- Click Save.
Repeat these instructions for each B2C Commerce instance that is used with PWA Kit.
- After you’ve completed all the administration tasks in this guide, you’re ready to complete the next guide in the Get Started series: Set Up Your Local Environment.
Copy these Open Commerce API settings then go back to the instructions.