Lightspeed Commerce · OpenAPI Overlay 1.0.0

API Evangelist conversational phrasing for 2026-07 Promotions API

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

What the actions change

x-apievangelist-phrasing

Targets 9

$.info
$.paths['/discount'].post
$.paths['/promotions'].get
$.paths['/promotions'].post
$.paths['/promotions/search'].get
$.paths['/promotions/{promotion_id}'].get
$.paths['/promotions/{promotion_id}'].put
$.paths['/promotions/{promotion_id}/products'].get
$.paths['/promotions/{promotion_id}/promocodes'].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 2026-07 Promotions API
  version: 1.0.0
extends: openapi/lightspeed-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: 8
- target: $.paths['/discount'].post
  update:
    x-apievangelist-phrasing:
      intent: Preview the best promotion for a sale
      effect: read
      questions:
      - Which promotion gives the best discount for this basket?
      - Can I test a promo code against a sale without changing anything on the server?
      instructions:
      - text: Work out the best discount for sale {sale} for customer {customer} at outlet {outlet} on channel {channel}.
        slots:
          sale: requestBody.sale
          customer: requestBody.customer
          outlet: requestBody.outlet_id
          channel: requestBody.channel
      - text: Check promo code {code} against sale {sale} at outlet {outlet} for customer {customer} via {channel}.
        slots:
          code: requestBody.promo_code
          sale: requestBody.sale
          outlet: requestBody.outlet_id
          customer: requestBody.customer
          channel: requestBody.channel
      method: generated
      generated: '2026-09-26'
- target: $.paths['/promotions'].get
  update:
    x-apievangelist-phrasing:
      intent: List promotions by end date
      effect: read
      questions:
      - What promotions are set up for my retail store?
      - Can I list only promotions that end after a certain date?
      instructions:
      - text: List all my promotions.
      - text: List promotions ending on or after {from}.
        slots:
          from: query.end_time_from
      - text: List promotions that end before {to}.
        slots:
          to: query.end_time_to
      method: generated
      generated: '2026-09-26'
- target: $.paths['/promotions'].post
  update:
    x-apievangelist-phrasing:
      intent: Create a promotion
      effect: write
      questions:
      - How do I set up a buy-one-get-one or percentage-off deal?
      - Can a promotion require a promo code and target certain customer groups?
      instructions:
      - text: Create promotion {name} starting {start} with condition {condition} and action {action}, promo codes {use_code}.
        slots:
          name: requestBody.name
          start: requestBody.start_time
          condition: requestBody.condition
          action: requestBody.action
          use_code: requestBody.use_promo_code
      - text: Set up promotion {name} from {start} to {end} for outlets {outlets}, condition {condition}, action {action}, promo code use {use_code}.
        slots:
          name: requestBody.name
          start: requestBody.start_time
          end: requestBody.end_time
          outlets: requestBody.outlet_ids
          condition: requestBody.condition
          action: requestBody.action
          use_code: requestBody.use_promo_code
      method: generated
      generated: '2026-09-26'
- target: $.paths['/promotions/search'].get
  update:
    x-apievangelist-phrasing:
      intent: Search promotions by name, outlet or dates
      effect: read
      questions:
      - Which promotions have 'summer' in their name?
      - Can I find promotions running at a specific outlet?
      instructions:
      - text: Search promotions whose name contains {name}.
        slots:
          name: query.name
      - text: Find promotions linked to outlet {outlet} starting after {start}.
        slots:
          outlet: query.outlet_id
          start: query.start_time
      method: generated
      generated: '2026-09-26'
- target: $.paths['/promotions/{promotion_id}'].get
  update:
    x-apievangelist-phrasing:
      intent: Get a promotion
      effect: read
      questions:
      - What are the conditions and discount of one specific promotion?
      - Can I see when a promotion starts and ends?
      instructions:
      - text: Get promotion {promotion}.
        slots:
          promotion: path.promotion_id
      - text: Show the rules of promotion {promotion}.
        slots:
          promotion: path.promotion_id
      method: generated
      generated: '2026-09-26'
- target: $.paths['/promotions/{promotion_id}'].put
  update:
    x-apievangelist-phrasing:
      intent: Update a promotion
      effect: write
      questions:
      - Can I change the end date of a running promotion?
      - Do I have to send every field when editing a promotion?
      instructions:
      - text: Update promotion {promotion} with name {name}, start {start}, condition {condition}, action {action}, promo code use {use_code}.
        slots:
          promotion: path.promotion_id
          name: requestBody.name
          start: requestBody.start_time
          condition: requestBody.condition
          action: requestBody.action
          use_code: requestBody.use_promo_code
      - text: Extend promotion {promotion} to end at {end}, resending all its fields.
        slots:
          promotion: path.promotion_id
          end: requestBody.end_time
      method: generated
      generated: '2026-09-26'
- target: $.paths['/promotions/{promotion_id}/products'].get
  update:
    x-apievangelist-phrasing:
      intent: List products a promotion applies to
      effect: read
      questions:
      - Which products are discounted by a promotion and at what price?
      - Can I search a promotion's products by product name?
      instructions:
      - text: List the products covered by promotion {promotion}.
        slots:
          promotion: path.promotion_id
      - text: Find products named {name} in promotion {promotion}.
        slots:
          name: query.name
          promotion: path.promotion_id
      method: generated
      generated: '2026-09-26'
- target: $.paths['/promotions/{promotion_id}/promocodes'].get
  update:
    x-apievangelist-phrasing:
      intent: List a promotion's promo codes
      effect: read
      questions:
      - What promo codes belong to a promotion?
      - Can I export the codes customers can enter for a deal?
      instructions:
      - text: List the promo codes for promotion {promotion}.
        slots:
          promotion: path.promotion_id
      - text: Show every code customers can use for promotion {promotion}.
        slots:
          promotion: path.promotion_id
      method: generated
      generated: '2026-09-26'