Squarespace · OpenAPI Overlay 1.0.0

API Evangelist conversational phrasing for Commerce Discounts API

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

What the actions change

x-apievangelist-phrasing

Targets 7

$.info
$.paths['/v1/commerce/discounts'].get
$.paths['/v1/commerce/discounts'].post
$.paths['/v1/commerce/discounts/{discountId}'].get
$.paths['/v1/commerce/discounts/{discountId}'].put
$.paths['/v1/commerce/discounts/{discountId}'].delete
$.paths['/v1/fulfillments/fulfillment-options'].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 Commerce Discounts API
  version: 1.0.0
extends: openapi/squarespace-discounts-api-openapi.yml
actions:
- target: $.info
  update:
    x-apievangelist-phrasing:
      method: generated
      generated: '2026-10-01'
      generator: build-phrasing.py
      label: Generated by API Evangelist
      operations: 6
- target: $.paths['/v1/commerce/discounts'].get
  update:
    x-apievangelist-phrasing:
      intent: List and filter discounts
      effect: read
      questions:
      - Which discounts are currently active on my store?
      - Can I list only promo-code discounts and leave out the auto-applied ones?
      - How do I find discounts that have limited uses?
      instructions:
      - text: List my discounts with status {status}.
        slots:
          status: query.status
      - text: Search discounts by name or promo code for {search}.
        slots:
          search: query.search
      - text: List discounts triggered by {trigger}, {limit} per page.
        slots:
          trigger: query.trigger
          limit: query.limit
      method: generated
      generated: '2026-10-01'
- target: $.paths['/v1/commerce/discounts'].post
  update:
    x-apievangelist-phrasing:
      intent: Create a discount or promo code
      effect: write
      questions:
      - How do I set up a new promo code for my Squarespace store?
      - Can I create a discount that each customer can only use once?
      - What's required to make a discount that expires on a set date?
      instructions:
      - text: Create discount {name} using template {template}, criteria {criteria}, trigger {trigger}, starting {validFrom}.
        slots:
          name: requestBody.name
          template: requestBody.template
          criteria: requestBody.criteria
          trigger: requestBody.trigger
          validFrom: requestBody.validFrom
      - text: Create a once-per-customer discount {name} ({template}, {criteria}, {trigger}) valid from {validFrom} to {validTo}.
        slots:
          name: requestBody.name
          template: requestBody.template
          criteria: requestBody.criteria
          trigger: requestBody.trigger
          validFrom: requestBody.validFrom
          validTo: requestBody.validTo
      method: generated
      generated: '2026-10-01'
- target: $.paths['/v1/commerce/discounts/{discountId}'].get
  update:
    x-apievangelist-phrasing:
      intent: Get one discount's details
      effect: read
      questions:
      - How do I look up the settings of a single discount by its ID?
      - When does a specific discount start and expire?
      instructions:
      - text: Get discount {discountId}.
        slots:
          discountId: path.discountId
      - text: Show me how discount {discountId} is configured.
        slots:
          discountId: path.discountId
      method: generated
      generated: '2026-10-01'
- target: $.paths['/v1/commerce/discounts/{discountId}'].put
  update:
    x-apievangelist-phrasing:
      intent: Replace an existing discount's settings
      effect: write
      questions:
      - How do I extend the expiry date on a discount I already created?
      - Can I cap how many times an existing discount can be redeemed site-wide?
      instructions:
      - text: Update discount {discountId} so it is named {name} with template {template}, criteria {criteria}, trigger {trigger}, from {validFrom}.
        slots:
          discountId: path.discountId
          name: requestBody.name
          template: requestBody.template
          criteria: requestBody.criteria
          trigger: requestBody.trigger
          validFrom: requestBody.validFrom
      - text: Change existing discount {discountId} to allow at most {maxUsesAllowed} uses.
        slots:
          discountId: path.discountId
          maxUsesAllowed: requestBody.maxUsesAllowed
      method: generated
      generated: '2026-10-01'
- target: $.paths['/v1/commerce/discounts/{discountId}'].delete
  update:
    x-apievangelist-phrasing:
      intent: Delete a discount
      effect: destructive
      questions:
      - How do I get rid of a discount I no longer want?
      - Can I delete a discount even if its type isn't supported by this API version?
      instructions:
      - text: Delete discount {discountId}.
        slots:
          discountId: path.discountId
      - text: Remove the discount {discountId} from my store.
        slots:
          discountId: path.discountId
      method: generated
      generated: '2026-10-01'
- target: $.paths['/v1/fulfillments/fulfillment-options'].get
  update:
    x-apievangelist-phrasing:
      intent: List fulfillment options usable with discounts
      effect: read
      questions:
      - Which shipping options and carrier services can a discount apply to?
      - What fulfillment option IDs do I need for a free-shipping discount?
      instructions:
      - text: List the fulfillment options and carrier services available for discounts.
      - text: Get fulfillment option IDs for discounts, sending user agent {user_agent}.
        slots:
          user_agent: header.User-Agent
      method: generated
      generated: '2026-10-01'