Choice Sets
This is used to view, create, update and delete choice sets.
Choice Set Properties
id |
{ "id" : 255 }
The unique ID of the choice set |
displayName |
{ "displayName": "Choose Colour" }
The name for the choice set, displayed on the front-end website |
internalName |
{ "internalName" : "Colour Set 18"}
The name for the choice set, only displayed to site admin, used to distinguish the set from other similar sets |
values |
{ "values" : [ {
"id": 1,
"name": "Red",
"price": 9.99,
"sortOrder": 0
} ]
}
The values for the choice set |
What you can do with choice sets
GET /v1/choice-sets
Receive a list of all choice sets
GET /v1/choice-sets/ID
Receive a choice set
POST /v1/choice-sets
Create a new choice set
PUT /v1/choice-sets/ID
Update a choice set
DELETE /v1/choice-sets
Delete a choice set
GET /v1/choice-sets
Returns all choice sets.
fields | Comma separated list of properties to include |
sort | name or name_desc (default is internal name) |
GET /v1/choice-sets
HTTP/1.1 200 OK [ { "id": 1, "displayName": "Choose Colour", "internalName": "Colour Set 18", "values": [ { "id": 1, "name": "Red", "price": 9.99, "sortOrder": 0 } ] } ]
GET /v1/choice-sets/ID
Returns a single choice set.
fields | Comma separated list of properties to include |
GET /v1/choice-sets/1
HTTP/1.1 200 OK { "id": 1, "displayName": "Choose Colour", "internalName": "Colour Set 18", "values": [ { "id": 1, "name": "Red", "price": 9.99, "sortOrder": 0 } ] }
POST /v1/choice-sets
Creates a new choice set.
displayName | required |
internalName | required |
POST /v1/choice-sets
POST /v1/choice-sets { "displayName": "Size" "internalName": "size" }
POST /v1/choice-sets
HTTP/1.1 201 Created { "id": 2, "displayName": "Size", "internalName": "size" }
PUT /v1/choice-sets/ID
Update a choice set.
PUT /v1/choice-sets/1
PUT /v1/choice-sets/1 { "internalName": "Choice Set 18a" }
PUT /v1/choice-sets/1
HTTP/1.1 200 OK { "id": 2, "displayName": "Choose Colour", "internalName": "Choice Set 18a" }
DELETE /v1/choice-sets/ID
Deletes an existing choice set.
Returns 204 No Content on success.