Storefront REST API

Introduction

Application API (Storefront API) allows developers to customize their online storefronts of their clients. It provides access to the same data customers see when they browse the storefront. It provides features such as

  1. Product Information: Retrieve details about products, collections, and variants. For example, the getProductDetailBySlug API fetches product details based on the slug input.
  2. Customer orders: Get orders of a customer. For example, the getOrders API fetches a order history of a customer.
  3. Checkout Process: Create and manage checkouts, including adding items, applying discounts, and processing payments. For example, the addItems API adds items to the cart.

Download the Postman collection


Client Libraries

Use our official API client libraries to easily interact with our APIs in the programming language of your choice

javascript
Javascript
java
Java
kotlin
Kotlin
swift
Swift

Authentication

To interact with our Application APIs, you'll need a valid application ID and a Token. You can find them in the Fynd Commerce panel. This section will help you to create a base64-encoded token and learn to make API calls with raw cURL requests.

Prerequisites

  • Ensure you have registered on the Fynd Commerce and have access to a sales channel within the company.

Retrieve application credentials

You can obtain your application ID token from the Fynd Commerce panel. Follow the steps outlined below to retrieve the credentials for your company:

  1. Log in to your Fynd Commerce account.
  2. If you have access to multiple companies, you will get the option to select a company.
  3. Select the company from the company list and it will open the Fynd Commerce page.
  4. In the sidebar, navigate to Company SettingsDevelopers tab and click Application Token tab.
  5. Collect the application ID and application token for later use.

Generate Base64-encoded Token using Application ID and Token

To make authenticated requests to Fynd’s storefront APIs, you need to generate a base64-encoded token using the application ID and token and pass the authorization header in the request.

  1. Pass the collected application ID and token and run the following command to generate the base64-encoded token:
    1base64TokenString=$(echo -n {application_id}:{application_token} | base64)
  2. Run the following command to view the base64TokenString and save it for later use:
    1echo $base64TokenString

Example

In the below given example, we can retrieve a list of languages available in the application using the getLanguages API. You need to pass the generated base64-encoded token in the authorization header to make the API call.

1curl -X GET "https://api.fynd.com/service/application/configuration/v1.0/languages" \
2-H 'Authorization: Basic {base64TokenString}'