Skip to main content

Item Sync

Use this API to create or update product master data from Excel. The payload is hierarchical: item, then SKU variants, then selling units for each SKU.

At A Glance​

PUT/v2/items/sync-data
AreaDetail
PurposeSync items, SKUs, and selling units.
Content typeapplication/json
Authenticationx-api-key request header
Request bodyArray of item objects
Item grouping keyExcel No
SKU grouping keyUnique Size + Colour_Name combination

Headers​

Content-Type: application/json
x-api-key: YOUR_API_KEY

Request Body​

The endpoint expects an array. Each item may contain multiple SKUs, and each SKU may contain multiple selling units.

Request body
[
{
"itemName": "Sample Item 1004",
"description": "Sample Item 1004",
"brandName": "Sample Brand",
"subBrandName": "Sample Sub Brand",
"categoryName": "Sample Category",
"subCategoryName": "Sample Subcategory",
"itemImageSource": "OTHERS",
"itemImageLink": ["link"],
"syncId": "ITEM-1001",
"itemLastUpdatedAt": "2026-08-03T06:41:38.654Z",
"attributes": {
"Attribute 1": "Value 1",
"Attribute 2": "Value 2"
},
"skus": []
}
]

Item Mapping​

API fieldExcel sourceRequiredRule
itemNameArticle NameYesProduct display name.
descriptionDescriptionNoProduct description.
brandNameBrandYesBrand name.
subBrandNameSub BrandNoSub-brand name.
categoryNameSegment / Master CategoryYesProduct category.
subCategoryNameGenderNoProduct sub-category.
syncIdNoYesUnique item identifier.
itemImageSourceImage sourceNoGoogle Drive or another source.
itemImageLinkPublic image linkNoArray of image links when available.
itemLastUpdatedAtTBDYesISO 8601 timestamp of the last item update.
attributesTBDNoKey/value pairs of additional item attributes.

SKU Mapping​

API fieldExcel sourceRequiredRule
skuNameVariant Description / SKUYesFull SKU name.
skuNickNameDerivedNoItem name + item code + colour code.
sellerSKUNo + CodeNoSeller SKU.
tagsTBDNoTags.
productCodeNo + CodeNoProduct code.
barCodeTBDNoBarcode.
hsnCodeHSNSACCodeNoHSN code.
gstGSTGroupCodeNoGST percentage.
variantType1StaticNoSize.
variantValue1SizeNoFirst variant value.
variantType2StaticNoColour_Name.
variantValue2Colour_NameNoSecond variant value.
syncIdNo + CodeYesUnique SKU identifier.
skuImageSourceImage sourceNoGoogle Drive or another source.
skuImageLinkPublic image linkNoArray of image links when available.

Up to 10 variant type/value pairs are allowed.

Selling Unit Mapping​

API fieldExcel sourceRequiredRule
nameBaseUnitofMeasure or static valueYesUnit name, usually PAIR or CTN. Must be unique on the SKU.
multiplierAlternate_UOM_Per_QuantityYes, unless the SKU uses containsHow many base units one of this unit holds. The base unit is 1.
contains—NoAlternative to multiplier. How many containsUnit one of this unit holds. See Unit Conversions.
containsUnit—With containsName of another selling unit on the same SKU. If none has that name, an inactive unit is added for it.
mrpMRPYesMaximum retail price.
sellingPricePrice_Per_PairYesSelling price.
availableQuantityTBDNoAvailable stock if provided.
isBaseUnitStaticYes, unless the SKU uses containstrue for PAIR, false for CTN. Exactly one per SKU: the smallest unit.
isDefaultStaticYestrue for PAIR.
includeGSTStaticYesAlways true.
syncIdNo + CodeYesUnique selling unit identifier.
isActiveStaticYesfalse for PAIR, true for CTN.
weightTBDNoUnit weight.
weightUnitTBDNoWeight unit, for example G.
lengthTBDNoUnit length.
breadthTBDNoUnit breadth.
heightTBDNoUnit height.
dimensionUnitTBDNoDimension unit, for example CM.
volumeTBDNoUnit volume.
volumeUnitTBDNoVolume unit, for example M3.
inventoryLastUpdatedAtTBDYesISO 8601 timestamp of the last inventory update.
wlbhLastUpdatedAtTBDYesISO 8601 timestamp of the last weight and dimension update.

Unit Conversions​

Every SKU has one base unit: its smallest unit, with multiplier 1. Every other unit's multiplier says how many base units it holds.

UnitmultiplierisBaseUnitMeans
PCS1trueone piece
BOX12false1 box = 12 pieces
CTN144false1 carton = 144 pieces
A common mistake

Sending the unit you sell in as 1 (BOX multiplier 1, PCS multiplier 12) is read as "1 piece = 12 boxes". If that's how your system thinks about units, use contains instead (below).

Stating units with contains​

Instead of a multiplier, a unit can say what it contains, in any direction that suits your data:

1 box = 12 pcs
"sellingUnits": [
{ "name": "BOX", "contains": 12, "containsUnit": "PCS", "mrp": 120, "sellingPrice": 100, "syncId": "MG-75-BOX" },
{ "name": "PCS", "mrp": 10, "sellingPrice": 9, "syncId": "MG-75-PCS" }
]

The API works out the base unit and every multiplier from these statements. The example above is stored as PCS ×1 (base) and BOX ×12.

  • As soon as one unit on a SKU has contains, the SKU's multiplier and isBaseUnit values are not used. You can leave them out. If you send them and they differ from what contains says, they are ignored and the response lists a warning.
  • containsUnit is the name of another unit on the same SKU. It is compared case-insensitively, so "pcs" matches "PCS".
  • If no unit on the SKU has that name, the API adds one. Sending only { "name": "CTN", "contains": 10, "containsUnit": "BOX", "mrp": 120, "sellingPrice": 105 } stores BOX ×1 (base) and CTN ×10. The added BOX is inactive, since it exists for the conversion rather than for sale, and is priced from CTN (12 / 10.5). Its sync id is <SKU syncId>-BOX. The response lists a warning for each added unit; check it for misspelt unit names.
  • SKUs that don't use contains work exactly as before.
{ "name": "CTN", "contains": 12, "containsUnit": "BOX" },
{ "name": "BOX", "contains": 12, "containsUnit": "PCS" },
{ "name": "PCS" }

Stored as PCS ×1 (base), BOX ×12, CTN ×144.

Prices, stock and weight​

FieldRule
mrp, sellingPriceStay on the unit they are sent on. The base unit needs a price: if only a bigger unit is priced, the base price is that price divided by its multiplier, rounded to 2 decimals (BOX 100 → PCS 8.33), and the response lists a warning. A unit with no price gets base price × its multiplier
availableQuantityStays on the unit it is sent on. Send stock on the smallest unit
weight, dimensions, volumePer base unit

Rejected statements​

A SKU whose statements can't be resolved rejects its whole item row. Other rows in the request still go through.

ProblemExample error
contains is not a positive numberSKU "Lime" > unit "BOX": contains must be a positive number
contains without containsUnit, or the reverseSKU "Lime" > unit "BOX": containsUnit is required with contains
A unit contains itselfSKU "Lime" > unit "BOX": a unit cannot contain itself
Two units with the same nameSKU "Lime": unit name "box" appears more than once on this SKU
A unit that isn't a whole number of the smallest unitSKU "Lime" > unit "PACK": 1 PACK = 2.5 PCS, which is not a whole number of the smallest unit "PCS"
A unit not linked to the othersSKU "Lime": every unit has to be linked to the others by contains; these are not linked to each other: "BOX", "PCS" / "NOS"
Statements that disagreeSKU "Lime" > unit "BOX": contains says 1 BOX = 12 PCS, but the other units work out to 1 BOX = 8.3333 PCS
More than 6 units, counting added onesSKU "Lime": a SKU can have at most 6 selling units, got 7 (with (1 added from containsUnit) when units were added)
No unit has a priceSKU "Lime" > base unit "PCS": mrp is required for base unit (also when the base unit was added)

Processing Rules​

  1. Group all Excel rows with the same No into one item.
  2. For each item, create SKUs from unique Size + Colour_Name combinations.
  3. Generate skuNickName from item name, item code, and colour code.
  4. Create a base PAIR selling unit for each SKU.
  5. Create an alternate CTN selling unit when carton data is present.
  6. If CTN MRP is blank, calculate it as base MRP multiplied by the CTN multiplier.
  7. If CTN selling price is blank, calculate it as base price multiplied by the CTN multiplier.
  8. Keep tags and barCode empty or null when no source value exists.

Normalized Final Payload​

Normalized final payload
[
{
"itemName": "Sample Item 1004",
"description": "Sample Item 1004",
"brandName": "Sample Brand",
"subBrandName": "Sample Sub Brand",
"categoryName": "Sample Category",
"subCategoryName": "Sample Subcategory",
"itemImageSource": "OTHERS",
"itemImageLink": ["link"],
"syncId": "ITEM-1001",
"itemLastUpdatedAt": "2026-08-03T06:41:38.654Z",
"attributes": {
"Attribute 1": "Value 1",
"Attribute 2": "Value 2"
},
"skus": [
{
"skuName": "Sample Item 1004 Sample Color 05",
"skuNickName": "Sample Item 1004 ITEM-1001 CLR",
"sellerSKU": "ITEM-1001-SKU-05-CLR",
"tags": null,
"productCode": "ITEM-1001-SKU-05-CLR",
"barCode": null,
"hsnCode": "00000000",
"gst": 5,
"variantType1": "Size",
"variantValue1": "05",
"variantType2": "Colour_Name",
"variantValue2": "Sample Color",
"syncId": "ITEM-1001_SKU_05_CLR",
"skuImageSource": "OTHERS",
"skuImageLink": ["link"],
"sellingUnits": [
{
"name": "PAIR",
"multiplier": 1,
"mrp": 100,
"sellingPrice": 80,
"availableQuantity": 0,
"isBaseUnit": true,
"isDefault": true,
"includeGST": true,
"syncId": "ITEM-1001_SKU_05_CLR_PAIR",
"isActive": false,
"weight": 500,
"weightUnit": "G",
"length": 10,
"breadth": 10,
"height": 10,
"dimensionUnit": "CM",
"volume": 0.001,
"volumeUnit": "M3",
"inventoryLastUpdatedAt": "2026-08-03T06:52:00.641Z",
"wlbhLastUpdatedAt": "2026-08-03T06:55:17.156Z"
},
{
"name": "CTN",
"multiplier": 32,
"mrp": 1200,
"sellingPrice": 960,
"availableQuantity": 0,
"isBaseUnit": false,
"isDefault": false,
"includeGST": true,
"syncId": "ITEM-1001_SKU_05_CLR",
"isActive": true,
"weight": 500,
"weightUnit": "G",
"length": 10,
"breadth": 10,
"height": 10,
"dimensionUnit": "CM",
"volume": 0.001,
"volumeUnit": "M3",
"inventoryLastUpdatedAt": "2026-08-03T06:52:00.641Z",
"wlbhLastUpdatedAt": "2026-08-03T06:55:17.156Z"
}
]
}
]
}
]

Source Data Checklist​

Source columnUsed for
Article NameitemName
Descriptiondescription
BrandbrandName
Sub BrandsubBrandName
Segment / Master CategorycategoryName
GendersubCategoryName
NoItem syncId
CodeSKU and ID generation
Variant DescriptionskuName
SizevariantValue1
Colour_NamevariantValue2
HSNSACCodehsnCode
GSTGroupCodegst
MRPBase unit MRP
Price_Per_PairBase unit selling price
Alternate_UOM_Per_QuantityCTN multiplier
BaseUnitofMeasureUnit name

Responses​

Success​

Success response
{
"error": false,
"status": true,
"statusCode": 200,
"responseTimestamp": "2026-03-19T07:27:45.863Z",
"data": {
"message": "All rows processed successfully"
}
}

Partial Failure​

Partial failure response
{
"error": false,
"status": true,
"statusCode": 200,
"responseTimestamp": "2026-03-19T08:20:24.166Z",
"data": {
"message": "Some rows failed",
"processedCount": 0,
"errorCount": 1,
"errors": [
{
"row": 1,
"itemName": "Item 1",
"errors": ["itemName is required"]
}
]
}
}

Warnings​

When a row is accepted but something was worked out for you, for example multipliers from contains, the response also carries warningCount and warnings (first 20). They appear on success and partial-failure responses alike, and are absent when there are none.

WarningMeans
… > unit "BOX": multiplier 1 ignored; worked out from contains as 12You sent a multiplier that disagrees with contains
…: isBaseUnit ignored; the base unit worked out from contains is "PCS"You flagged a different unit as the base
… > unit "PCS": mrp worked out as 10 from unit "BOX" (120 / 12)The base unit had no price, so it was worked out from a bigger unit (same for sellingPrice)
… > unit "BOX": not sent; added as an inactive unit because unit "CTN" contains itcontainsUnit named a unit that wasn't in the payload, so it was added. Check the name is spelt as intended
Success with warnings
{
"error": false,
"status": true,
"statusCode": 200,
"responseTimestamp": "2026-10-23T08:20:24.166Z",
"data": {
"message": "All rows processed successfully",
"warningCount": 1,
"warnings": [
{
"row": 1,
"itemName": "Marie Gold 75g",
"warnings": [
"SKU \"Lime\" > unit \"BOX\": multiplier 1 ignored; worked out from contains as 12",
"SKU \"Lime\" > unit \"PCS\": multiplier 12 ignored; worked out from contains as 1",
"SKU \"Lime\": isBaseUnit ignored; the base unit worked out from contains is \"PCS\""
]
}
]
}
}

Implementation Checklist​

  • Confirm every item row has No, Article Name, Brand, and category data.
  • Confirm each SKU can be uniquely derived from Size and Colour_Name.
  • Confirm MRP, price, and multiplier values are numeric before syncing.
  • Confirm the base unit is the smallest unit with multiplier 1, or state units with contains / containsUnit instead.
  • Check warnings in the response after the first sync.
  • Confirm SKU syncId values are unique.
  • Send a JSON array, even when syncing one item.