Optimizely · OpenAPI Overlay 1.0.0

API Evangelist conversational phrasing for Optimizely Campaign REST Coupon blocks API

12 actions 12 updates phrasing extends openapi/optimizely-coupon-blocks-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 12

$.info
$.paths['/{clientId}/couponblocks'].get
$.paths['/{clientId}/couponblocks'].post
$.paths['/{clientId}/couponblocks/{couponBlockId}'].get
$.paths['/{clientId}/couponblocks/{couponBlockId}'].delete
$.paths['/{clientId}/couponblocks/{couponBlockId}/codes'].get
$.paths['/{clientId}/couponblocks/{couponBlockId}/codes'].post
$.paths['/{clientId}/couponblocks/{couponBlockId}/codes'].delete
$.paths['/{clientId}/couponblocks/{couponBlockId}/codes/{code}'].get
$.paths['/{clientId}/couponblocks/{couponBlockId}/codes/{code}'].post
$.paths['/{clientId}/couponblocks/{couponBlockId}/codes/{code}'].delete
$.paths['/{clientId}/couponblocks/{couponBlockId}/assignedmailings'].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 Optimizely Campaign REST Coupon blocks API
  version: 1.0.0
extends: openapi/optimizely-coupon-blocks-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: 11
- target: $.paths['/{clientId}/couponblocks'].get
  update:
    x-apievangelist-phrasing:
      intent: List coupon blocks
      effect: read
      questions:
      - Which coupon blocks exist in my email marketing account?
      - Can I list only the coupon blocks that use a particular coupon source?
      instructions:
      - text: List coupon blocks in client {clientId} with coupon source {couponSource}.
        slots:
          clientId: path.clientId
          couponSource: query.couponSource
      - text: Show up to {limit} {couponSource} coupon blocks for client {clientId}.
        slots:
          limit: query.limit
          couponSource: query.couponSource
          clientId: path.clientId
      method: generated
      generated: '2026-09-26'
- target: $.paths['/{clientId}/couponblocks'].post
  update:
    x-apievangelist-phrasing:
      intent: Create a coupon block
      effect: write
      questions:
      - How do I set up a new coupon block to hand out discount codes in mailings?
      - Can test mailings use real coupon codes from a new coupon block?
      instructions:
      - text: Create coupon block {name} with coupon source {couponSource} in client {clientId}.
        slots:
          name: requestBody.name
          couponSource: requestBody.couponSource
          clientId: path.clientId
      - text: Add a coupon block {name} in client {clientId} and set real codes for test mails to {useRealCodesForTestMails}.
        slots:
          name: requestBody.name
          clientId: path.clientId
          useRealCodesForTestMails: requestBody.useRealCodesForTestMails
      method: generated
      generated: '2026-09-26'
- target: $.paths['/{clientId}/couponblocks/{couponBlockId}'].get
  update:
    x-apievangelist-phrasing:
      intent: Get a coupon block
      effect: read
      questions:
      - What is the name and coupon source of a specific coupon block?
      - Does a given coupon block use valid codes for test mailings?
      instructions:
      - text: Get coupon block {couponBlockId} in client {clientId}.
        slots:
          couponBlockId: path.couponBlockId
          clientId: path.clientId
      - text: Show the settings of coupon block {couponBlockId} for client {clientId}.
        slots:
          couponBlockId: path.couponBlockId
          clientId: path.clientId
      method: generated
      generated: '2026-09-26'
- target: $.paths['/{clientId}/couponblocks/{couponBlockId}'].delete
  update:
    x-apievangelist-phrasing:
      intent: Delete a coupon block
      effect: destructive
      questions:
      - Can I remove a whole coupon block I no longer use?
      - What deletes an entire coupon block rather than its individual codes?
      instructions:
      - text: Delete coupon block {couponBlockId} in client {clientId}.
        slots:
          couponBlockId: path.couponBlockId
          clientId: path.clientId
      - text: Remove the entire coupon block {couponBlockId} from client {clientId}.
        slots:
          couponBlockId: path.couponBlockId
          clientId: path.clientId
      method: generated
      generated: '2026-09-26'
- target: $.paths['/{clientId}/couponblocks/{couponBlockId}/codes'].get
  update:
    x-apievangelist-phrasing:
      intent: List codes in a coupon block
      effect: read
      questions:
      - How many unassigned coupon codes are left in a coupon block?
      - Can I see which coupon codes went to a given mailing or recipient?
      instructions:
      - text: List coupon codes in block {couponBlockId} for client {clientId}.
        slots:
          couponBlockId: path.couponBlockId
          clientId: path.clientId
      - text: Show codes from block {couponBlockId} in client {clientId} assigned in mailing {mailingId}.
        slots:
          couponBlockId: path.couponBlockId
          clientId: path.clientId
          mailingId: query.mailingId
      - text: List the first {limit} codes of block {couponBlockId} in client {clientId} sorted by {sort} {direction}.
        slots:
          limit: query.limit
          couponBlockId: path.couponBlockId
          clientId: path.clientId
          sort: query.sort
          direction: query.direction
      method: generated
      generated: '2026-09-26'
- target: $.paths['/{clientId}/couponblocks/{couponBlockId}/codes'].post
  update:
    x-apievangelist-phrasing:
      intent: Add coupon codes to a block
      effect: write
      questions:
      - How do I upload a batch of discount codes into a coupon block?
      - Can I add a list of new coupon codes to an existing coupon block?
      instructions:
      - text: Add codes {codes} to coupon block {couponBlockId} in client {clientId}.
        slots:
          codes: requestBody.codes
          couponBlockId: path.couponBlockId
          clientId: path.clientId
      - text: 'Load these coupon codes into block {couponBlockId} for client {clientId}: {codes}.'
        slots:
          couponBlockId: path.couponBlockId
          clientId: path.clientId
          codes: requestBody.codes
      method: generated
      generated: '2026-09-26'
- target: $.paths['/{clientId}/couponblocks/{couponBlockId}/codes'].delete
  update:
    x-apievangelist-phrasing:
      intent: Delete several coupon codes from a block
      effect: destructive
      questions:
      - Can I delete a list of coupon codes from a coupon block in one request?
      - Which call removes many coupon codes at once while keeping the block?
      instructions:
      - text: Delete coupon codes {codes} from block {couponBlockId} in client {clientId}.
        slots:
          codes: query.codes
          couponBlockId: path.couponBlockId
          clientId: path.clientId
      - text: 'Remove this set of codes from coupon block {couponBlockId} in client {clientId}: {codes}.'
        slots:
          couponBlockId: path.couponBlockId
          clientId: path.clientId
          codes: query.codes
      method: generated
      generated: '2026-09-26'
- target: $.paths['/{clientId}/couponblocks/{couponBlockId}/codes/{code}'].get
  update:
    x-apievangelist-phrasing:
      intent: Get a single coupon code
      effect: read
      questions:
      - Which mailing and recipient was a specific coupon code assigned to?
      - Can I look up the details of one coupon code?
      instructions:
      - text: Get coupon code {code} from block {couponBlockId} in client {clientId}.
        slots:
          code: path.code
          couponBlockId: path.couponBlockId
          clientId: path.clientId
      - text: Show who received coupon code {code} in block {couponBlockId}, client {clientId}.
        slots:
          code: path.code
          couponBlockId: path.couponBlockId
          clientId: path.clientId
      method: generated
      generated: '2026-09-26'
- target: $.paths['/{clientId}/couponblocks/{couponBlockId}/codes/{code}'].post
  update:
    x-apievangelist-phrasing:
      intent: Mark a coupon code as used
      effect: destructive
      questions:
      - How do I invalidate a coupon code once a customer has redeemed it?
      - Can I flag a single coupon code as used so it is not handed out again?
      instructions:
      - text: Mark coupon code {code} in block {couponBlockId} as used for client {clientId}.
        slots:
          code: path.code
          couponBlockId: path.couponBlockId
          clientId: path.clientId
      - text: Invalidate redeemed code {code} in coupon block {couponBlockId}, client {clientId}.
        slots:
          code: path.code
          couponBlockId: path.couponBlockId
          clientId: path.clientId
      method: generated
      generated: '2026-09-26'
- target: $.paths['/{clientId}/couponblocks/{couponBlockId}/codes/{code}'].delete
  update:
    x-apievangelist-phrasing:
      intent: Delete a single coupon code
      effect: destructive
      questions:
      - Can I delete just one coupon code from a block?
      - What removes a single mistaken coupon code entirely?
      instructions:
      - text: Delete coupon code {code} from block {couponBlockId} in client {clientId}.
        slots:
          code: path.code
          couponBlockId: path.couponBlockId
          clientId: path.clientId
      - text: Remove only the code {code} from coupon block {couponBlockId}, client {clientId}.
        slots:
          code: path.code
          couponBlockId: path.couponBlockId
          clientId: path.clientId
      method: generated
      generated: '2026-09-26'
- target: $.paths['/{clientId}/couponblocks/{couponBlockId}/assignedmailings'].get
  update:
    x-apievangelist-phrasing:
      intent: List mailings using a coupon block
      effect: read
      questions:
      - Which mailings is a coupon block assigned to?
      - Is a coupon block still used by any mailing before I delete it?
      instructions:
      - text: List mailing IDs that use coupon block {couponBlockId} in client {clientId}.
        slots:
          couponBlockId: path.couponBlockId
          clientId: path.clientId
      - text: Show every mailing assigned to coupon block {couponBlockId} for client {clientId}.
        slots:
          couponBlockId: path.couponBlockId
          clientId: path.clientId
      method: generated
      generated: '2026-09-26'