Optimizely Customer Cost Codes API

The Customer Cost Codes API from Optimizely — 7 operation(s) for customer cost codes.

Operations 11

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/CustomerCostCodes List customer cost codes · Returns the EntitySet CustomerCostCodes #
Ask an LLM
“Which cost codes are set up for my B2B customers?”
“Can I list only active cost codes with a filter?”
Tell an agent
List all customer cost codes.
List cost codes matching {filter}.
POST /api/v1/admin/CustomerCostCodes Create a customer cost code · Post a new entity to EntitySet CustomerCostCodes #
Ask an LLM
“How do I add a cost code that a customer can charge orders to?”
“Can a new cost code be created inactive?”
Tell an agent
Create cost code {costCode} for customer {customerId} described as {description}.
Add cost code {costCode} with active flag {isActive}.
GET /api/v1/admin/CustomerCostCodes({id}) Get a customer cost code · Returns the entity with the key from CustomerCostCodes #
Ask an LLM
“What customer and description belong to a given cost code record?”
“Can I select only certain fields of one cost code?”
Tell an agent
Get customer cost code {id}.
Fetch cost code {id} returning only {select}.
PUT /api/v1/admin/CustomerCostCodes({id}) Replace a customer cost code · Replace entity in EntitySet CustomerCostCodes #
Ask an LLM
“How do I overwrite a cost code record completely?”
“Can I resend every field to replace an existing customer cost code?”
Tell an agent
Replace cost code record {id} with code {costCode} and description {description}.
Overwrite the full cost code entry {id} for customer {customerId}.
DELETE /api/v1/admin/CustomerCostCodes({id}) Delete one customer cost code · Delete entity in EntitySet CustomerCostCodes #
Ask an LLM
“How do I remove a single cost code by id?”
“Can a cost code delete be protected with an If-Match ETag?”
Tell an agent destructive · confirm first
Delete customer cost code {id}.
Delete cost code {id} only if its ETag still matches {etag}.
PATCH /api/v1/admin/CustomerCostCodes({id}) Update fields on a customer cost code · Update entity in EntitySet CustomerCostCodes #
Ask an LLM
“Can I deactivate a cost code without resending the whole record?”
“How do I change just the description of a cost code?”
Tell an agent
Set active flag on cost code {id} to {isActive}.
Change the description of cost code {id} to {description}.
GET /api/v1/admin/CustomerCostCodes/Default.Default() Get default values for a new cost code · Call operation Default #
Ask an LLM
“What defaults does a new customer cost code start with?”
“Is there a blank cost code template to pre-fill a form?”
Tell an agent
Get the default template for a customer cost code.
Fetch an empty cost code with default values.
POST /api/v1/admin/CustomerCostCodes/Default.archive Archive cost codes via the archive action · Call operation archive #
Ask an LLM
“Can I archive a batch of cost codes instead of deleting them?”
“Which POST action archives customer cost codes by id?”
Tell an agent
Archive customer cost codes {ids} with the POST archive action.
Run Default.archive on cost codes {ids}.
DELETE /api/v1/admin/customercostcodes/archive Archive cost codes via the DELETE archive route · Customer cost codes archive route #
Ask an LLM
“Is there a DELETE-verb route that archives cost codes?”
“How do I archive cost codes through the customercostcodes/archive endpoint?”
Tell an agent destructive · confirm first
Call the DELETE archive route for cost codes {ids}.
Archive cost codes {ids} via the customercostcodes/archive route.
DELETE /api/v1/admin/customercostcodes/delete Bulk delete customer cost codes · Customer cost codes delete route #
Ask an LLM
“Can I permanently delete many cost codes at once?”
“How do I bulk-remove customer cost codes by a list of ids?”
Tell an agent destructive · confirm first
Bulk delete customer cost codes {ids}.
Permanently remove every cost code in {ids}.
GET /api/v1/admin/customercostcodes({key})/customproperties({custompropertyKey}) Get a custom property on a cost code · Customer cost codes get custom property by key and custompropertykey #
Ask an LLM
“What custom property values are attached to a cost code?”
“Can I read one custom attribute stored on a customer cost code?”
Tell an agent
Get custom property {custompropertyKey} on cost code {key}.
Read extra attribute {custompropertyKey} of customer cost 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-customer-cost-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-customer-cost-codes-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: admin-v1
  title: Admin API V1 Customer Cost Codes API
servers:
- url: https://dogfood.commerce.insitesandbox.com
security: []
tags:
- name: Customer Cost Codes
paths:
  /api/v1/admin/CustomerCostCodes:
    get:
      tags:
      - Customer Cost Codes
      summary: Returns the EntitySet CustomerCostCodes
      operationId: CustomerCostCodes_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:
      - Customer Cost Codes
      summary: Post a new entity to EntitySet CustomerCostCodes
      operationId: CustomerCostCodes_Post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Insite.Data.Entities.CustomerCostCode'
        description: The entity to post
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: object
      deprecated: false
      security:
      - access_token: []
  /api/v1/admin/CustomerCostCodes({id}):
    get:
      tags:
      - Customer Cost Codes
      summary: Returns the entity with the key from CustomerCostCodes
      operationId: CustomerCostCodes_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:
      - Customer Cost Codes
      summary: Replace entity in EntitySet CustomerCostCodes
      operationId: CustomerCostCodes_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.CustomerCostCode'
        description: The entity to put
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: object
      deprecated: false
      security:
      - access_token: []
    delete:
      tags:
      - Customer Cost Codes
      summary: Delete entity in EntitySet CustomerCostCodes
      operationId: CustomerCostCodes_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:
      - Customer Cost Codes
      summary: Update entity in EntitySet CustomerCostCodes
      operationId: CustomerCostCodes_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.CustomerCostCode'
        description: The entity to patch
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: object
      deprecated: false
      security:
      - access_token: []
  /api/v1/admin/CustomerCostCodes/Default.Default():
    get:
      tags:
      - Customer Cost Codes
      summary: Call operation Default
      operationId: CustomerCostCodes_Default
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: object
      deprecated: false
      security:
      - access_token: []
  /api/v1/admin/CustomerCostCodes/Default.archive:
    post:
      tags:
      - Customer Cost Codes
      summary: Call operation archive
      operationId: CustomerCostCodes_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/customercostcodes/archive:
    delete:
      tags:
      - Customer Cost Codes
      operationId: CustomerCostCodes_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: Customer cost codes archive route
      x-summary-source: derived
  /api/v1/admin/customercostcodes/delete:
    delete:
      tags:
      - Customer Cost Codes
      operationId: CustomerCostCodes_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: Customer cost codes delete route
      x-summary-source: derived
  /api/v1/admin/customercostcodes({key})/customproperties({custompropertyKey}):
    get:
      tags:
      - Customer Cost Codes
      operationId: CustomerCostCodes_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: Customer cost codes get custom property by key and custompropertykey
      x-summary-source: derived
components:
  schemas:
    Insite.Data.Entities.CustomerCostCode:
      required:
      - costCode
      - description
      type: object
      properties:
        id:
          format: uuid
          type: string
          example: 00000000-0000-0000-0000-000000000000
        costCode:
          maxLength: 100
          minLength: 0
          type: string
        customerId:
          format: uuid
          type: string
          example: 00000000-0000-0000-0000-000000000000
        description:
          maxLength: 255
          minLength: 0
          type: string
        isActive:
          type: boolean
        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