Optimizely States API
The States API from Optimizely — 9 operation(s) for states.
Operations 13
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 states and provinces are set up in the Optimizely Configured Commerce admin?”
“Can I filter the state list to only active, taxable states?”
Tell an agent
List all states in the commerce admin.
List states matching {filter}, ordered by {orderby}, top {top}.
POST
/api/v1/admin/States
Add a state with its tax settings · Post a new entity to EntitySet States
#
Ask an LLM
“What tax codes and descriptions do I need to add a new state?”
“Can I set a state's tax rate and handling amount when creating it?”
Tell an agent
Create state {name} ({abbreviation}) with tax code {taxCode}, tax code 2 {taxCode2}, tax description {taxDescription} and tax description 2 {taxDescription2}.
Add state {abbreviation} under country {countryId} with tax rate {taxRate}.
Ask an LLM
“How do I look up a single state's tax configuration by its ID?”
“Can I expand related data when fetching one state record?”
Tell an agent
Show state {id}.
Fetch state {id} with {expand} expanded.
PUT
/api/v1/admin/States({id})
Replace a state record entirely · Replace entity in EntitySet States
#
Ask an LLM
“Can I overwrite a state with a complete new set of tax values?”
“What happens to state fields I leave out when replacing the whole record?”
Tell an agent
Replace state {id} with a full record named {name}, abbreviation {abbreviation}.
Overwrite every field of state {id}, setting tax description to {taxDescription}.
Ask an LLM
“How do I remove one state from the admin by its ID?”
“Can I make a state delete conditional on an ETag?”
Tell an agent destructive · confirm first
Delete state {id}.
Delete state {id} only if its ETag still matches {etag}.
PATCH
/api/v1/admin/States({id})
Update selected fields on a state · Update entity in EntitySet States
#
Ask an LLM
“Can I change just a state's tax rate without resending everything?”
“How would I deactivate a state or stop taxing freight there?”
Tell an agent
Patch state {id} so its tax rate is {taxRate}.
Update state {id} to set active to {isActive} and tax freight to {taxFreight}.
GET
/api/v1/admin/States/Default.Default()
Get default values for a new state · Call operation Default
#
Ask an LLM
“What default values does the admin pre-fill for a state before I create one?”
“Where do I get a blank state template?”
Tell an agent
Get the default state template.
Show me the pre-filled defaults for a new state.
POST
/api/v1/admin/States/Default.archive
Archive states with the archive action · Call operation archive
#
Ask an LLM
“Can I archive several states at once with the OData archive action?”
“Is there a POST action that archives a batch of states by ID?”
Tell an agent destructive · confirm first
Archive states {ids} using the archive action.
Run the POST archive action on state IDs {ids}.
DELETE
/api/v1/admin/states/archive
Archive states through the archive route · States archive route
#
Ask an LLM
“Is there a DELETE-style route for archiving a list of states?”
“Which endpoint archives states when called with a DELETE request?”
Tell an agent destructive · confirm first
Archive states {ids} through the DELETE archive route.
Send a DELETE to the states archive route for IDs {ids}.
Ask an LLM
“How do I permanently delete several states in one request?”
“Can I bulk-remove states rather than archive them?”
Tell an agent destructive · confirm first
Bulk delete states {ids}.
Permanently remove the states with IDs {ids}.
GET
/api/v1/admin/states({key})/customproperties({custompropertyKey})
Get a custom property on a state · States get custom property by key and custompropertykey
#
Ask an LLM
“How can I read one custom property attached to a state?”
“Can I select only certain fields of a state's custom property?”
Tell an agent
Show custom property {custompropertyKey} on state {key}.
Fetch state {key}'s custom property {custompropertyKey}, selecting {select}.
GET
/api/v1/admin/states({key})/taxexemptions({taxexemptionKey})
Get a tax exemption linked to a state · States get tax exemption by key and taxexemptionkey
#
Ask an LLM
“Which tax exemption details apply to a particular state?”
“Can I look up one tax exemption record under a state?”
Tell an agent
Show tax exemption {taxexemptionKey} for state {key}.
Fetch state {key}'s tax exemption {taxexemptionKey} with {expand} expanded.
GET
/api/v1/admin/states({key})/websites({websiteKey})
Get a website linked to a state · States get website by key and websitekey
#
Ask an LLM
“Which website is a state assigned to, looked up by both keys?”
“Can I fetch one website record through its state?”
Tell an agent
Show website {websiteKey} linked to state {key}.
Fetch state {key}'s website {websiteKey}, selecting {select}.