Optimizely Gift Cards API
The Gift Cards API from Optimizely — 9 operation(s) for gift cards.
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 gift cards have been issued in Optimizely Commerce?”
“Can I filter gift cards to only active ones that haven't expired?”
Tell an agent
List all gift cards.
Show gift cards matching {filter}.
Ask an LLM
“What details are required to issue a gift card to someone?”
“Can I set an amount and expiry date when creating a gift card?”
Tell an agent
Issue gift card {giftCardNumber} with PIN {pin} to {firstName} {lastName} at {email}.
Create a {giftCardType} gift card worth {amount} expiring {expiresOn}.
GET
/api/v1/admin/GiftCards({id})
Get one gift card · Returns the entity with the key from GiftCards
#
Ask an LLM
“What is the balance and expiry of a specific gift card?”
“Can I pull up one gift card record by its id?”
Tell an agent
Fetch gift card {id}.
Show the amount and recipient of gift card {id}.
PUT
/api/v1/admin/GiftCards({id})
Replace a gift card record · Replace entity in EntitySet GiftCards
#
Ask an LLM
“Can I overwrite a whole gift card record at once?”
“Does replacing a gift card require resending its number, PIN and recipient?”
Tell an agent
Replace gift card {id} with number {giftCardNumber} and PIN {pin}.
Overwrite the full record of gift card {id}.
Ask an LLM
“How do I remove a single gift card record?”
“Can deleting a gift card be conditional on its ETag?”
Tell an agent destructive · confirm first
Delete gift card {id}.
Delete gift card {id} only if its ETag is {etag}.
PATCH
/api/v1/admin/GiftCards({id})
Update part of a gift card · Update entity in EntitySet GiftCards
#
Ask an LLM
“Can I deactivate a gift card without deleting it?”
“Is it possible to extend just the expiry date of a gift card?”
Tell an agent
Set gift card {id} active flag to {isActive}.
Extend gift card {id} to expire on {expiresOn}.
GET
/api/v1/admin/GiftCards/Default.Default()
Get default values for a new gift card · Call operation Default
#
Ask an LLM
“What defaults does a new gift card record start with?”
“Is there a blank gift card template to fill in?”
Tell an agent
Get the default field values for a new gift card.
Show the empty gift card template.
POST
/api/v1/admin/GiftCards/Default.archive
Archive gift cards via the OData archive action · Call operation archive
#
Ask an LLM
“Can I retire gift cards with the OData Default.archive action?”
“What does calling the gift card archive action do to the cards I pass?”
Tell an agent destructive · confirm first
Run the OData archive action on gift cards {ids}.
Archive gift cards {ids} with Default.archive.
DELETE
/api/v1/admin/giftcards/archive
Archive gift cards through the archive route · Gift cards archive route
#
Ask an LLM
“Is there a REST route for archiving a batch of gift cards?”
“What does a DELETE on giftcards/archive do?”
Tell an agent destructive · confirm first
Archive gift cards {ids} using the giftcards/archive route.
Send the batch archive request for gift cards {ids}.
DELETE
/api/v1/admin/giftcards/delete
Permanently delete several gift cards · Gift cards delete route
#
Ask an LLM
“Can I bulk delete a list of gift cards?”
“Is there a way to permanently remove many gift cards in one request?”
Tell an agent destructive · confirm first
Bulk delete gift cards {ids}.
Permanently delete every gift card in {ids}.
GET
/api/v1/admin/giftcards({key})/customerorders({customerorderKey})
Get an order a gift card was used on · Gift cards get customer order by key and customerorderkey
#
Ask an LLM
“Which customer orders has a gift card been applied to?”
“Can I read one order linked to a gift card?”
Tell an agent
Get order {customerorderKey} linked to gift card {key}.
Show customer order {customerorderKey} that used gift card {key}.
GET
/api/v1/admin/giftcards({key})/customproperties({custompropertyKey})
Get a custom property on a gift card · Gift cards get custom property by key and custompropertykey
#
Ask an LLM
“How can I read a custom property stored on a gift card?”
“Can I fetch one custom field value from a gift card record?”
Tell an agent
Get custom property {custompropertyKey} of gift card {key}.
Show the {custompropertyKey} custom property on gift card {key}.
GET
/api/v1/admin/giftcards({key})/giftcardtransactions({giftcardtransactionKey})
Get a transaction on a gift card · Gift cards get gift card transaction by key and giftcardtransactionkey
#
Ask an LLM
“Where can I see a redemption or top-up transaction on a gift card?”
“Can I look up one gift card transaction by key?”
Tell an agent
Get transaction {giftcardtransactionKey} of gift card {key}.
Show gift card transaction {giftcardtransactionKey} for card {key}.