Skip to main content

Create or update

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

Request parameters

NameTypeRequired/OptionalDescription
productsBikProduct[]RequiredList of products

Request Information

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

BikProduct Type

NameTypeDescription
idstringProduct ID
namestringName of the product
descriptionstringProduct description
imagestringProduct image
urlstringProduct url
currencystringCurrency of the country
combinationsBikCombination[]List of product combinations

BikCombination Type

NameTypeDescription
idstringCombination id
namestringCombination name
pricenumberCombination price
discountedPricenumberCombination discount price
quantitynumberCombination quantity available
productUrlstringProduct url
imagestringCombination image url

Sample request

curl --location 'https://bikapi.bikayi.app/integrations/bikPlatformFunctions-products/createOrUpdate' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic AUTH_TOKEN' \
--data '{
"products": [
{
"image": "https://cdn.shopify.com/s/files/1/0672/6267/7292/products/young-man-in-bright-fashion_925x_1f25586d-6ce7-4ae7-9b61-a14d7da56d16.jpg?v=1689587429",
"name": "Ocean Blue Shirt",
"currency": "INR",
"url": "https://test-product.com/product.json",
"id": "8459368759512",
"description": "Ocean blue cotton shirt with a narrow collar and buttons down the front and long sleeves. Comfortable fit and tiled kalidoscope patterns.",
"combinations": [
{
"quantity": 2,
"discountedPrice": 50,
"productUrl": "https://test-product.com/product.json",
"image": "https://test-product.com/product.png",
"price": 50,
"name": "Default Title",
"options": {
"Title": "Default Title"
},
"id": "45719281008940"
}
]
}
]
}'

JSON response example:

{
"status": 200,
"success": true,
"data": {
"products": [
{
"image": "https://cdn.shopify.com/s/files/1/0672/6267/7292/products/young-man-in-bright-fashion_925x_1f25586d-6ce7-4ae7-9b61-a14d7da56d16.jpg?v=1689587429",
"combinations": [
{
"quantity": 2,
"discountedPrice": 50,
"productUrl": "https://test-product.com/product.json",
"image": "https://test-product.com/product.png",
"price": 50,
"name": "Default Title",
"options": {
"Title": "Default Title"
},
"id": "45719281008940"
}
],
"publishedAt": {
"_seconds": 1732516184,
"_nanoseconds": 333000000
},
"catalogs": [],
"name": "Ocean Blue Shirt",
"description": "Ocean blue cotton shirt with a narrow collar and buttons down the front and long sleeves. Comfortable fit and tiled kalidoscope patterns.",
"currency": "INR",
"skipSync": false,
"id": "8459368759512",
"url": "https://test-product.com/product.json"
}
]
}
}

Response parameters

NameTypeDescription
statusnumberResponse status
successbooleanIs successful response or not
dataBikProductsList of products

BikProduct Type

NameTypeDescription
idstringProduct ID
namestringName of the catalog
descriptionstringCatalog description
imagestringCatalog image
handlestringCatalog handle
variantIdsstring[]List of variant ids belongs to current product
currencystringCurrency of the country
photosBikPhoto[]List of photos
minPricenumberMinimum price of the product
maxPricenumberMaximum price of the product
discountnumberDiscount if any
tagsstringProduct tags
catalogsBikCatalog[]List of catalogs this product belongs to
catalogIdsstring[]List of catalog ids this product belongs to
combinationsBikCombination[]List of product combinations

BikPhoto Type

NameTypeDescription
photoUrlstringProduct photo

BikCatalog Type

NameTypeDescription
idstringCatalog id
namestringCatalog name

BikCombination Type

NameTypeDescription
idstringCombination id
namestringCombination name
customstringCombination custom name
productIdstringProduct id
pricenumberCombination price
discountedPricenumberCombination discount price
quantitynumberCombination quantity available

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."
}
]
}