Commerce
Post v1commerceproducts variantsbulk
POST
/
v1
/
commerce
/
products
/
{productID}
/
variants
/
bulk
cURL
curl --request POST \
--url https://api.wazapin.com/v1/commerce/products/{productID}/variants/bulk \
--header 'Content-Type: application/json' \
--data '
{
"colors": [
"<string>"
],
"default_stock_qty": 1,
"sizes": [
"<string>"
]
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({colors: ['<string>'], default_stock_qty: 1, sizes: ['<string>']})
};
fetch('https://api.wazapin.com/v1/commerce/products/{productID}/variants/bulk', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.wazapin.com/v1/commerce/products/{productID}/variants/bulk"
payload = {
"colors": ["<string>"],
"default_stock_qty": 1,
"sizes": ["<string>"]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"items": [
{
"id": "<string>",
"price_delta_amount": 123,
"product_id": "<string>",
"stock_qty": 123,
"title": "<string>",
"digital_delivery_url": "<string>",
"image_url": "<string>",
"option_values": {},
"price_amount": 123,
"sku": "<string>"
}
]
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"field": "<string>",
"location": "<string>"
}
],
"request_id": "<string>"
}
}⌘I
cURL
curl --request POST \
--url https://api.wazapin.com/v1/commerce/products/{productID}/variants/bulk \
--header 'Content-Type: application/json' \
--data '
{
"colors": [
"<string>"
],
"default_stock_qty": 1,
"sizes": [
"<string>"
]
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({colors: ['<string>'], default_stock_qty: 1, sizes: ['<string>']})
};
fetch('https://api.wazapin.com/v1/commerce/products/{productID}/variants/bulk', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.wazapin.com/v1/commerce/products/{productID}/variants/bulk"
payload = {
"colors": ["<string>"],
"default_stock_qty": 1,
"sizes": ["<string>"]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"items": [
{
"id": "<string>",
"price_delta_amount": 123,
"product_id": "<string>",
"stock_qty": 123,
"title": "<string>",
"digital_delivery_url": "<string>",
"image_url": "<string>",
"option_values": {},
"price_amount": 123,
"sku": "<string>"
}
]
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"field": "<string>",
"location": "<string>"
}
],
"request_id": "<string>"
}
}