Product Options
This is used to view, create, update and delete product options.
Product Option Properties
id |
{ "id" : 255 }
The unique ID of the product option |
name |
{ "name" : "Choose Your Colour" }
The name of the product option |
values |
{ "values" : [
{
"id": 1,
"name": "Small"
}
]
}
The product option values available for the product option (present only when embed=product_option_values) |
What you can do with product options
GET /v1/products/ID/options
Receive a list of all product options
GET /v1/products/ID/options/ID
Receive a single product option
POST /v1/products/ID/options
Create a new product option
PUT /v1/products/ID/options/ID
Update a product option
DELETE /v1/products/ID/options/ID
Delete a product option
GET /v1/products/ID/options
Returns a list of product options assigned to a product.
GET /v1/products/1/options
HTTP/1.1 200 OK [ { "id": 1, "name": "Choose Your Colour" } ]
GET /v1/products/ID/options/ID
Returns a single product option.
embed | product_option_values |
GET /v1/products/1/options/ID
HTTP/1.1 200 OK { "id": 1, "name": "Size", "values": [ { "id": 1, "name": "Choose Your Colour" } ] }
POST /v1/products/ID/options
Creates a new product option.
POST /v1/products/1/options
POST /v1/products/1/options { "name": "Choose Your Colour" }
POST /v1/products/1/options
HTTP/1.1 201 Created { "id": 1, "name": "Choose Your Colour" }
PUT /v1/products/ID/options/ID
Update a product option.
PUT /v1/products/1/options/1
PUT /v1/products/1/options/1 { "name": "Make Your Colour Selection" }
PUT /v1/products/1/options/1
HTTP/1.1 200 OK { "id": 1, "name": "Make Your Colour Selection" }
DELETE /v1/products/ID/options/ID
Deletes an existing product option.
Returns 204 No Content on success.