Getting Started with the Unisouk API
Welcome to the Unisouk API documentation! This guide will help you make your first API request.
Base URL
All URLs referenced in the documentation have the following base:
https://dev-sfapi.unisouk.com
Authentication
Most endpoints require authentication using a short-lived JWT access token. While the API supports token refresh using a secure, HTTP-only refresh token, you must implement the refresh logic on the frontend.
Refer to the Authentication Flow for login and token issuance, and the Token Management Guide for implementing automatic access token refresh.
(Contact your admin if you need credentials.)
Quick Start
Include the access token in the Authorization header and StoreId in x-store-id header:
Authorization: Bearer <TOKEN>
x-store-id: <STORE_ID>
Understanding Stores
In Unisouk, a Store represents a distinct workspace or business entity within your e-commerce ecosystem. As a unified integration platform, Unisouk enables you to manage multiple stores across different channels (Amazon, Flipkart, ONDC) from a single interface.
Why Stores Matter
- Channel Management: Each store can represent a different sales channel (marketplace or your own website)
- Brand Separation: Manage multiple brands or business units independently
- Regional Operations: Operate different stores for different geographic markets
- Testing & Development: Maintain separate test and production environments
Store ID
The Store ID (x-store-id) is a required header for all the API calls. It ensures your operations target the correct workspace in your Unisouk account.
x-store-id: <STORE_ID>
The storeId is provided by your Unisouk admin and is required for making all the API requests.
Making Your First Request
Let's fetch a cart by ID to test your setup.
cURL Example
curl -X GET "https://dev-sfapi.unisouk.com/cart/{cartId}" \
-H "Authorization: Bearer <TOKEN>"
-H "x-store-id: <STORE_ID>"
JavaScript Example
const cartId = "123"; // Replace with your cart ID
const response = await fetch(`https://dev-sfapi.unisouk.com/cart/${cartId}`, {
method: "GET",
headers: {
Authorization: "Bearer <TOKEN>",
"x-store-id": "<STORE_ID>",
},
});
const data = await response.json();
Response
{
"id": "123",
"items": [],
"total": 0
}
Prerequisites
- An active Unisouk account.
- API credentials (token or key).
- Ensure your requests include the
Authorizationheader.
Next Steps
- Explore Cart APIs to manage shopping carts.