Optimizely Style Classes API
The Style Classes API from Optimizely — 8 operation(s) for style classes.
Operations 12
Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay
Ask an LLM
“Which style classes are defined in my commerce catalog?”
“Can I list only the active style classes, sorted by name?”
Tell an agent
List all style classes.
Find style classes matching the filter {filter}, ordered by {orderby}.
POST
/api/v1/admin/StyleClasses
Create a style class · Post a new entity to EntitySet StyleClasses
#
Ask an LLM
“How do I create a new style class for product variants?”
“What is required when adding a style class, name and description?”
Tell an agent
Create a style class named {name} described as {description}.
Add a new active style class {name} with description {description}.
GET
/api/v1/admin/StyleClasses({id})
Get a style class by ID · Returns the entity with the key from StyleClasses
#
Ask an LLM
“What are the details of one style class by its ID?”
“Is a specific style class still active?”
Tell an agent
Get style class {id}.
Show the name, description and active flag of style class {id}.
PUT
/api/v1/admin/StyleClasses({id})
Replace a style class · Replace entity in EntitySet StyleClasses
#
Ask an LLM
“Can I overwrite a whole style class record in one request?”
“Does a full replace of a style class need name and description again?”
Tell an agent
Replace style class {id} with name {name} and description {description}.
Overwrite the entire style class {id} using a full PUT.
DELETE
/api/v1/admin/StyleClasses({id})
Delete a style class by ID · Delete entity in EntitySet StyleClasses
#
Ask an LLM
“How do I permanently delete one style class?”
“Does deleting a style class accept an If-Match ETag?”
Tell an agent destructive · confirm first
Delete style class {id}.
Delete style class {id} only if its ETag matches {ifMatch}.
PATCH
/api/v1/admin/StyleClasses({id})
Update a style class · Update entity in EntitySet StyleClasses
#
Ask an LLM
“How do I rename an existing style class?”
“Can I deactivate a style class without replacing the whole record?”
Tell an agent
Rename style class {id} to {name}.
Set isActive to {isActive} on style class {id}.
GET
/api/v1/admin/StyleClasses/Default.Default()
Get a default style class template · Call operation Default
#
Ask an LLM
“What default values does a new style class start with?”
“Is there a blank style class template to fetch before creating one?”
Tell an agent
Fetch the default style class template.
Show me the default values for a new style class.
POST
/api/v1/admin/StyleClasses/Default.archive
Archive style classes with the archive action · Call operation archive
#
Ask an LLM
“Can I archive style classes using the OData archive action instead of deleting them?”
“Which POST call archives a list of style classes by ID?”
Tell an agent
Run the Default.archive action on style classes {ids}.
POST to the archive action to archive style classes {ids}.
DELETE
/api/v1/admin/styleclasses/archive
Archive style classes through the DELETE archive route · Style classes archive route
#
Ask an LLM
“Is there a DELETE route that archives style classes rather than removing them?”
“How does the /styleclasses/archive endpoint handle a list of IDs?”
Tell an agent destructive · confirm first
Archive style classes {ids} through the DELETE /styleclasses/archive route.
Send a DELETE to the style class archive route for {ids}.
Ask an LLM
“How do I permanently delete several style classes at once?”
“Can I pass a list of IDs to remove many style classes?”
Tell an agent destructive · confirm first
Bulk delete the style classes with IDs {ids}.
Permanently remove all of these style classes in one call: {ids}.
GET
/api/v1/admin/styleclasses({key})/customproperties({custompropertyKey})
Get a custom property on a style class · Style classes get custom property by key and custompropertykey
#
Ask an LLM
“Where do I read a custom property stored on a style class?”
“Can I fetch one extra property value from a style class record?”
Tell an agent
Get custom property {custompropertyKey} on style class {key}.
Show the custom property {custompropertyKey} of style class {key}.
GET
/api/v1/admin/styleclasses({key})/styletraits({styletraitKey})
Get a style trait within a style class · Style classes get style trait by key and styletraitkey
#
Ask an LLM
“What does one style trait, such as color or size, look like inside a style class?”
“Can I fetch a single style trait belonging to a style class?”
Tell an agent
Get style trait {styletraitKey} of style class {key}.
Show the details of trait {styletraitKey} in style class {key}.