Optimizely Order Histories API
The Order Histories API from Optimizely — 8 operation(s) for order histories.
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
“How do I pull the order history synced from our ERP into the commerce admin?”
“Can I filter past orders by customer number or status?”
Tell an agent
List all order history records.
List order histories matching {filter}, newest first by {orderby}.
POST
/api/v1/admin/OrderHistories
Add a historical order record · Post a new entity to EntitySet OrderHistories
#
Ask an LLM
“How do I load an order from our ERP into the order history?”
“What bill-to and ship-to fields does a new order history record need?”
Tell an agent
Create an order history for ERP order {erpOrderNumber} for customer {customerNumber} with status {status}.
Add web order {webOrderNumber} with PO {customerPO} to order history.
GET
/api/v1/admin/OrderHistories({id})
Get one historical order · Returns the entity with the key from OrderHistories
#
Ask an LLM
“How do I see the totals and addresses on one past order?”
“Can I expand the lines of a single order history record?”
Tell an agent
Get order history {id}.
Show order history {id} with {expand} expanded.
PUT
/api/v1/admin/OrderHistories({id})
Replace a historical order record · Replace entity in EntitySet OrderHistories
#
Ask an LLM
“How do I overwrite a whole order history record with fresh ERP data?”
“Is there a way to fully replace a past order rather than patch it?”
Tell an agent
Replace order history {id} with the full record for ERP order {erpOrderNumber}.
Overwrite past order {id} entirely, with order total {orderTotal}.
DELETE
/api/v1/admin/OrderHistories({id})
Delete a historical order · Delete entity in EntitySet OrderHistories
#
Ask an LLM
“How do I remove one order from the order history?”
“Can I delete a past order only if nobody changed it since I read it?”
Tell an agent destructive · confirm first
Delete order history {id}.
Remove past order {id} if its ETag is still {etag}.
PATCH
/api/v1/admin/OrderHistories({id})
Update fields on a historical order · Update entity in EntitySet OrderHistories
#
Ask an LLM
“How do I change the status of a past order in order history?”
“Can I update just the notes on an order history record?”
Tell an agent
Set the status of order history {id} to {status}.
Update the notes on past order {id} to {notes}.
GET
/api/v1/admin/OrderHistories/Default.Default()
Get a blank order history template · Call operation Default
#
Ask an LLM
“What default values does a new order history record start with?”
“Can I fetch an empty order history template before loading orders?”
Tell an agent
Fetch the default order history template.
Show me the starting values for a new order history record.
DELETE
/api/v1/admin/orderhistories/delete
Bulk delete historical orders · Order histories delete route
#
Ask an LLM
“How do I delete several past orders at once?”
“Can I purge a batch of order history records by ID?”
Tell an agent destructive · confirm first
Bulk delete the order histories with IDs {ids}.
Remove these past orders in one call: {ids}.
GET
/api/v1/admin/orderhistories({key})/customproperties({custompropertyKey})
Get a custom property on a historical order · Order histories get custom property by key and custompropertykey
#
Ask an LLM
“How do I read a custom property stored on a past order?”
“Can I fetch one extra field value from an order history record?”
Tell an agent
Get custom property {custompropertyKey} on order history {key}.
Show the custom property {custompropertyKey} of past order {key}.
GET
/api/v1/admin/orderhistories({key})/orderhistorylines({orderhistorylineKey})
Get a line item on a historical order · Order histories get order history line by key and orderhistorylinekey
#
Ask an LLM
“How do I see a single product line from a past order?”
“Can I read one order history line by its key?”
Tell an agent
Get line {orderhistorylineKey} of order history {key}.
Show product line {orderhistorylineKey} on past order {key}.
GET
/api/v1/admin/orderhistories({key})/orderhistorypromotions({orderhistorypromotionKey})
Get a promotion applied to a historical order · Order histories get order history promotion by key and orderhistorypromotionkey
#
Ask an LLM
“Which promotion was applied to a past order?”
“Can I read one order history promotion record by its key?”
Tell an agent
Get promotion {orderhistorypromotionKey} on order history {key}.
Show the promotion {orderhistorypromotionKey} applied to past order {key}.
GET
/api/v1/admin/orderhistories({key})/orderhistorytaxes({orderhistorytaxKey})
Get a tax entry on a historical order · Order histories get order history tax by key and orderhistorytaxkey
#
Ask an LLM
“How do I see the tax breakdown entry for a past order?”
“Can I read one order history tax record by its key?”
Tell an agent
Get tax entry {orderhistorytaxKey} on order history {key}.
Show tax line {orderhistorytaxKey} for past order {key}.