Skip to main content

Version: v1

Get Product Details

Retrieve detailed information about a specific product by its ID, including all variants and attributes.


HTTP Method & Endpoint

GET | /product/{productId}

Replace {productId} with the actual product ID.


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)

Path Parameters

ParameterTypeRequiredDescription
productIdStringYesUnique identifier of the product

Response Format

Success Response (200 OK)

FieldTypeDescription
messageStringStatus message indicating the result of the operation
dataDataContains all details about the product
sourceStringSource of the product data (e.g., "unisouk")

Data 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
productMeasurementObjectPhysical dimensions and weight of the product
manufacturingInfoObjectManufacturing/packaging details
imagesArrayList of product images
variantsArrayList of product variants

Product Measurement Properties

FieldTypeDescription
dimensionsObjectPhysical dimensions of product
Dimensions Properties
FieldTypeDescription
weightObjectProduct weight
lengthObjectProduct length
widthObjectProduct width
heightObjectProduct 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
imagesArrayVariant-specific images
skuStringStock keeping unit
priceNumberCurrent selling price
mrpNumberMaximum retail price
onHandNumberQuantity available in inventory
allocatedNumberQuantity reserved in orders
attributesObjectVariant-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)

Examples

cURL

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

Javascript (React)

import axios from "axios";

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

console.log("Product details:", response.data);
} catch (error) {
console.error("Error fetching product:", error.response?.data || error.message);
}
};

Sample Response

{
"message": "Products Fetched Successfully",
"data": {
"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"
}
}
}
]
},
"source": "unisouk"
}

Error Responses

Status CodeDescription
400Bad Request - Invalid product ID
401Unauthorized - Authentication token is missing or invalid
403Forbidden - Insufficient permissions
404Not Found - Product with specified ID was not found
500Internal Server Error - Something went wrong on the server