Skip to main content

Create or update

You can use the create or update products API to create the products.

Catalogs must exist before they are referenced

If you pass catalogIds on a product, every referenced catalog must already exist for this store. Create the catalogs first by calling catalogs/createOrUpdate — then reference the returned catalog IDs here. Passing an unknown catalog ID will fail the request (see the catalog-not-found example in the Errors section).

Request parameters

NameTypeRequired/OptionalDescription
productsBikProduct[]RequiredList of products

Request Information

CategoryValue
Http requestPOST
URLhttps://bikapi.bikayi.app/integrations/bikPlatformFunctions-products/createOrUpdate

BikProduct Type

NameTypeRequired/OptionalDescription
idstringRequiredProduct ID
namestringRequiredName of the product
urlstringRequiredURL of the product on the storefront
descriptionstringOptionalProduct description
imagestringOptionalProduct image
currencystringOptionalCurrency of the country
photosBikPhoto[]RequiredList of photos
tagsstringOptionalComma-separated product tags
catalogIdsstring[]OptionalList of catalog ids this product belongs to
combinationsBikCombination[]RequiredList of product combinations
metafieldsMetafield[]OptionalMetafields associated with the product

BikPhoto Type

NameTypeRequired/OptionalDescription
photoUrlstringRequiredProduct photo

Metafield Type

NameTypeRequired/OptionalDescription
idstringRequiredMetafield id
namespacestringRequiredMetafield namespace
keystringRequiredMetafield key
valuestringRequiredMetafield value

BikCombination Type

NameTypeRequired/OptionalDescription
idstringRequiredCombination id
namestringRequiredCombination name
productIdstringRequiredProduct id
pricenumberRequiredCombination price
discountedPricenumberRequiredCombination discount price
quantitynumberRequiredCombination quantity available
imagestringRequiredCombination image
productUrlstringRequiredCombination product url
currencystringOptionalCurrency of the combination
optionsobjectOptionalMap of variant option values, e.g. { "Size": "XL", "Color": "Red" }

Sample request — product with variants

An electronics store selling a smartphone available in two colors and two storage sizes (4 variant combinations):

curl --location 'https://bikapi.bikayi.app/integrations/bikPlatformFunctions-products/createOrUpdate' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic AUTH_TOKEN' \
--data '{
"products": [
{
"id": "prod_nova_x1",
"name": "Nova X1 Smartphone",
"url": "https://electronics-store.com/products/nova-x1",
"description": "6.7-inch AMOLED display, 108MP camera, 5000mAh battery.",
"image": "https://cdn.electronics-store.com/nova-x1/hero.jpg",
"currency": "INR",
"tags": "smartphone,5g,android",
"catalogIds": ["cat_smartphones"],
"photos": [
{ "photoUrl": "https://cdn.electronics-store.com/nova-x1/front.jpg" },
{ "photoUrl": "https://cdn.electronics-store.com/nova-x1/back.jpg" }
],
"combinations": [
{
"id": "var_nova_x1_black_128",
"productId": "prod_nova_x1",
"name": "Midnight Black / 128GB",
"price": 49999,
"discountedPrice": 44999,
"currency": "INR",
"quantity": 25,
"image": "https://cdn.electronics-store.com/nova-x1/black.jpg",
"productUrl": "https://electronics-store.com/products/nova-x1?variant=black-128",
"options": { "Color": "Midnight Black", "Storage": "128GB" }
},
{
"id": "var_nova_x1_black_256",
"productId": "prod_nova_x1",
"name": "Midnight Black / 256GB",
"price": 54999,
"discountedPrice": 49999,
"currency": "INR",
"quantity": 12,
"image": "https://cdn.electronics-store.com/nova-x1/black.jpg",
"productUrl": "https://electronics-store.com/products/nova-x1?variant=black-256",
"options": { "Color": "Midnight Black", "Storage": "256GB" }
},
{
"id": "var_nova_x1_silver_128",
"productId": "prod_nova_x1",
"name": "Glacier Silver / 128GB",
"price": 49999,
"discountedPrice": 44999,
"currency": "INR",
"quantity": 18,
"image": "https://cdn.electronics-store.com/nova-x1/silver.jpg",
"productUrl": "https://electronics-store.com/products/nova-x1?variant=silver-128",
"options": { "Color": "Glacier Silver", "Storage": "128GB" }
},
{
"id": "var_nova_x1_silver_256",
"productId": "prod_nova_x1",
"name": "Glacier Silver / 256GB",
"price": 54999,
"discountedPrice": 49999,
"currency": "INR",
"quantity": 9,
"image": "https://cdn.electronics-store.com/nova-x1/silver.jpg",
"productUrl": "https://electronics-store.com/products/nova-x1?variant=silver-256",
"options": { "Color": "Glacier Silver", "Storage": "256GB" }
}
],
"metafields": [
{
"id": "mf_nova_x1_warranty",
"namespace": "specs",
"key": "warranty_months",
"value": "12"
}
]
}
]
}'

Sample request — product without variants

combinations is required and must contain at least one entry. For products that are sold as a single SKU (no color/size/storage options), include a single combination representing the product itself — use "Default" (or the product name) as the combination name and omit options:

curl --location 'https://bikapi.bikayi.app/integrations/bikPlatformFunctions-products/createOrUpdate' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic AUTH_TOKEN' \
--data '{
"products": [
{
"id": "prod_usb_c_cable",
"name": "Braided USB-C Cable — 1m",
"url": "https://electronics-store.com/products/usb-c-cable-1m",
"description": "Durable braided USB-C to USB-C cable, 100W PD, 1 meter.",
"image": "https://cdn.electronics-store.com/usb-c-cable/hero.jpg",
"currency": "INR",
"tags": "accessory,cable,usb-c",
"photos": [
{ "photoUrl": "https://cdn.electronics-store.com/usb-c-cable/hero.jpg" }
],
"combinations": [
{
"id": "var_usb_c_cable_default",
"productId": "prod_usb_c_cable",
"name": "Default",
"price": 799,
"discountedPrice": 599,
"currency": "INR",
"quantity": 200,
"image": "https://cdn.electronics-store.com/usb-c-cable/hero.jpg",
"productUrl": "https://electronics-store.com/products/usb-c-cable-1m"
}
]
}
]
}'

JSON response example:

{
"status": 200,
"success": true,
"data": {
"products": [
{
"id": "prod_nova_x1",
"name": "Nova X1 Smartphone",
"url": "https://electronics-store.com/products/nova-x1",
"description": "6.7-inch AMOLED display, 108MP camera, 5000mAh battery.",
"image": "https://cdn.electronics-store.com/nova-x1/hero.jpg",
"currency": "INR",
"tags": "smartphone,5g,android",
"catalogIds": ["cat_smartphones"],
"photos": [
{ "photoUrl": "https://cdn.electronics-store.com/nova-x1/front.jpg" },
{ "photoUrl": "https://cdn.electronics-store.com/nova-x1/back.jpg" }
],
"combinations": [
{
"id": "var_nova_x1_black_128",
"productId": "prod_nova_x1",
"name": "Midnight Black / 128GB",
"price": 49999,
"discountedPrice": 44999,
"currency": "INR",
"quantity": 25,
"image": "https://cdn.electronics-store.com/nova-x1/black.jpg",
"productUrl": "https://electronics-store.com/products/nova-x1?variant=black-128",
"options": { "Color": "Midnight Black", "Storage": "128GB" }
}
]
}
]
}
}

Response parameters

NameTypeDescription
statusnumberResponse status
successbooleanIs successful response or not
dataBikProductsList of products

Errors

Error CodeMeaning
400Invalid payload -- Your request is invalid.
401Unauthorized -- User is not authenticated.
404Not Found -- The specified API could not be found.
500Internal Server Error -- We had a problem with our server. Try again later.

Error response example:

{
"status": 400,
"errors": [
{
"message": "'products' is required."
}
]
}

Catalog-not-found error example — one of the catalogIds on a product does not exist for this store:

{
"status": 400,
"errors": [
{
"message": "Catalog with id 'cat_smartphones' does not exist. Create it via catalogs/createOrUpdate before associating products with it."
}
]
}