Skip to main content

Version: v1

List Products

Retrieve a paginated list of products for a specific store, including their variants and basic information.


HTTP Method & Endpoint

GET | /product


Request

Headers

HeaderValueDescription
Content-Typeapplication/jsonSpecifies that the response will be in JSON format
AuthorizationBearer {token}Authentication token (replace {token} with your actual token)
x-store-id{storeId}StoreId (replace {storeId} with your actual storeId)

Query Parameters

ParameterTypeRequiredDescription
limitNumberNoNumber of items per page (default: 10, max: 100)
pageNumberNoPage number to fetch (default: 1)
searchStringNoSearch term to filter products

Response Format

Success Response (200 OK)

FieldTypeDescription
messageStringStatus message indicating the result of the operation
dataDataContains the list of products and pagination details
sourceStringSource of the product data (e.g., "unisouk")

Data Object Properties

FieldTypeDescription
productsArray(Product)List of product objects
paginationPaginationPagination metadata

Product Object Properties

FieldTypeDescription
idStringUnique identifier for the product
titleStringProduct title
descriptionStringProduct description
hsnCodeStringHSN code for tax classification
storeIdStringStore ID associated with the product
subCategoryNameStringProduct sub-category name
categoryNameStringProduct category name
originCountryStringCountry of origin (ISO country code)
slugStringURL-friendly product identifier
variationAttributeArrayList of product variation attributes
brandNameStringBrand name of the product
productMeasurementProductMeasurementPhysical dimensions and weight of the product
manufacturingInfoManufacturingInfoManufacturing/packaging details
imagesArray(Image)List of product images
variantsArray(Variants)List of product variants

Product Measurement Properties

FieldTypeDescription
dimensionsDimensionsPhysical dimensions of product
Dimensions Properties
FieldTypeDescription
weightMeasurementProduct weight
lengthMeasurementProduct length
widthMeasurementProduct width
heightMeasurementProduct height
Measurement Unit Properties
FieldTypeDescription
valueNumberMeasurement value
unitStringUnit of measurement

Manufacturing Info Properties

FieldTypeDescription
manufacturerOrPackerNameStringName of manufacturer/packer
manufacturerOrPackerAddressStringAddress of manufacturer/packer
monthOfManufactureOrPackingStringManufacturing/packing date

Image Properties

FieldTypeDescription
positionNumberDisplay order of image
urlStringURL of the image

Variant Properties

FieldTypeDescription
idStringUnique identifier for the variant
imagesArray(Image)Variant-specific images
skuStringStock keeping unit
priceNumberCurrent selling price
mrpNumberMaximum retail price
onHandNumberQuantity available in inventory
allocatedNumberQuantity reserved in orders
attributesAttributesVariant-specific attributes

Attribute Properties

FieldTypeDescription
SizeSizeColor hex code (for colors)
ColorColorColor hex code (for colors)

Size Attribute

FieldTypeDescription
nameStringAttribute name
brandStringBrand-specific attribute
valueObjectAttribute value
genderMale,FemaleGender specification (if any)
displayNameStringUser-friendly attribute name

Color Attribute

FieldTypeDescription
valueObject/StringAttribute value
displayNameStringUser-friendly attribute name
hexCodeStringColor hex code (for colors)

Pagination Object Properties

FieldTypeDescription
totalItemsNumberTotal number of items available
currentPageNumberCurrent page number
totalPagesNumberTotal number of pages
pageSizeNumberNumber of items per page

Examples

cURL

curl -X GET "https://dev-sfapi.unisouk.com/product?limit=100" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <TOKEN>" \
-H "x-store-id: <STORE_ID>"

Javascript (React)

import axios from "axios";

const fetchProducts = async () => {
try {
const response = await axios.get("https://dev-sfapi.unisouk.com/product", {
params: {
limit: 100,
},
headers: {
"Content-Type": "application/json",
Authorization: "Bearer <TOKEN>",
"x-store-id": "<STORE_ID>",
},
});

console.log("Products fetched:", response.data);
} catch (error) {
console.error("Error fetching products:", error.response?.data || error.message);
}
};

Sample Response

{
"message": "Products Fetched Successfully",
"data": {
"products": [
{
"id": "30212344240120832",
"title": "Testing 1",
"description": "Good Shoes From Abibas",
"hsnCode": "6404",
"storeId": "30182834660443136",
"subCategoryName": "Test",
"categoryName": "Test",
"originCountry": "IN",
"slug": "test",
"variationAttribute": ["color", "size"],
"brandName": "tets",
"productMeasurement": {
"dimensions": {
"weight": {
"value": 150,
"unit": "grams"
},
"length": {
"value": 50,
"unit": "centimeters"
},
"width": {
"value": 25,
"unit": "centimeters"
},
"height": {
"value": 15,
"unit": "centimeters"
}
}
},
"manufacturingInfo": {
"manufacturerOrPackerName": "Aman",
"manufacturerOrPackerAddress": "surat",
"monthOfManufactureOrPacking": "02/2025"
},
"images": [
{
"position": 1,
"url": "https://test.com"
}
],
"variants": [
{
"id": "30212344307230720",
"images": [
{
"position": 2,
"url": "s3://unisouk-dev/store/30182834660443136/assets/30198039058809856.jpeg"
}
],
"sku": "Fas-Shi-ArTMfD1",
"price": 100,
"mrp": 1,
"onHand": 1,
"allocated": 1,
"attributes": {
"size": {
"name": "size",
"brand": "default",
"value": {
"value": "free size",
"displayName": "Free Size"
},
"gender": null,
"displayName": "Shirt Size | Male"
},
"color": {
"value": "red",
"hexCode": "#ifefefe",
"displayName": "red"
}
}
}
]
}
],
"pagination": {
"totalItems": 1,
"currentPage": 1,
"totalPages": 1,
"pageSize": 10
}
},
"source": "unisouk"
}

Error Responses

Status CodeDescription
400Bad Request - Invalid parameters
401Unauthorized - Authentication token is missing or invalid
403Forbidden - Insufficient permissions
500Internal Server Error - Something went wrong on the server