Product API Response
This document provides a detailed breakdown of the JSON structure returned by product-related API endpoints.
There are two main response types:
- Product API Response - Returns product collections with variants nested inside
- Variant Response - Returns individual variant details
tip
If you're looking for how to call the endpoints, refer back to the Product API Overview.
1. Product API Success Response (200 OK)
Used when fetching product collections. Each product contains multiple variants.
Response Structure
| Field | Type | Description |
|---|---|---|
message | String | Status message indicating the result of the operation |
data | ProductData | Contains the list of products and pagination details |
source | String | Source of the product data (e.g., "unisouk") |
Product Data
| Field | Type | Description |
|---|---|---|
products | Array of Product | List of product objects |
pagination | Pagination | Pagination metadata |
Product Object
| Field | Type | Description |
|---|---|---|
id | String | Unique identifier for the product |
title | String | Product title |
hsnCode | String | HSN code for tax classification |
storeId | String | Store ID associated with the product |
subCategoryName | String | Product sub-category name |
categoryName | String | Product category name |
originCountry | String | Country of origin (ISO code) |
slug | String | URL-friendly product identifier |
brandName | String | Brand name of the product |
images | Array of Image | Product images |
Extended Product Object
| Field | Type | Description |
|---|---|---|
id | String | Unique identifier for the product |
title | String | Product title |
description | String | Product description |
hsnCode | String | HSN code for tax classification |
storeId | String | Store ID associated with the product |
subCategoryName | String | Product sub-category name |
categoryName | String | Product category name |
originCountry | String | Country of origin (ISO code) |
slug | String | URL-friendly product identifier |
variationAttribute | Array | List of product variation attributes |
brandName | String | Brand name of the product |
productMeasurement | ProductMeasurement | Physical dimensions and weight |
manufacturingInfo | ManufacturingInfo | Manufacturing/packaging details |
images | Array of Image | Product images |
totalVariants | Number | Number of Variant of product |
Product Object With Variants
| Field | Type | Description |
|---|---|---|
id | String | Unique identifier for the product |
title | String | Product title |
description | String | Product description |
hsnCode | String | HSN code for tax classification |
storeId | String | Store ID associated with the product |
subCategoryName | String | Product sub-category name |
categoryName | String | Product category name |
originCountry | String | Country of origin (ISO code) |
slug | String | URL-friendly product identifier |
variationAttribute | Array | List of product variation attributes |
brandName | String | Brand name of the product |
productMeasurement | ProductMeasurement | Physical dimensions and weight |
manufacturingInfo | ManufacturingInfo | Manufacturing/packaging details |
images | Array of Image | Product images |
variants | Array of ProductVariant | Product variants (nested) |
Product Variant
Variants nested within products in the Product API Response:
| Field | Type | Description |
|---|---|---|
id | String | Unique identifier for the variant |
images | Array of Image | Variant-specific images |
sku | String | Stock keeping unit |
price | Number | Current selling price |
mrp | Number | Maximum retail price |
onHand | Number | Quantity available in inventory |
allocated | Number | Quantity reserved in orders |
attributes | Attributes | Variant-specific attributes |
2. Variant API Success Response (200 OK)
Used when fetching individual variant details. Contains complete variant information including parent product details.
Response Structure
| Field | Type | Description |
|---|---|---|
message | String | Status message indicating the result of the operation |
data | VariantData | Contains variant details and pagination |
source | String | Source of the variant data (e.g., "unisouk") |
Variant Data
| Field | Type | Description |
|---|---|---|
variants | Array of Variant | List of variant objects |
pagination | Pagination | Pagination metadata |
Variant Object
Complete variant information including parent product details:
| Field | Type | Description |
|---|---|---|
productId | String | Parent product ID |
variantId | String | Unique identifier for the variant |
storeId | String | Store ID associated with the variant |
title | String | Product title |
description | String | Product description |
slug | String | URL-friendly product identifier |
sku | String | Stock keeping unit |
subCategoryName | String | Product sub-category name |
categoryName | String | Product category name |
originCountry | String | Country of origin (ISO country code) |
brandName | String | Brand name of the product |
productMeasurement | ProductMeasurement | Physical dimensions and weight of the product |
manufacturingInfo | ManufacturingInfo | Manufacturing/packaging details |
images | Array of Image | List of variant images |
price | Number | Current selling price |
mrp | Number | Maximum retail price |
onHand | Number | Quantity available in inventory |
allocated | Number | Quantity reserved in orders |
attributes | Attributes | Variant-specific attributes |
Shared Data Objects
Product Measurement
| Field | Type | Description |
|---|---|---|
dimensions | Dimensions | Product physical dimensions |
Dimensions Object
| Field | Type | Description |
|---|---|---|
weight | Measurement | Product weight |
length | Measurement | Product length |
width | Measurement | Product width |
height | Measurement | Product height |
Measurement Unit
| Field | Type | Description |
|---|---|---|
value | Number | Measurement value |
unit | String | Unit of measurement |
Manufacturing Info
| Field | Type | Description |
|---|---|---|
manufacturerOrPackerName | String | Name of manufacturer/packer |
manufacturerOrPackerAddress | String | Address of manufacturer/packer |
monthOfManufactureOrPacking | String | Manufacturing/packing date |
Image Object
| Field | Type | Description |
|---|---|---|
position | Number | Display order of image |
url | String | URL of the image |
Attributes Object
| Attribute | Type | Description |
|---|---|---|
Size | Size | Size-related attributes |
Color | Color | Color-related attributes |
Size Attribute
| Field | Type | Description |
|---|---|---|
name | String | Attribute name |
brand | String | Brand-specific attribute |
value | Object | Attribute value |
gender | Male | Female | Gender specification (if any) |
displayName | String | User-friendly attribute name |
Color Attribute
| Field | Type | Description |
|---|---|---|
value | Object/String | Attribute value |
displayName | String | User-friendly attribute name |
hexCode | String | Color hex code |
Pagination Object
| Field | Type | Description |
|---|---|---|
totalItems | Number | Total number of items available |
currentPage | Number | Current page number |
totalPages | Number | Total number of pages |
pageSize | Number | Number of items per page |
Key Differences Summary
| Aspect | Product API Response | Variant API Response |
|---|---|---|
| Primary Focus | Product collections | Individual variants |
| Variants | Nested within products | Top-level objects |
| Variant Details | Limited (id, sku, price, etc.) | Complete (includes parent product info) |
| Use Case | Browse product catalog | Get detailed variant information |
| Data Structure | data.products[].variants[] | data.variants[] |