Product Choices
This is used to view, create, update and delete product choice sets & values assigned to products.
Product Choice Properties
| id |
{ "id" : 255 }
The unique ID of the product choice |
| set |
{ "set": { "id": 1 } }
The unique ID of the choice set |
| value |
{ "value" : { "id": 1 } }
The unique IDs of the choice set values |
| customPrice |
{ "customPrice" : 10.00 }
Only required if the price for the product choice is different to the normal price for the choice set value |
What you can do with product choices
GET /v1/products/ID/choices
Receive a list of all product choices
GET /v1/products/ID/choices/ID
Receive a single product choice
POST /v1/products/ID/choices
Create a new product choice
PUT /v1/products/ID/choices/ID
Update a product choice
DELETE /v1/products/ID/choices/ID
Delete a product choice
GET /v1/products/ID/choices
Returns all product choices
GET /v1/products/1/choices
HTTP/1.1 200 OK
[
{
"id": 1,
"set": {
"id": 1
},
"value": {
"id": 1
},
"customPrice": 9.95
}
]
GET /v1/products/ID/choices/ID
Returns a single product choice.
GET /v1/products/1/choices/1
HTTP/1.1 200 OK
{
"id": 1,
"set": {
"id": 1
},
"value": {
"id": 1
},
"customPrice": 9.95
}
POST /v1/products/ID/choices
Creates a new product choice.
POST /v1/products/1/choices
POST /v1/products/1/choices
{
"set": 1,
"value": 1,
"customPrice": 9.95
}
POST /v1/products/1/choices
HTTP/1.1 201 Created
{
"id": 1,
"set": {
"id": 1
},
"value": {
"id": 1
},
"customPrice": 9.95
}
PUT /v1/products/ID/choices/ID
Update a product choice.
PUT /v1/products/1/choices/1
PUT /v1/products/1/choices/1
{
"customPrice": 19.95
}
PUT /v1/products/1/choices/1
HTTP/1.1 200 OK
{
"id": 1,
"set": {
"id": 1
},
"value": {
"id": 1
},
"customPrice": 19.95
}
DELETE /v1/products/ID/choices/ID
Deletes an existing product.
Returns 204 No Content on success.