Optimizely Orders API

Manage purchase orders, cart operations, and order workflows.

Documentation

Specifications

Other Resources

OpenAPI Specification

optimizely-orders-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Optimizely Campaign REST Assets Orders API
  description: The Optimizely Campaign REST API provides programmatic access to Optimizely's email and omnichannel campaign management capabilities. Developers can use the API to manage campaigns, recipients, mailing lists, smart campaigns, transactional mails, and messaging workflows. The API is hosted at api.campaign.episerver.net and supports automation of marketing campaign operations, enabling integration with external systems and custom marketing workflows. The base URL includes the client ID for multi-tenant access.
  version: '1.0'
  contact:
    name: Optimizely Support
    url: https://support.optimizely.com
  termsOfService: https://www.optimizely.com/legal/terms/
servers:
- url: https://api.campaign.episerver.net/rest
  description: Optimizely Campaign Production Server
security:
- basicAuth: []
tags:
- name: Orders
  description: Manage purchase orders, cart operations, and order workflows.
paths:
  /commerce/orders/{customerId}/all:
    get:
      operationId: listCustomerOrders
      summary: List customer orders
      description: Returns all orders for a specific customer.
      tags:
      - Orders
      parameters:
      - $ref: '#/components/parameters/customerId'
      responses:
        '200':
          description: Successfully retrieved customer orders
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Order'
        '401':
          description: Authentication credentials are missing or invalid
        '404':
          description: Customer not found
  /commerce/orders/{orderGroupId}:
    get:
      operationId: getOrder
      summary: Get an order
      description: Retrieves a specific order by its order group identifier.
      tags:
      - Orders
      parameters:
      - $ref: '#/components/parameters/orderGroupId'
      responses:
        '200':
          description: Successfully retrieved the order
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Order'
        '401':
          description: Authentication credentials are missing or invalid
        '404':
          description: Order not found
  /commerce/orders/search/{start}/{maxCount}:
    get:
      operationId: searchOrders
      summary: Search orders
      description: Searches for orders with pagination support.
      tags:
      - Orders
      parameters:
      - name: start
        in: path
        required: true
        description: Starting index for results
        schema:
          type: integer
          minimum: 0
      - name: maxCount
        in: path
        required: true
        description: Maximum number of results to return
        schema:
          type: integer
          minimum: 1
      responses:
        '200':
          description: Successfully retrieved search results
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Order'
        '401':
          description: Authentication credentials are missing or invalid
components:
  parameters:
    orderGroupId:
      name: orderGroupId
      in: path
      required: true
      description: The unique identifier for the order group
      schema:
        type: integer
        format: int64
    customerId:
      name: customerId
      in: path
      required: true
      description: The unique identifier for the customer
      schema:
        type: string
  schemas:
    Order:
      type: object
      description: A purchase order
      properties:
        order_group_id:
          type: integer
          format: int64
          description: Unique order group identifier
        customer_id:
          type: string
          description: Customer identifier
        customer_name:
          type: string
          description: Customer name
        status:
          type: string
          description: Current order status
        total:
          type: number
          description: Order total amount
        currency:
          type: string
          description: Currency code
        created:
          type: string
          format: date-time
          description: Timestamp when the order was created
        modified:
          type: string
          format: date-time
          description: Timestamp when the order was last modified
        order_forms:
          type: array
          description: Order forms containing line items
          items:
            type: object
            properties:
              line_items:
                type: array
                description: Line items in the order form
                items:
                  type: object
                  properties:
                    catalog_entry_id:
                      type: string
                      description: Catalog entry code
                    display_name:
                      type: string
                      description: Display name of the item
                    quantity:
                      type: number
                      description: Quantity ordered
                    placed_price:
                      type: number
                      description: Price at time of purchase
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: HTTP Basic authentication using the Optimizely Campaign API credentials.
externalDocs:
  description: Optimizely Campaign REST API Documentation
  url: https://docs.developers.optimizely.com/optimizely-campaign/docs/rest-api