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.
If you’re planning to do a phased rollout of a PWA Kit experience, make sure to follow the instructions in the Extra Steps for Phased Rollouts of PWA Kit section of the guide.
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 at the end 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 the following JSON then go back to step 4 under Update Open Commerce API Settings.