Optimizely Customer Orders API
The Customer Orders API from Optimizely — 14 operation(s) for customer orders.
Operations 18
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 customer orders are in the commerce admin right now?”
“Can I filter and sort the full list of customer orders, say by order date?”
Tell an agent
List all customer orders.
Show the first {top} customer orders sorted by {orderby}.
POST
/api/v1/admin/CustomerOrders
Create a customer order · Post a new entity to EntitySet CustomerOrders
#
Ask an LLM
“How do I create a new customer order through the admin API?”
“What fields are required when adding an order, like PO number and terms code?”
Tell an agent
Create customer order {orderNumber} with customer PO {customerPO} and status {status}.
Add a new order for customer {customerId} with ship code {shipCode}.
GET
/api/v1/admin/CustomerOrders({id})
Get a customer order · Returns the entity with the key from CustomerOrders
#
Ask an LLM
“Can I pull up one customer order by its ID?”
“What does a single customer order record contain?”
Tell an agent
Show customer order {id}.
Get order {id} with its related entities expanded: {expand}.
PUT
/api/v1/admin/CustomerOrders({id})
Replace a customer order · Replace entity in EntitySet CustomerOrders
#
Ask an LLM
“How do I overwrite an entire customer order record with new values?”
“Does replacing an order require resending every required field?”
Tell an agent
Replace customer order {id} with a full record using order number {orderNumber}.
Overwrite all fields of order {id}, setting status to {status}.
DELETE
/api/v1/admin/CustomerOrders({id})
Delete a customer order · Delete entity in EntitySet CustomerOrders
#
Ask an LLM
“How do I remove a single customer order by ID?”
“Can I make an order delete conditional on an ETag?”
Tell an agent destructive · confirm first
Delete customer order {id}.
Delete order {id} only if its ETag still matches {etag}.
PATCH
/api/v1/admin/CustomerOrders({id})
Update fields on a customer order · Update entity in EntitySet CustomerOrders
#
Ask an LLM
“Can I change just the notes or status on an existing customer order?”
“How do I partially update an order without replacing it?”
Tell an agent
Change the status of customer order {id} to {status}.
Update the notes on order {id} to {notes}.
GET
/api/v1/admin/CustomerOrders/Default.Default()
Get default values for a new customer order · Call operation Default
#
Ask an LLM
“What default values does a brand-new customer order start with?”
“Is there a blank customer order template I can use before creating one?”
Tell an agent
Get the default customer order template.
Show the prefilled defaults for a new customer order.
GET
/api/v1/admin/CustomerOrders({id})/Default.Totals()
Calculate totals for a customer order · Call operation Totals
#
Ask an LLM
“Can I get the calculated totals for a customer order via the OData Totals function?”
“What does the Totals operation return for an order?”
Tell an agent
Calculate totals for customer order {id} using the OData Totals function.
Run the Default.Totals function on order {id}.
GET
/api/v1/admin/customerorders({key})/totals
Get customer order totals by key route · Customer orders totals by key
#
Ask an LLM
“Is there a plain route for fetching an order's totals by its key?”
“Where can I read subtotal and tax totals for one order without the OData function syntax?”
Tell an agent
Get the totals for customer order {key} from the totals route.
Fetch order totals via the /totals path for order {key}.
DELETE
/api/v1/admin/customerorders/delete
Bulk delete customer orders · Customer orders delete route
#
Ask an LLM
“Can I delete several customer orders at once by listing their IDs?”
“How do I bulk remove old orders in one call?”
Tell an agent destructive · confirm first
Delete customer orders {ids} in bulk.
Bulk remove the orders with IDs {ids}.
GET
/api/v1/admin/customerorders({key})/creditcardtransactions({creditcardtransactionKey})
Get a credit card transaction on an order · Customer orders get credit card transaction by key and creditcardtransactionkey
#
Ask an LLM
“Can I look up a specific credit card transaction recorded against an order?”
“Where do I see the card payment details for one order?”
Tell an agent
Show credit card transaction {transaction} on order {key}.
Get card transaction {transaction} for customer order {key}.
GET
/api/v1/admin/customerorders({key})/customerorderpromotions({customerorderpromotionKey})
Get a promotion applied to an order · Customer orders get customer order promotion by key and…
#
Ask an LLM
“Which promotion was applied to a given customer order?”
“Can I see the details of one applied promotion on an order?”
Tell an agent
Show applied promotion {promotion} on customer order {key}.
Get order promotion record {promotion} for order {key}.
GET
/api/v1/admin/customerorders({key})/customerordertaxes({customerordertaxKey})
Get a tax line on an order · Customer orders get customer order tax by key and customerordertaxkey
#
Ask an LLM
“Can I inspect one tax line charged on a customer order?”
“What tax was applied to an order under a particular tax record?”
Tell an agent
Show tax line {tax} on customer order {key}.
Get order tax record {tax} for order {key}.
GET
/api/v1/admin/customerorders({key})/customproperties({custompropertyKey})
Get a custom property on an order · Customer orders get custom property by key and custompropertykey
#
Ask an LLM
“Can I read a custom property stored on a customer order?”
“Where are extra custom fields for an order kept?”
Tell an agent
Show custom property {property} on customer order {key}.
Get order {key}'s custom field {property}.
GET
/api/v1/admin/customerorders({key})/giftcards({giftcardKey})
Get a gift card used on an order · Customer orders get gift card by key and giftcardkey
#
Ask an LLM
“Which gift card was redeemed on a customer order?”
“Can I view one gift card applied to an order?”
Tell an agent
Show gift card {giftcard} used on customer order {key}.
Get gift card {giftcard} for order {key}.
GET
/api/v1/admin/customerorders({key})/orderlines({orderlineKey})
Get a line item on an order · Customer orders get order line by key and orderlinekey
#
Ask an LLM
“Can I fetch a single order line from a customer order?”
“What product and quantity is on a specific line of an order?”
Tell an agent
Show order line {line} on customer order {key}.
Get line item {line} of order {key}.
GET
/api/v1/admin/customerorders({key})/orderpromotioncodes({orderpromotioncodeKey})
Get a promo code entered on an order · Customer orders get order promotion code by key and orderpromotioncodekey
#
Ask an LLM
“Which promo code did the buyer enter on a customer order?”
“Can I look up one promotion code record attached to an order?”
Tell an agent
Show promo code entry {code} on customer order {key}.
Get the entered promotion code {code} for order {key}.
GET
/api/v1/admin/customerorders({key})/subscriptions({subscriptionKey})
Get a subscription tied to an order · Customer orders get subscription by key and subscriptionkey
#
Ask an LLM
“Can I see a subscription that was created from a customer order?”
“What subscription details are linked to an order?”
Tell an agent
Show subscription {subscription} on customer order {key}.
Get subscription {subscription} linked to order {key}.