Skip to Content
Bhakti BaazarDevelopers
API referenceProducts

Add a variant to a product

POST
/products/{productId}/variants

Scope: catalog:write

Authorization

sellerApiKey
headerAuthorizationBearer <bbsk_live_…>

A Seller API key, bbsk_live_…

Path Parameters

productId*string
Formatuuid

Header Parameters

Idempotency-Key*string

A new unique value (a UUID is ideal) for each create. Retrying with the same key and body returns the first response, marked Idempotent-Replayed: true, and creates nothing twice. Kept 24 hours.

Request Body

application/json
  1. body
sellerSku?string

Your own SKU, unique in your account ignoring case.

price*number

Selling price in rupees, GST included.

mrp*number

MRP in rupees, at least the price.

hsnCode*string

4 to 8 digit HSN code.

gstRate*number

GST rate in percent.

Value in00.2535121828
isPublished?boolean

Defaults to the product’s isPublished when creating.

attributes?array<>

The subcategory’s variant attributes.

imageUrls?array<string>

Public HTTPS image URLs (JPEG, PNG or WebP, up to 10 MB). We copy them to our CDN.

Itemsitems <= 6
itemWeight?number

Grams

Range0 <= value
shippingWeight?number

Grams, packed

Range0 <= value
itemDimensions?
shippingDimensions?

Packed

minOrderQuantity?number
Range1 <= value
maxOrderQuantity?number
Range1 <= value
isReturnable?boolean
Defaulttrue
stock?number
Range0 <= value
Default0

Response Body

application/json
  1. response
id*string
Formatuuid
sku*string

Bhakti Baazar SKU, assigned by us.

sellerSku*|

Your own SKU. Unique within your account, ignoring letter case and surrounding spaces.

price*number

Selling price in rupees, GST included.

mrp*number|null
discountPercentage*|

Worked out from price and MRP.

stock*number
isDefault*boolean
isPublished*boolean
hsnCode*string
gstRate*number
images*array<string>

Image URLs on our CDN.

attributes*array<>
itemWeight*|

Grams

shippingWeight*|

Grams

itemDimensions*|null
shippingDimensions*|null
minOrderQuantity*number|null
maxOrderQuantity*number|null
isReturnable*boolean
handlingTimeInDays*number

Days you need to pack and hand over an order.

updatedAt*string
Formatdate-time
Example Request
curl -X POST 'https://api.bhaktibaazar.com/seller-api/v1/products/497f6eca-6276-4993-bfeb-53cbbbba6f08/variants' \  -H 'Idempotency-Key: string' \  -H 'Content-Type: application/json' \  -d '{  "price": 499,  "mrp": 799,  "hsnCode": "1404",  "gstRate": 5}'
Example Response
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "sku": "string",  "sellerSku": "string",  "price": 499,  "mrp": 799,  "discountPercentage": 0,  "stock": 12,  "isDefault": true,  "isPublished": true,  "hsnCode": "1404",  "gstRate": 5,  "images": [    "string"  ],  "attributes": [    {      "name": "Mukhi",      "value": "5",      "unit": "string"    }  ],  "itemWeight": 0,  "shippingWeight": 0,  "itemDimensions": {    "length": 0,    "width": 0,    "height": 0  },  "shippingDimensions": {    "length": 0,    "width": 0,    "height": 0  },  "minOrderQuantity": 0,  "maxOrderQuantity": 0,  "isReturnable": true,  "handlingTimeInDays": 0,  "updatedAt": "2019-08-24T14:15:22Z"}