Optimizely · OpenAPI Overlay 1.0.0

API Evangelist conversational phrasing for Admin API V1 Customer Order Promotions API

10 actions 10 updates phrasing extends openapi/optimizely-customer-order-promotions-api-openapi.yml
Generated by API Evangelist Written by API Evangelist tooling for Optimizely's API. It is a proposal applied on top of the contract, not a document Optimizely publishes.
View Overlay File View on GitHub Overlay Specification

What the actions change

x-apievangelist-phrasing

Targets 10

$.info
$.paths['/api/v1/admin/CustomerOrderPromotions'].get
$.paths['/api/v1/admin/CustomerOrderPromotions'].post
$.paths['/api/v1/admin/CustomerOrderPromotions({id})'].get
$.paths['/api/v1/admin/CustomerOrderPromotions({id})'].put
$.paths['/api/v1/admin/CustomerOrderPromotions({id})'].delete
$.paths['/api/v1/admin/CustomerOrderPromotions({id})'].patch
$.paths['/api/v1/admin/CustomerOrderPromotions/Default.Default()'].get
$.paths['/api/v1/admin/customerorderpromotions/delete'].delete
$.paths['/api/v1/admin/customerorderpromotions({key})/customproperties({custompropertyKey})'].get

OpenAPI Overlay

Raw ↑
# Generated by API Evangelist (build-phrasing.py). Our phrasing, not observed demand.
overlay: 1.0.0
info:
  title: API Evangelist conversational phrasing for Admin API V1 Customer Order Promotions API
  version: 1.0.0
extends: openapi/optimizely-customer-order-promotions-api-openapi.yml
actions:
- target: $.info
  update:
    x-apievangelist-phrasing:
      method: generated
      generated: '2026-09-26'
      generator: build-phrasing.py
      label: Generated by API Evangelist
      operations: 9
- target: $.paths['/api/v1/admin/CustomerOrderPromotions'].get
  update:
    x-apievangelist-phrasing:
      intent: List promotions applied to orders
      effect: read
      questions:
      - Which promotions have been applied to customer orders?
      - Can I filter applied promotions down to one order with OData?
      instructions:
      - text: List all promotions applied to customer orders.
      - text: List order promotions matching {filter}.
        slots:
          filter: query.$filter
      method: generated
      generated: '2026-09-26'
- target: $.paths['/api/v1/admin/CustomerOrderPromotions'].post
  update:
    x-apievangelist-phrasing:
      intent: Apply a promotion to an order
      effect: write
      questions:
      - How do I record a promotion against a customer order?
      - Can a promotion be applied to a single order line with a discount amount?
      instructions:
      - text: Apply promotion {promotionId} to order {customerOrderId}.
        slots:
          promotionId: requestBody.promotionId
          customerOrderId: requestBody.customerOrderId
      - text: Apply promotion {promotionId} worth {amount} to order line {orderLineId}.
        slots:
          promotionId: requestBody.promotionId
          amount: requestBody.amount
          orderLineId: requestBody.orderLineId
      method: generated
      generated: '2026-09-26'
- target: $.paths['/api/v1/admin/CustomerOrderPromotions({id})'].get
  update:
    x-apievangelist-phrasing:
      intent: Get an applied order promotion
      effect: read
      questions:
      - What discount amount did a particular order promotion record give?
      - Can I look up one applied promotion by its id?
      instructions:
      - text: Get order promotion {id}.
        slots:
          id: path.id
      - text: Fetch applied promotion record {id} expanding {expand}.
        slots:
          id: path.id
          expand: query.$expand
      method: generated
      generated: '2026-09-26'
- target: $.paths['/api/v1/admin/CustomerOrderPromotions({id})'].put
  update:
    x-apievangelist-phrasing:
      intent: Replace an applied order promotion
      effect: write
      questions:
      - How do I overwrite an order promotion record in full?
      - Can I resend order, promotion and amount to replace an applied promotion?
      instructions:
      - text: Replace order promotion {id} with promotion {promotionId} on order {customerOrderId}.
        slots:
          id: path.id
          promotionId: requestBody.promotionId
          customerOrderId: requestBody.customerOrderId
      - text: Overwrite the whole applied-promotion record {id} with amount {amount}.
        slots:
          id: path.id
          amount: requestBody.amount
      method: generated
      generated: '2026-09-26'
- target: $.paths['/api/v1/admin/CustomerOrderPromotions({id})'].delete
  update:
    x-apievangelist-phrasing:
      intent: Remove a promotion from an order
      effect: destructive
      questions:
      - How do I take a promotion off a customer order?
      - Can removing an order promotion be tied to an If-Match ETag?
      instructions:
      - text: Delete order promotion {id}.
        slots:
          id: path.id
      - text: Remove applied promotion {id} only if its ETag is {etag}.
        slots:
          id: path.id
          etag: header.If-Match
      method: generated
      generated: '2026-09-26'
- target: $.paths['/api/v1/admin/CustomerOrderPromotions({id})'].patch
  update:
    x-apievangelist-phrasing:
      intent: Adjust an applied order promotion
      effect: write
      questions:
      - Can I change just the discount amount on an applied promotion?
      - How do I move an applied promotion to a different order line?
      instructions:
      - text: Set the amount of order promotion {id} to {amount}.
        slots:
          id: path.id
          amount: requestBody.amount
      - text: Point order promotion {id} at order line {orderLineId}.
        slots:
          id: path.id
          orderLineId: requestBody.orderLineId
      method: generated
      generated: '2026-09-26'
- target: $.paths['/api/v1/admin/CustomerOrderPromotions/Default.Default()'].get
  update:
    x-apievangelist-phrasing:
      intent: Get default values for a new order promotion
      effect: read
      questions:
      - What defaults does a new order promotion record start with?
      - Is there a blank applied-promotion template?
      instructions:
      - text: Get the default template for an order promotion.
      - text: Fetch an empty customer order promotion with default values.
      method: generated
      generated: '2026-09-26'
- target: $.paths['/api/v1/admin/customerorderpromotions/delete'].delete
  update:
    x-apievangelist-phrasing:
      intent: Bulk delete order promotions
      effect: destructive
      questions:
      - Can I remove many applied promotions in one request?
      - How do I bulk-delete order promotion records by id?
      instructions:
      - text: Bulk delete order promotions {ids}.
        slots:
          ids: query.ids
      - text: Permanently remove every applied promotion in {ids}.
        slots:
          ids: query.ids
      method: generated
      generated: '2026-09-26'
- target: $.paths['/api/v1/admin/customerorderpromotions({key})/customproperties({custompropertyKey})'].get
  update:
    x-apievangelist-phrasing:
      intent: Get a custom property on an order promotion
      effect: read
      questions:
      - What custom property values are stored on an applied order promotion?
      - Can I read one custom attribute of an order promotion?
      instructions:
      - text: Get custom property {custompropertyKey} on order promotion {key}.
        slots:
          key: path.key
          custompropertyKey: path.custompropertyKey
      - text: Read extra attribute {custompropertyKey} of applied promotion {key}.
        slots:
          key: path.key
          custompropertyKey: path.custompropertyKey
      method: generated
      generated: '2026-09-26'