Optimizely States API

The States API from Optimizely — 9 operation(s) for states.

Operations 13

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/States List states and provinces · Returns the EntitySet States #
Ask an LLM
“Which states and provinces are set up in the Optimizely Configured Commerce admin?”
“Can I filter the state list to only active, taxable states?”
Tell an agent
List all states in the commerce admin.
List states matching {filter}, ordered by {orderby}, top {top}.
POST /api/v1/admin/States Add a state with its tax settings · Post a new entity to EntitySet States #
Ask an LLM
“What tax codes and descriptions do I need to add a new state?”
“Can I set a state's tax rate and handling amount when creating it?”
Tell an agent
Create state {name} ({abbreviation}) with tax code {taxCode}, tax code 2 {taxCode2}, tax description {taxDescription} and tax description 2 {taxDescription2}.
Add state {abbreviation} under country {countryId} with tax rate {taxRate}.
GET /api/v1/admin/States({id}) Get one state by ID · Returns the entity with the key from States #
Ask an LLM
“How do I look up a single state's tax configuration by its ID?”
“Can I expand related data when fetching one state record?”
Tell an agent
Show state {id}.
Fetch state {id} with {expand} expanded.
PUT /api/v1/admin/States({id}) Replace a state record entirely · Replace entity in EntitySet States #
Ask an LLM
“Can I overwrite a state with a complete new set of tax values?”
“What happens to state fields I leave out when replacing the whole record?”
Tell an agent
Replace state {id} with a full record named {name}, abbreviation {abbreviation}.
Overwrite every field of state {id}, setting tax description to {taxDescription}.
DELETE /api/v1/admin/States({id}) Delete a single state · Delete entity in EntitySet States #
Ask an LLM
“How do I remove one state from the admin by its ID?”
“Can I make a state delete conditional on an ETag?”
Tell an agent destructive · confirm first
Delete state {id}.
Delete state {id} only if its ETag still matches {etag}.
PATCH /api/v1/admin/States({id}) Update selected fields on a state · Update entity in EntitySet States #
Ask an LLM
“Can I change just a state's tax rate without resending everything?”
“How would I deactivate a state or stop taxing freight there?”
Tell an agent
Patch state {id} so its tax rate is {taxRate}.
Update state {id} to set active to {isActive} and tax freight to {taxFreight}.
GET /api/v1/admin/States/Default.Default() Get default values for a new state · Call operation Default #
Ask an LLM
“What default values does the admin pre-fill for a state before I create one?”
“Where do I get a blank state template?”
Tell an agent
Get the default state template.
Show me the pre-filled defaults for a new state.
POST /api/v1/admin/States/Default.archive Archive states with the archive action · Call operation archive #
Ask an LLM
“Can I archive several states at once with the OData archive action?”
“Is there a POST action that archives a batch of states by ID?”
Tell an agent destructive · confirm first
Archive states {ids} using the archive action.
Run the POST archive action on state IDs {ids}.
DELETE /api/v1/admin/states/archive Archive states through the archive route · States archive route #
Ask an LLM
“Is there a DELETE-style route for archiving a list of states?”
“Which endpoint archives states when called with a DELETE request?”
Tell an agent destructive · confirm first
Archive states {ids} through the DELETE archive route.
Send a DELETE to the states archive route for IDs {ids}.
DELETE /api/v1/admin/states/delete Bulk delete states by ID · States delete route #
Ask an LLM
“How do I permanently delete several states in one request?”
“Can I bulk-remove states rather than archive them?”
Tell an agent destructive · confirm first
Bulk delete states {ids}.
Permanently remove the states with IDs {ids}.
GET /api/v1/admin/states({key})/customproperties({custompropertyKey}) Get a custom property on a state · States get custom property by key and custompropertykey #
Ask an LLM
“How can I read one custom property attached to a state?”
“Can I select only certain fields of a state's custom property?”
Tell an agent
Show custom property {custompropertyKey} on state {key}.
Fetch state {key}'s custom property {custompropertyKey}, selecting {select}.
GET /api/v1/admin/states({key})/taxexemptions({taxexemptionKey}) Get a tax exemption linked to a state · States get tax exemption by key and taxexemptionkey #
Ask an LLM
“Which tax exemption details apply to a particular state?”
“Can I look up one tax exemption record under a state?”
Tell an agent
Show tax exemption {taxexemptionKey} for state {key}.
Fetch state {key}'s tax exemption {taxexemptionKey} with {expand} expanded.
GET /api/v1/admin/states({key})/websites({websiteKey}) Get a website linked to a state · States get website by key and websitekey #
Ask an LLM
“Which website is a state assigned to, looked up by both keys?”
“Can I fetch one website record through its state?”
Tell an agent
Show website {websiteKey} linked to state {key}.
Fetch state {key}'s website {websiteKey}, selecting {select}.

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-states-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-states-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: admin-v1
  title: Admin API V1 States API
servers:
- url: https://dogfood.commerce.insitesandbox.com
security: []
tags:
- name: States
paths:
  /api/v1/admin/States:
    get:
      tags:
      - States
      summary: Returns the EntitySet States
      operationId: States_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:
      - States
      summary: Post a new entity to EntitySet States
      operationId: States_Post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Insite.Data.Entities.State'
        description: The entity to post
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: object
      deprecated: false
      security:
      - access_token: []
  /api/v1/admin/States({id}):
    get:
      tags:
      - States
      summary: Returns the entity with the key from States
      operationId: States_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:
      - States
      summary: Replace entity in EntitySet States
      operationId: States_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.State'
        description: The entity to put
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: object
      deprecated: false
      security:
      - access_token: []
    delete:
      tags:
      - States
      summary: Delete entity in EntitySet States
      operationId: States_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:
      - States
      summary: Update entity in EntitySet States
      operationId: States_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.State'
        description: The entity to patch
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: object
      deprecated: false
      security:
      - access_token: []
  /api/v1/admin/States/Default.Default():
    get:
      tags:
      - States
      summary: Call operation Default
      operationId: States_Default
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: object
      deprecated: false
      security:
      - access_token: []
  /api/v1/admin/States/Default.archive:
    post:
      tags:
      - States
      summary: Call operation archive
      operationId: States_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/states/archive:
    delete:
      tags:
      - States
      operationId: States_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: States archive route
      x-summary-source: derived
  /api/v1/admin/states/delete:
    delete:
      tags:
      - States
      operationId: States_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: States delete route
      x-summary-source: derived
  /api/v1/admin/states({key})/customproperties({custompropertyKey}):
    get:
      tags:
      - States
      operationId: States_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: States get custom property by key and custompropertykey
      x-summary-source: derived
  /api/v1/admin/states({key})/taxexemptions({taxexemptionKey}):
    get:
      tags:
      - States
      operationId: States_GetTaxExemptionByKeyAndTaxexemptionkey
      parameters:
      - name: key
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: taxexemptionKey
        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: States get tax exemption by key and taxexemptionkey
      x-summary-source: derived
  /api/v1/admin/states({key})/websites({websiteKey}):
    get:
      tags:
      - States
      operationId: States_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: States get website by key and websitekey
      x-summary-source: derived
components:
  schemas:
    Insite.Data.Entities.State:
      required:
      - abbreviation
      - name
      - taxCode
      - taxCode2
      - taxDescription
      - taxDescription2
      type: object
      properties:
        id:
          format: uuid
          type: string
          example: 00000000-0000-0000-0000-000000000000
        countryId:
          format: uuid
          type: string
          example: 00000000-0000-0000-0000-000000000000
        abbreviation:
          maxLength: 50
          minLength: 0
          type: string
        handlingAmount:
          format: decimal
          type: number
        isActive:
          type: boolean
        name:
          maxLength: 100
          minLength: 0
          type: string
        taxable:
          type: boolean
        taxCode:
          maxLength: 50
          minLength: 0
          type: string
        taxCode2:
          maxLength: 50
          minLength: 0
          type: string
        taxFreight:
          type: boolean
        taxRate:
          format: decimal
          type: number
        taxRate2:
          format: decimal
          type: number
        taxDescription:
          maxLength: 100
          minLength: 0
          type: string
        taxDescription2:
          maxLength: 100
          minLength: 0
          type: string
        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