Commerce
Post v1commerceproducts options
POST
/
v1
/
commerce
/
products
/
{productID}
/
options
cURL
curl --request POST \
--url https://api.wazapin.com/v1/commerce/products/{productID}/options \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"choices": [
"<string>"
],
"price_delta_amount": 123,
"required": true
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
choices: ['<string>'],
price_delta_amount: 123,
required: true
})
};
fetch('https://api.wazapin.com/v1/commerce/products/{productID}/options', 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}/options"
payload = {
"name": "<string>",
"choices": ["<string>"],
"price_delta_amount": 123,
"required": True
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"name": "<string>",
"option_type": "<string>",
"price_delta_amount": 123,
"product_id": "<string>",
"required": true,
"choices": [
"<string>"
]
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"field": "<string>",
"location": "<string>"
}
],
"request_id": "<string>"
}
}Path Parameters
Body
application/json
⌘I
cURL
curl --request POST \
--url https://api.wazapin.com/v1/commerce/products/{productID}/options \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"choices": [
"<string>"
],
"price_delta_amount": 123,
"required": true
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
choices: ['<string>'],
price_delta_amount: 123,
required: true
})
};
fetch('https://api.wazapin.com/v1/commerce/products/{productID}/options', 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}/options"
payload = {
"name": "<string>",
"choices": ["<string>"],
"price_delta_amount": 123,
"required": True
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"name": "<string>",
"option_type": "<string>",
"price_delta_amount": 123,
"product_id": "<string>",
"required": true,
"choices": [
"<string>"
]
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"field": "<string>",
"location": "<string>"
}
],
"request_id": "<string>"
}
}