Create or update
You can use the create or update products API to create the products.
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
| Name | Type | Required/Optional | Description |
|---|---|---|---|
products | BikProduct[] | Required | List of products |
Request Information
| Category | Value |
|---|---|
| Http request | POST |
| URL | https://bikapi.bikayi.app/integrations/bikPlatformFunctions-products/createOrUpdate |
BikProduct Type
| Name | Type | Required/Optional | Description |
|---|---|---|---|
id | string | Required | Product ID |
name | string | Required | Name of the product |
url | string | Required | URL of the product on the storefront |
description | string | Optional | Product description |
image | string | Optional | Product image |
currency | string | Optional | Currency of the country |
photos | BikPhoto[] | Required | List of photos |
tags | string | Optional | Comma-separated product tags |
catalogIds | string[] | Optional | List of catalog ids this product belongs to |
combinations | BikCombination[] | Required | List of product combinations |
metafields | Metafield[] | Optional | Metafields associated with the product |
BikPhoto Type
| Name | Type | Required/Optional | Description |
|---|---|---|---|
photoUrl | string | Required | Product photo |
Metafield Type
| Name | Type | Required/Optional | Description |
|---|---|---|---|
id | string | Required | Metafield id |
namespace | string | Required | Metafield namespace |
key | string | Required | Metafield key |
value | string | Required | Metafield value |
BikCombination Type
| Name | Type | Required/Optional | Description |
|---|---|---|---|
id | string | Required | Combination id |
name | string | Required | Combination name |
productId | string | Required | Product id |
price | number | Required | Combination price |
discountedPrice | number | Required | Combination discount price |
quantity | number | Required | Combination quantity available |
image | string | Required | Combination image |
productUrl | string | Required | Combination product url |
currency | string | Optional | Currency of the combination |
options | object | Optional | Map 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
| Name | Type | Description |
|---|---|---|
status | number | Response status |
success | boolean | Is successful response or not |
data | BikProducts | List of products |
Errors
| Error Code | Meaning |
|---|---|
| 400 | Invalid payload -- Your request is invalid. |
| 401 | Unauthorized -- User is not authenticated. |
| 404 | Not Found -- The specified API could not be found. |
| 500 | Internal 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
catalogIdson 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."
}
]
}