Optimizely Order Promotion Codes API

The Order Promotion Codes API from Optimizely — 5 operation(s) for order promotion codes.

Operations 9

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/OrderPromotionCodes List promotion codes applied to orders · Returns the EntitySet OrderPromotionCodes #
Ask an LLM
“How can I see which promotion codes were used on orders?”
“Can I filter order promotion codes to one specific code?”
Tell an agent
List all order promotion codes.
List order promotion codes matching {filter}.
POST /api/v1/admin/OrderPromotionCodes Apply a promotion code to an order · Post a new entity to EntitySet OrderPromotionCodes #
Ask an LLM
“How do I attach a promo code to a customer order?”
“What is required to record an order promotion code?”
Tell an agent
Apply promotion code {code} to order {customerOrderId}.
Record promo code {code} on an order.
GET /api/v1/admin/OrderPromotionCodes({id}) Get one order promotion code · Returns the entity with the key from OrderPromotionCodes #
Ask an LLM
“How can I look up a single order promotion code record?”
“Which order does a given promotion code record belong to?”
Tell an agent
Show order promotion code {id}.
Fetch {select} for order promotion code {id}.
PUT /api/v1/admin/OrderPromotionCodes({id}) Replace an order promotion code · Replace entity in EntitySet OrderPromotionCodes #
Ask an LLM
“How do I overwrite an order promotion code record completely?”
“Does replacing an order promo code record clear the order link if omitted?”
Tell an agent
Replace order promotion code {id} with code {code}.
Overwrite the full order promotion code record {id}.
DELETE /api/v1/admin/OrderPromotionCodes({id}) Remove a promotion code from an order · Delete entity in EntitySet OrderPromotionCodes #
Ask an LLM
“How do I delete one promo code record from an order?”
“Can I guard removing an order promotion code with an ETag?”
Tell an agent destructive · confirm first
Delete order promotion code {id}.
Remove order promotion code {id} if its ETag is {etag}.
PATCH /api/v1/admin/OrderPromotionCodes({id}) Update an order promotion code · Update entity in EntitySet OrderPromotionCodes #
Ask an LLM
“How can I correct a mistyped promo code on an order?”
“Can I move a promotion code record to a different order?”
Tell an agent
Change the code on order promotion code {id} to {code}.
Reassign order promotion code {id} to order {customerOrderId}.
GET /api/v1/admin/OrderPromotionCodes/Default.Default() Get defaults for a new order promotion code · Call operation Default #
Ask an LLM
“What default values does a new order promotion code record have?”
“Where do I get a blank order promotion code template?”
Tell an agent
Fetch the default order promotion code template.
Show starting values for a new order promo code record.
DELETE /api/v1/admin/orderpromotioncodes/delete Bulk delete order promotion codes · Order promotion codes delete route #
Ask an LLM
“How do I delete several order promotion code records at once?”
“Can I pass a list of ids to remove promo codes from orders?”
Tell an agent destructive · confirm first
Bulk delete order promotion codes {ids}.
Permanently delete every order promo code record in {ids}.
GET /api/v1/admin/orderpromotioncodes({key})/customproperties({custompropertyKey}) Get a custom property of an order promotion code · Order promotion codes get custom property by key and custompropertykey #
Ask an LLM
“Where can I read a custom property on an order promotion code?”
“How do I fetch one custom attribute from an order promo code record?”
Tell an agent
Get custom property {custompropertyKey} of order promotion code {key}.
Read custom field {custompropertyKey} on order promo code {key}.

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-order-promotion-codes-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-order-promotion-codes-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: admin-v1
  title: Admin API V1 Order Promotion Codes API
servers:
- url: https://dogfood.commerce.insitesandbox.com
security: []
tags:
- name: Order Promotion Codes
paths:
  /api/v1/admin/OrderPromotionCodes:
    get:
      tags:
      - Order Promotion Codes
      summary: Returns the EntitySet OrderPromotionCodes
      operationId: OrderPromotionCodes_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:
      - Order Promotion Codes
      summary: Post a new entity to EntitySet OrderPromotionCodes
      operationId: OrderPromotionCodes_Post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Insite.Data.Entities.OrderPromotionCode'
        description: The entity to post
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: object
      deprecated: false
      security:
      - access_token: []
  /api/v1/admin/OrderPromotionCodes({id}):
    get:
      tags:
      - Order Promotion Codes
      summary: Returns the entity with the key from OrderPromotionCodes
      operationId: OrderPromotionCodes_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:
      - Order Promotion Codes
      summary: Replace entity in EntitySet OrderPromotionCodes
      operationId: OrderPromotionCodes_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.OrderPromotionCode'
        description: The entity to put
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: object
      deprecated: false
      security:
      - access_token: []
    delete:
      tags:
      - Order Promotion Codes
      summary: Delete entity in EntitySet OrderPromotionCodes
      operationId: OrderPromotionCodes_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:
      - Order Promotion Codes
      summary: Update entity in EntitySet OrderPromotionCodes
      operationId: OrderPromotionCodes_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.OrderPromotionCode'
        description: The entity to patch
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: object
      deprecated: false
      security:
      - access_token: []
  /api/v1/admin/OrderPromotionCodes/Default.Default():
    get:
      tags:
      - Order Promotion Codes
      summary: Call operation Default
      operationId: OrderPromotionCodes_Default
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: object
      deprecated: false
      security:
      - access_token: []
  /api/v1/admin/orderpromotioncodes/delete:
    delete:
      tags:
      - Order Promotion Codes
      operationId: OrderPromotionCodes_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: Order promotion codes delete route
      x-summary-source: derived
  /api/v1/admin/orderpromotioncodes({key})/customproperties({custompropertyKey}):
    get:
      tags:
      - Order Promotion Codes
      operationId: OrderPromotionCodes_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: Order promotion codes get custom property by key and custompropertykey
      x-summary-source: derived
components:
  schemas:
    Insite.Data.Entities.OrderPromotionCode:
      required:
      - code
      type: object
      properties:
        id:
          format: uuid
          type: string
          example: 00000000-0000-0000-0000-000000000000
        customerOrderId:
          format: uuid
          type: string
          example: 00000000-0000-0000-0000-000000000000
        code:
          maxLength: 50
          minLength: 0
          type: string
        createdOn:
          format: date-time
          type: string
        createdBy:
          type: string
        modifiedOn:
          format: date-time
          type: string
        modifiedBy:
          type: string
  securitySchemes:
    access_token:
      type: apiKey
      description: Token used to access storefront API.
      name: access_token
      in: query