Optimizely Subscriptions API
The Subscriptions API from Optimizely — 9 operation(s) for subscriptions.
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 customers have recurring product subscriptions set up?”
“Can I filter subscriptions by customer or website?”
Tell an agent
List all subscriptions.
Show subscriptions matching {filter}.
POST
/api/v1/admin/Subscriptions
Create a recurring product subscription · Post a new entity to EntitySet Subscriptions
#
Ask an LLM
“How do I set up a monthly repeat order for a customer?”
“Can a subscription only ship in certain months of the year?”
Tell an agent
Create a subscription for customer {customerId} on product {productId} every {cyclePeriod}.
Set up a {cyclePeriod} subscription that runs {totalCycles} cycles starting {activateOn}.
GET
/api/v1/admin/Subscriptions({id})
Get a subscription · Returns the entity with the key from Subscriptions
#
Ask an LLM
“What cycle and ship-to does a given subscription use?”
“Can I look up one subscription by its ID?”
Tell an agent
Get subscription {id}.
Show the schedule for subscription {id}.
PUT
/api/v1/admin/Subscriptions({id})
Replace a subscription entirely · Replace entity in EntitySet Subscriptions
#
Ask an LLM
“How do I overwrite every field on a subscription record?”
“Can I fully replace a subscription's settings in one request?”
Tell an agent
Replace subscription {id} with cycle period {cyclePeriod}.
Overwrite all fields of subscription {id}, cycle {cyclePeriod}, {periodsPerCycle} periods per cycle.
DELETE
/api/v1/admin/Subscriptions({id})
Delete a subscription · Delete entity in EntitySet Subscriptions
#
Ask an LLM
“How do I permanently remove one subscription?”
“Does deleting a subscription support an If-Match concurrency check?”
Tell an agent destructive · confirm first
Delete subscription {id}.
Remove subscription {id} if its ETag is {ifMatch}.
PATCH
/api/v1/admin/Subscriptions({id})
Update some fields of a subscription · Update entity in EntitySet Subscriptions
#
Ask an LLM
“How do I change when a subscription deactivates?”
“Can I switch a subscription to a different ship-to without resending everything?”
Tell an agent
Set deactivate date {deactivateOn} on subscription {id}, cycle {cyclePeriod}.
Change ship-to on subscription {id} to {shipToId} keeping cycle {cyclePeriod}.
GET
/api/v1/admin/Subscriptions/Default.Default()
Get default values for a new subscription · Call operation Default
#
Ask an LLM
“What defaults does a new subscription start with?”
“Is there a blank subscription template to fill in?”
Tell an agent
Get the default field values for a new subscription.
Show a blank subscription record.
POST
/api/v1/admin/Subscriptions/Default.archive
Archive subscriptions via the archive action · Call operation archive
#
Ask an LLM
“How do I archive subscriptions using the POST archive action?”
“Can I archive several subscriptions without deleting them?”
Tell an agent
Archive subscriptions {ids} with the archive action.
Run the POST archive action on subscriptions {ids}.
DELETE
/api/v1/admin/subscriptions/archive
Archive subscriptions via the DELETE route · Subscriptions archive route
#
Ask an LLM
“Is there a DELETE archive endpoint for subscriptions?”
“Which route archives subscriptions using the DELETE method?”
Tell an agent destructive · confirm first
Archive subscriptions {ids} through the DELETE archive route.
Call DELETE subscriptions/archive for {ids}.
DELETE
/api/v1/admin/subscriptions/delete
Delete several subscriptions · Subscriptions delete route
#
Ask an LLM
“How do I bulk delete a list of subscriptions permanently?”
“Can I delete many subscriptions in one request?”
Tell an agent destructive · confirm first
Bulk delete subscriptions {ids}.
Permanently delete every subscription in {ids}.
GET
/api/v1/admin/subscriptions({key})/customerorders({customerorderKey})
Get an order generated by a subscription · Subscriptions get customer order by key and customerorderkey
#
Ask an LLM
“Which orders has a subscription generated?”
“Can I look up a specific order linked to a subscription?”
Tell an agent
Get order {customerorderKey} from subscription {key}.
Show customer order {customerorderKey} linked to subscription {key}.
GET
/api/v1/admin/subscriptions({key})/customproperties({custompropertyKey})
Get a custom property on a subscription · Subscriptions get custom property by key and custompropertykey
#
Ask an LLM
“How do I read a custom property on a subscription?”
“Can I fetch one custom field value from a subscription?”
Tell an agent
Get custom property {custompropertyKey} of subscription {key}.
Show the {custompropertyKey} custom property on subscription {key}.
GET
/api/v1/admin/subscriptions({key})/subscriptionlines({subscriptionlineKey})
Get a line item on a subscription · Subscriptions get subscription line by key and subscriptionlinekey
#
Ask an LLM
“What products and quantities are on a subscription's lines?”
“Can I look up one line of a subscription?”
Tell an agent
Get line {subscriptionlineKey} of subscription {key}.
Show subscription line {subscriptionlineKey} on subscription {key}.