Swell offers both client-side and server-side APIs. This documentation covers topics related to the client-side Frontend API. Use Swell.js and GraphQL for client-side and headless ecommerce.

Explore Swell's GraphQL frontend library.

Learn more
→

Explore Swell's frontend Javascript SDK, Swell.js.

Learn more
→

Use Node, PHP, and cURL for server-side Backend API.

The Frontend API is authenticated with a public key and returns only the data that has been made public. Standard storefront data such as products, categories, content pages, carts, accounts, and subscriptions is available by default.

Custom models and custom fields are not public by default. A model's records become readable through the Frontend API once at least one of its fields is public, and only the public fields are returned in a response. A model's public_permissions can further limit results to active records, and controls how expand is treated in a public scope.

Content fields outside the content namespace are read-only through the Frontend API. To display a custom model or field in a storefront, open its permissions first.

→ See Opening content permissions for how to open a model or field, and how to configure a public key with the permissions you need.

Swell.js provides methods for the resources a storefront uses most. For any other Frontend API endpoint, use swell.get(), swell.put(), swell.post(), or swell.delete(). See Basic usage.