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:

  1. Log in to Business Manager on your B2C Commerce instance.
  2. Go to Administration > Site Development > Open Commerce API Settings.
  3. Copy the JSON from Appendix A at the end of this guide.
  4. Go back to Business Manager and paste the JSON into the field.
  5. Replace the placeholder value for PLACEHOLDER_CLIENT_ID with the client ID for the public SLAS client that you created using the SLAS Admin UI.
  6. Scroll down to the bottom of the page.
  7. 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.