Optimizely Promotion Results API
The Promotion Results API from Optimizely — 12 operation(s) for promotion results.
Operations 16
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
GET
/api/v1/admin/PromotionResults
List promotion results · Returns the EntitySet PromotionResults
#
Ask an LLM
“What discounts and rewards are configured across promotions?”
“Can I filter promotion results by result type?”
Tell an agent
List all promotion results.
Show promotion results matching {filter}.
POST
/api/v1/admin/PromotionResults
Create a promotion result · Post a new entity to EntitySet PromotionResults
#
Ask an LLM
“How do I add a percentage discount reward to a promotion?”
“Can a promotion result give free shipping via a specific ship via?”
Tell an agent
Create a {promotionResultType} result for promotion {promotionId}.
Add a {promotionResultType} result worth {amount} to promotion {promotionId}.
GET
/api/v1/admin/PromotionResults({id})
Get a promotion result · Returns the entity with the key from PromotionResults
#
Ask an LLM
“What reward does a particular promotion result grant?”
“Can I look up one promotion result by its ID?”
Tell an agent
Get promotion result {id}.
Show the amount and type of promotion result {id}.
PUT
/api/v1/admin/PromotionResults({id})
Replace a promotion result entirely · Replace entity in EntitySet PromotionResults
#
Ask an LLM
“How do I overwrite every field of a promotion result?”
“Can I fully replace a promotion result record?”
Tell an agent
Replace promotion result {id} with type {promotionResultType}.
Overwrite all fields of promotion result {id}, setting amount {amount} and type {promotionResultType}.
DELETE
/api/v1/admin/PromotionResults({id})
Delete a promotion result · Delete entity in EntitySet PromotionResults
#
Ask an LLM
“How do I remove a single reward from a promotion?”
“Is a promotion result deletion guarded by an If-Match check?”
Tell an agent destructive · confirm first
Delete promotion result {id}.
Remove promotion result {id} if its ETag is {ifMatch}.
PATCH
/api/v1/admin/PromotionResults({id})
Update some fields of a promotion result · Update entity in EntitySet PromotionResults
#
Ask an LLM
“How do I change just the discount amount on a promotion result?”
“Can I toggle whether a promotion result is visible?”
Tell an agent
Change the amount on promotion result {id} to {amount}, keeping type {promotionResultType}.
Set visible to {visible} on promotion result {id} of type {promotionResultType}.
GET
/api/v1/admin/PromotionResults/Default.Default()
Get default values for a new promotion result · Call operation Default
#
Ask an LLM
“What defaults does a new promotion result start with?”
“Is there a blank promotion result template?”
Tell an agent
Get the default field values for a new promotion result.
Show a blank promotion result record.
POST
/api/v1/admin/PromotionResults({id})/Default.import
Import products into a promotion result · Call operation import
#
Ask an LLM
“How do I import a product list into a promotion result using the OData import action?”
“Can I bulk load qualifying products onto a promotion result?”
Tell an agent
Run the import action for promotion result {id}.
Import products into promotion result {id} via the Default.import action.
POST
/api/v1/admin/PromotionResults/Default.createtemporary
Create a temporary copy of a promotion result · Call operation createtemporary
#
Ask an LLM
“How do I make a temporary working copy of an existing promotion result?”
“Can I stage edits to a promotion result in a temporary record first?”
Tell an agent
Create a temporary copy of promotion result {existingPromotionResultId}.
Start a temporary draft from promotion result {existingPromotionResultId}.
POST
/api/v1/admin/PromotionResults/Default.copyfromtemporary
Copy a temporary promotion result onto the real one · Call operation copyfromtemporary
#
Ask an LLM
“How do I apply staged temporary changes back to the original promotion result?”
“Can I copy a temporary promotion result over its target?”
Tell an agent
Copy temporary promotion result {tempPromotionResultId} onto {targetPromotionResultId}.
Save temp result {tempPromotionResultId} back to promotion result {targetPromotionResultId}.
POST
/api/v1/admin/promotionresults/createtemporary
Create a temporary promotion result (route) · Promotion results create temporary async 2
#
Ask an LLM
“Is there a plain route version of createtemporary for promotion results?”
“Can I call createtemporary on promotion results without the OData action path?”
Tell an agent
Call the promotionresults/createtemporary route.
Create a temporary promotion result using the non-OData route.
POST
/api/v1/admin/promotionresults/copyfromtemporary
Copy from temporary promotion result (route) · Promotion results copy from temporary 2
#
Ask an LLM
“Is there a plain route version of copyfromtemporary for promotion results?”
“Can I run copyfromtemporary without the OData Default action?”
Tell an agent
Call the promotionresults/copyfromtemporary route.
Copy from the temporary promotion result using the non-OData route.
POST
/api/v1/admin/promotionresults({key})/import
Import products into a promotion result (route) · Promotion results import products async by key
#
Ask an LLM
“Is there a plain route for importing products into a promotion result by key?”
“Can I trigger the product import on a promotion result without the OData action?”
Tell an agent
Import products into promotion result {key} using the import route.
Call the promotionresults import route for {key}.
DELETE
/api/v1/admin/promotionresults/delete
Delete several promotion results · Promotion results delete route
#
Ask an LLM
“How do I bulk delete a list of promotion results?”
“Can I remove multiple promotion results in one request?”
Tell an agent destructive · confirm first
Bulk delete promotion results {ids}.
Permanently delete every promotion result in {ids}.
GET
/api/v1/admin/promotionresults({key})/customproperties({custompropertyKey})
Get a custom property on a promotion result · Promotion results get custom property by key and custompropertykey
#
Ask an LLM
“How do I read a custom property on a promotion result?”
“Can I fetch one custom field value from a promotion result?”
Tell an agent
Get custom property {custompropertyKey} of promotion result {key}.
Show the {custompropertyKey} custom property on promotion result {key}.
GET
/api/v1/admin/promotionresults({key})/products({productKey})
Get a product attached to a promotion result · Promotion results get product by key and productkey
#
Ask an LLM
“Which product details are linked to a promotion result?”
“Can I check whether a specific product belongs to a promotion result?”
Tell an agent
Get product {productKey} on promotion result {key}.
Show linked product {productKey} for promotion result {key}.