Platform REST API
The Platform API allows developers to manage a Fynd Platform company programmatically, providing access to the same data and operations available to merchants in the platform panel. Key features include managing products, tracking and updating inventory across locations, viewing and fulfilling orders, and more.
There are two variants of the Platform API, based on the granularity of data access:
- Company Level: Requires the company_id parameter and provides access to data across the entire company, including all its applications (sales channels). Example: listCategories API fetches a list of applications within a company.
- Application Level: Requires both company_id and application_id parameters and provides access to data for a specific application within the company. Example: getAppProducts API retrieves all products associated with an application.
Use our official API client libraries to easily interact with our APIs in the programming language of your choice
To interact with our Platform APIs, you'll need a valid access token. Depending upon your use case, you can obtain an access token in the following ways
- For developing an extension
- You need to implement OAuth in order to get access token for the companies that install your extension. Refer to this guide on implementing OAuth in extension.
- For integrating a specific company on Fynd Platform to external systems
- You can request an access token for the required company using client credentials of that company. Checkout how to obtain access token using client credentials.
Requirements
- You've registered on the Fynd Platform and have access to any company.
You can obtain your Client Id and Client Secret from platform panel. Follow the steps outlined below to retrieve the credentials for your company:
- Log in to your Fynd Platform account.
- Here, if you have access to any company you will get the screen to select a company, otherwise it will open Create Company form.
- Select the company from the company list, it will open the Fynd Platform Dashboard.
- Click on the Developers tab in the sidebar, which will open APIs & SDKs page.
- Now, click on the
Clients
tab and then click onCreate Client
and create the client by filling necessary details and permissions. - Now, you can check your client credentials here.
Now, to make a Platform API call you need a valid access token. You can retrieve an access token using your client credentials.
You need to construct the API call as mentioned below and make a POST
request to the /oauth/token
endpoint. Include the parameters outlined below in the request body:
Header name | Description |
---|---|
Authorization | It's a combination of client_id and client_secret {client_id:client_secret} base64 string. Pass this token as a Basic {base64TokenString} in authorization header. |
1base64TokenString=$(echo -n {client_id}:{client_secret} | base64)
1curl -X POST "https://api.fynd.com/service/panel/authentication/v1.0/company/{company_id}/oauth/token" \2-H "Authorization: Basic {base64TokenString}" \3-H 'Content-Type: application/json' \4-d '{"grant_type":"client_credentials"}'
Parameter | Description |
---|---|
grant_type | Grant type to get access token. Here, pass grant_type as client_credentials . |
Upon a successful request, the server will respond with an access token as shown below:
1{2 "access_token": <token>,3 "token_type": "Bearer",4 "expires_in": <ttl>,5 "expires_at": <timestamp>,6 "scope": [ ... ]7}
To make authenticated requests to Fynd platform APIs you need to pass an access token (retrieved in step 2) in the authorization header:
1Authorization: Bearer <access_token>
1curl -X GET "https://api.fynd.com/service/platform/configuration/v1.0/company/{company_id}/application" \2-H "Authorization: Bearer {access_token}"