Optimizely Promotions API

The Promotions API from Optimizely — 12 operation(s) for promotions.

Business capability
Discount & Promotion Management BC-440.30

Operations 16

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

GET /api/v1/admin/Promotions List promotions · Returns the EntitySet Promotions #
Ask an LLM
“Which promotions are set up in the commerce admin?”
“Can I filter the promotions list to only live ones?”
Tell an agent
List all promotions.
Find promotions matching {filter}.
POST /api/v1/admin/Promotions Create a promotion · Post a new entity to EntitySet Promotions #
Ask an LLM
“How do I set up a new promotion with a promo code?”
“What's required to add a promotion, like name, display message and code?”
Tell an agent
Create promotion {name} with promo code {promoCode} and message {displayMessage}.
Add a promotion {name} that activates on {activateOn}.
GET /api/v1/admin/Promotions({id}) Get a promotion · Returns the entity with the key from Promotions #
Ask an LLM
“Can I pull up one promotion's details by its ID?”
“What are the activation dates and code for a particular promotion?”
Tell an agent
Show promotion {id}.
Get promotion {id} with {expand} expanded.
PUT /api/v1/admin/Promotions({id}) Replace a promotion · Replace entity in EntitySet Promotions #
Ask an LLM
“How do I overwrite a promotion record completely?”
“Does a full replace of a promotion need the name, code and description again?”
Tell an agent
Replace promotion {id} with a full record named {name}.
Overwrite promotion {id} entirely using promo code {promoCode}.
DELETE /api/v1/admin/Promotions({id}) Delete a promotion · Delete entity in EntitySet Promotions #
Ask an LLM
“How do I permanently delete one promotion?”
“Can a promotion delete be guarded by an ETag check?”
Tell an agent destructive · confirm first
Delete promotion {id}.
Delete promotion {id} if its ETag is {etag}.
PATCH /api/v1/admin/Promotions({id}) Update fields on a promotion · Update entity in EntitySet Promotions #
Ask an LLM
“Can I change just the deactivation date of a promotion?”
“Is it possible to toggle a promotion live without resending everything?”
Tell an agent
Set promotion {id} to deactivate on {deactivateOn}.
Mark promotion {id} live status as {isLive}.
GET /api/v1/admin/Promotions/Default.Default() Get default values for a new promotion · Call operation Default #
Ask an LLM
“What defaults does a newly created promotion start with?”
“Is there a blank promotion template to prefill a form?”
Tell an agent
Get the default promotion template.
Show prefilled defaults for a new promotion.
POST /api/v1/admin/Promotions/Default.archive Archive promotions via OData action · Call operation archive #
Ask an LLM
“Can I archive a batch of promotions with the OData archive action?”
“How do I retire promotions without deleting them, using a POST call?”
Tell an agent
Archive promotions {ids} using the Default.archive action.
Run the archive action on promotions {ids}.
POST /api/v1/admin/Promotions({id})/Default.results Set results on a promotion via OData action · Call operation results #
Ask an LLM
“How do I define what a promotion awards, like a discount result, through the OData action?”
“Can I post promotion results to a promotion by its ID?”
Tell an agent
Set the results of promotion {id} to {promotionResults} using the Default.results action.
Post promotion results for promotion {id} through the OData action.
POST /api/v1/admin/promotions({key})/results Set results on a promotion via route · Promotions set results by key #
Ask an LLM
“Is there a plain /results route to set a promotion's results by key?”
“Can I update what a promotion awards using the key-based results path?”
Tell an agent
Set results for promotion {key} through the /results route.
Post to the results path of promotion {key}.
DELETE /api/v1/admin/promotions/archive Archive promotions via route · Promotions archive route #
Ask an LLM
“Can I archive promotions with a DELETE to the archive route?”
“Which call archives several promotions by ID using the archive path?”
Tell an agent destructive · confirm first
Archive promotions {ids} through the /archive route.
Send promotions {ids} to archive with the DELETE archive endpoint.
DELETE /api/v1/admin/promotions/delete Bulk delete promotions · Promotions delete route #
Ask an LLM
“Can I permanently delete several promotions at once?”
“How do I bulk remove promotions by listing IDs?”
Tell an agent destructive · confirm first
Bulk delete promotions {ids}.
Permanently remove the promotions with IDs {ids}.
GET /api/v1/admin/promotions({key})/customerorderpromotions({customerorderpromotionKey}) Get an order where a promotion was applied · Promotions get customer order promotion by key and customerorderpromotionkey #
Ask an LLM
“Can I see a specific customer order application of a promotion?”
“Which order record shows a promotion being used?”
Tell an agent
Show order application {orderPromotion} of promotion {key}.
Get customer order promotion {orderPromotion} under promotion {key}.
GET /api/v1/admin/promotions({key})/customproperties({custompropertyKey}) Get a custom property on a promotion · Promotions get custom property by key and custompropertykey #
Ask an LLM
“Can I read a custom property stored on a promotion?”
“Where do extra custom fields for a promotion live?”
Tell an agent
Show custom property {property} on promotion {key}.
Get promotion {key}'s custom field {property}.
GET /api/v1/admin/promotions({key})/promotionresults({promotionresultKey}) Get a result of a promotion · Promotions get promotion result by key and promotionresultkey #
Ask an LLM
“What does a particular result of a promotion award?”
“Can I look up a single promotion result record?”
Tell an agent
Show result {result} of promotion {key}.
Get promotion result {result} for promotion {key}.
GET /api/v1/admin/promotions({key})/websites({websiteKey}) Get a website a promotion runs on · Promotions get website by key and websitekey #
Ask an LLM
“Which website is a promotion assigned to?”
“Can I view one website linked to a promotion?”
Tell an agent
Show website {website} linked to promotion {key}.
Get the site {website} where promotion {key} runs.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/optimizely:optimizely-promotions-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

optimizely-promotions-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: admin-v1
  title: Admin API V1 Promotions API
servers:
- url: https://dogfood.commerce.insitesandbox.com
security: []
tags:
- name: Promotions
paths:
  /api/v1/admin/Promotions:
    get:
      tags:
      - Promotions
      summary: Returns the EntitySet Promotions
      operationId: Promotions_Get
      parameters:
      - name: $expand
        in: query
        description: Expands related entities inline.
        required: false
        schema:
          type: string
      - name: $filter
        in: query
        description: Filters the results, based on a Boolean condition.
        required: false
        schema:
          type: string
      - name: $select
        in: query
        description: Selects which properties to include in the response.
        required: false
        schema:
          type: string
      - name: $apply
        in: query
        description: Aggregates the results according to one or more transformations.
        required: false
        schema:
          type: string
      - name: $orderby
        in: query
        description: Sorts the results.
        required: false
        schema:
          type: string
      - name: $top
        in: query
        description: Returns only the first n results.
        required: false
        schema:
          type: integer
          format: int32
      - name: $skip
        in: query
        description: Skips the first n results.
        required: false
        schema:
          type: integer
          format: int32
      - name: $count
        in: query
        description: Includes a count of the matching results in the response.
        required: false
        schema:
          type: boolean
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: object
      deprecated: false
      security:
      - access_token: []
    post:
      tags:
      - Promotions
      summary: Post a new entity to EntitySet Promotions
      operationId: Promotions_Post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Insite.Data.Entities.Promotion'
        description: The entity to post
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: object
      deprecated: false
      security:
      - access_token: []
  /api/v1/admin/Promotions({id}):
    get:
      tags:
      - Promotions
      summary: Returns the entity with the key from Promotions
      operationId: Promotions_GetById
      parameters:
      - name: id
        in: path
        description: 'key: id'
        required: true
        schema:
          type: string
          format: uuid
      - name: $expand
        in: query
        description: Expands related entities inline.
        required: false
        schema:
          type: string
      - name: $select
        in: query
        description: Selects which properties to include in the response.
        required: false
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: object
      deprecated: false
      security:
      - access_token: []
    put:
      tags:
      - Promotions
      summary: Replace entity in EntitySet Promotions
      operationId: Promotions_PutById
      parameters:
      - name: id
        in: path
        description: 'key: id'
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Insite.Data.Entities.Promotion'
        description: The entity to put
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: object
      deprecated: false
      security:
      - access_token: []
    delete:
      tags:
      - Promotions
      summary: Delete entity in EntitySet Promotions
      operationId: Promotions_DeleteById
      parameters:
      - name: id
        in: path
        description: 'key: id'
        required: true
        schema:
          type: string
          format: uuid
      - name: If-Match
        in: header
        description: If-Match header
        required: false
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: object
      deprecated: false
      security:
      - access_token: []
    patch:
      tags:
      - Promotions
      summary: Update entity in EntitySet Promotions
      operationId: Promotions_PatchById
      parameters:
      - name: id
        in: path
        description: 'key: id'
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Insite.Data.Entities.Promotion'
        description: The entity to patch
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: object
      deprecated: false
      security:
      - access_token: []
  /api/v1/admin/Promotions/Default.Default():
    get:
      tags:
      - Promotions
      summary: Call operation Default
      operationId: Promotions_Default
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: object
      deprecated: false
      security:
      - access_token: []
  /api/v1/admin/Promotions/Default.archive:
    post:
      tags:
      - Promotions
      summary: Call operation archive
      operationId: Promotions_Archive
      parameters:
      - name: ids
        in: query
        required: true
        explode: true
        schema:
          type: array
          items:
            type: string
            format: uuid
      requestBody:
        $ref: '#/components/requestBodies/Affiliates_ArchiveParameters'
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: object
      deprecated: false
      security:
      - access_token: []
  /api/v1/admin/Promotions({id})/Default.results:
    post:
      tags:
      - Promotions
      summary: Call operation results
      operationId: Promotions_SetResultsById
      parameters:
      - name: id
        in: path
        description: 'key: id'
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                promotionResults:
                  type: array
                  items:
                    $ref: '#/components/schemas/Insite.Data.Entities.PromotionResult'
        description: results action parameters
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: object
      deprecated: false
      security:
      - access_token: []
  /api/v1/admin/promotions({key})/results:
    post:
      tags:
      - Promotions
      operationId: Promotions_SetResultsByKey
      parameters:
      - name: key
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: object
      deprecated: false
      security:
      - access_token: []
      summary: Promotions set results by key
      x-summary-source: derived
  /api/v1/admin/promotions/archive:
    delete:
      tags:
      - Promotions
      operationId: Promotions_ArchiveRoute
      parameters:
      - name: ids
        in: query
        required: true
        explode: true
        schema:
          type: array
          items:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: object
      deprecated: false
      security:
      - access_token: []
      summary: Promotions archive route
      x-summary-source: derived
  /api/v1/admin/promotions/delete:
    delete:
      tags:
      - Promotions
      operationId: Promotions_DeleteRoute
      parameters:
      - name: ids
        in: query
        required: true
        explode: true
        schema:
          type: array
          items:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: object
      deprecated: false
      security:
      - access_token: []
      summary: Promotions delete route
      x-summary-source: derived
  /api/v1/admin/promotions({key})/customerorderpromotions({customerorderpromotionKey}):
    get:
      tags:
      - Promotions
      operationId: Promotions_GetCustomerOrderPromotionByKeyAndCustomerorderpromotionkey
      parameters:
      - name: key
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: customerorderpromotionKey
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: $expand
        in: query
        description: Expands related entities inline.
        required: false
        schema:
          type: string
      - name: $select
        in: query
        description: Selects which properties to include in the response.
        required: false
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: object
      deprecated: false
      security:
      - access_token: []
      summary: Promotions get customer order promotion by key and customerorderpromotionkey
      x-summary-source: derived
  /api/v1/admin/promotions({key})/customproperties({custompropertyKey}):
    get:
      tags:
      - Promotions
      operationId: Promotions_GetCustomPropertyByKeyAndCustompropertykey
      parameters:
      - name: key
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: custompropertyKey
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: $expand
        in: query
        description: Expands related entities inline.
        required: false
        schema:
          type: string
      - name: $select
        in: query
        description: Selects which properties to include in the response.
        required: false
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: object
      deprecated: false
      security:
      - access_token: []
      summary: Promotions get custom property by key and custompropertykey
      x-summary-source: derived
  /api/v1/admin/promotions({key})/promotionresults({promotionresultKey}):
    get:
      tags:
      - Promotions
      operationId: Promotions_GetPromotionResultByKeyAndPromotionresultkey
      parameters:
      - name: key
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: promotionresultKey
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: $expand
        in: query
        description: Expands related entities inline.
        required: false
        schema:
          type: string
      - name: $select
        in: query
        description: Selects which properties to include in the response.
        required: false
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: object
      deprecated: false
      security:
      - access_token: []
      summary: Promotions get promotion result by key and promotionresultkey
      x-summary-source: derived
  /api/v1/admin/promotions({key})/websites({websiteKey}):
    get:
      tags:
      - Promotions
      operationId: Promotions_GetWebsiteByKeyAndWebsitekey
      parameters:
      - name: key
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: websiteKey
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: $expand
        in: query
        description: Expands related entities inline.
        required: false
        schema:
          type: string
      - name: $select
        in: query
        description: Selects which properties to include in the response.
        required: false
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: object
      deprecated: false
      security:
      - access_token: []
      summary: Promotions get website by key and websitekey
      x-summary-source: derived
components:
  schemas:
    Insite.Data.Entities.PromotionResult:
      required:
      - promotionResultType
      type: object
      properties:
        id:
          format: uuid
          type: string
          example: 00000000-0000-0000-0000-000000000000
        promotionId:
          format: uuid
          type: string
          example: 00000000-0000-0000-0000-000000000000
        productId:
          format: uuid
          type: string
          example: 00000000-0000-0000-0000-000000000000
        amount:
          format: double
          type: number
        promotionResultType:
          maxLength: 100
          minLength: 0
          type: string
        visible:
          type: boolean
        shipViaId:
          format: uuid
          type: string
          example: 00000000-0000-0000-0000-000000000000
        categoryId:
          format: uuid
          type: string
          example: 00000000-0000-0000-0000-000000000000
        maxValue:
          format: double
          type: number
        qtyRequired:
          format: double
          type: number
        maxFree:
          format: double
          type: number
        isPercent:
          type: boolean
        vendorId:
          format: uuid
          type: string
          example: 00000000-0000-0000-0000-000000000000
        brandId:
          format: uuid
          type: string
          example: 00000000-0000-0000-0000-000000000000
        productLineId:
          format: uuid
          type: string
          example: 00000000-0000-0000-0000-000000000000
        qualifyingProductId:
          format: uuid
          type: string
          example: 00000000-0000-0000-0000-000000000000
        customResultName:
          maxLength: 255
          minLength: 0
          type: string
        code:
          maxLength: 255
          minLength: 0
          type: string
        createdOn:
          format: date-time
          type: string
        createdBy:
          type: string
        modifiedOn:
          format: date-time
          type: string
        modifiedBy:
          type: string
    Insite.Data.Entities.Promotion:
      required:
      - description
      - displayMessage
      - name
      - promoCode
      type: object
      properties:
        id:
          format: uuid
          type: string
          example: 00000000-0000-0000-0000-000000000000
        activateOn:
          format: date-time
          type: string
        deactivateOn:
          format: date-time
          type: string
        description:
          maxLength: 1024
          minLength: 0
          type: string
        displayMessage:
          maxLength: 1024
          minLength: 0
          type: string
        isLive:
          type: boolean
        name:
          maxLength: 50
          minLength: 0
          type: string
        promoCode:
          maxLength: 50
          minLength: 0
          type: string
        rank:
          format: decimal
          type: number
        ruleManagerId:
          format: uuid
          type: string
          example: 00000000-0000-0000-0000-000000000000
        createdOn:
          format: date-time
          type: string
        createdBy:
          type: string
        modifiedOn:
          format: date-time
          type: string
        modifiedBy:
          type: string
  requestBodies:
    Affiliates_ArchiveParameters:
      content:
        application/json:
          schema:
            type: object
            properties: {}
      description: archive action parameters
  securitySchemes:
    access_token:
      type: apiKey
      description: Token used to access storefront API.
      name: access_token
      in: query