Optimizely Sessions API

The Sessions API from Optimizely — 3 operation(s) for sessions.

Operations 5

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/sessions/current Get the current shopper session · Sessions V1 get async #
Ask an LLM
“Is the current shopper signed in, and as which user?”
“What bill-to, ship-to, language and currency does my current session use?”
Tell an agent
Get the current storefront session.
Show who is signed in and which customer the current session is set to.
DELETE /api/v1/sessions/current Sign out of the current session · Sessions V1 delete async #
Ask an LLM
“How do I log a shopper out of the storefront?”
“Can I end the current session entirely through the API?”
Tell an agent destructive · confirm first
Sign out and end the current storefront session.
Delete the current session to log the shopper out.
PATCH /api/v1/sessions/current Update the current shopper session · Sessions V1 patch async #
Ask an LLM
“How do I switch the active bill-to and ship-to on my current session?”
“Can I change the session's language or currency without signing in again?”
Tell an agent
Switch the current session to bill-to {billTo} and ship-to {shipTo}.
Change the current session's language to {language} and currency to {currency}.
POST /api/v1/sessions Sign in and start a shopper session · Sessions V1 post async #
Ask an LLM
“How do I sign a user in to the commerce storefront through the API?”
“Can I keep a shopper signed in when I create their session?”
Tell an agent
Sign in as {userName} with password {password}.
Start a session for {userName} with password {password} and remember me set to {rememberMe}.
DELETE /api/v1/sessions/current/authentication Remove authentication from the current session · Sessions V1 delete authentication async #
Ask an LLM
“Can I drop the signed-in identity but keep the session itself?”
“How do I de-authenticate the current session without deleting it?”
Tell an agent destructive · confirm first
Remove the authentication from the current session.
De-authenticate the current session while leaving the session in place.

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-sessions-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-sessions-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: storefront-v1
  title: Storefront API V1 Sessions API
servers:
- url: https://dogfood.commerce.insitesandbox.com
security: []
tags:
- name: Sessions
paths:
  /api/v1/sessions/current:
    get:
      tags:
      - Sessions
      operationId: SessionsV1_GetAsync
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Insite.Account.WebApi.V1.ApiModels.SessionModel'
            text/json:
              schema:
                $ref: '#/components/schemas/Insite.Account.WebApi.V1.ApiModels.SessionModel'
            application/xml:
              schema:
                $ref: '#/components/schemas/Insite.Account.WebApi.V1.ApiModels.SessionModel'
            text/xml:
              schema:
                $ref: '#/components/schemas/Insite.Account.WebApi.V1.ApiModels.SessionModel'
            text/html:
              schema:
                $ref: '#/components/schemas/Insite.Account.WebApi.V1.ApiModels.SessionModel'
      summary: Sessions V1 get async
      x-summary-source: derived
    delete:
      tags:
      - Sessions
      operationId: SessionsV1_DeleteAsync
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Insite.Account.WebApi.V1.ApiModels.SessionModel'
            text/json:
              schema:
                $ref: '#/components/schemas/Insite.Account.WebApi.V1.ApiModels.SessionModel'
            application/xml:
              schema:
                $ref: '#/components/schemas/Insite.Account.WebApi.V1.ApiModels.SessionModel'
            text/xml:
              schema:
                $ref: '#/components/schemas/Insite.Account.WebApi.V1.ApiModels.SessionModel'
            text/html:
              schema:
                $ref: '#/components/schemas/Insite.Account.WebApi.V1.ApiModels.SessionModel'
      security:
      - access_token: []
      summary: Sessions V1 delete async
      x-summary-source: derived
    patch:
      tags:
      - Sessions
      operationId: SessionsV1_PatchAsync
      requestBody:
        $ref: '#/components/requestBodies/Insite.Account.WebApi.V1.ApiModels.SessionModel'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Insite.Account.WebApi.V1.ApiModels.SessionModel'
            text/json:
              schema:
                $ref: '#/components/schemas/Insite.Account.WebApi.V1.ApiModels.SessionModel'
            application/xml:
              schema:
                $ref: '#/components/schemas/Insite.Account.WebApi.V1.ApiModels.SessionModel'
            text/xml:
              schema:
                $ref: '#/components/schemas/Insite.Account.WebApi.V1.ApiModels.SessionModel'
            text/html:
              schema:
                $ref: '#/components/schemas/Insite.Account.WebApi.V1.ApiModels.SessionModel'
      summary: Sessions V1 patch async
      x-summary-source: derived
  /api/v1/sessions:
    post:
      tags:
      - Sessions
      operationId: SessionsV1_PostAsync
      requestBody:
        $ref: '#/components/requestBodies/Insite.Account.WebApi.V1.ApiModels.SessionModel'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Insite.Account.WebApi.V1.ApiModels.SessionModel'
            text/json:
              schema:
                $ref: '#/components/schemas/Insite.Account.WebApi.V1.ApiModels.SessionModel'
            application/xml:
              schema:
                $ref: '#/components/schemas/Insite.Account.WebApi.V1.ApiModels.SessionModel'
            text/xml:
              schema:
                $ref: '#/components/schemas/Insite.Account.WebApi.V1.ApiModels.SessionModel'
            text/html:
              schema:
                $ref: '#/components/schemas/Insite.Account.WebApi.V1.ApiModels.SessionModel'
      summary: Sessions V1 post async
      x-summary-source: derived
  /api/v1/sessions/current/authentication:
    delete:
      tags:
      - Sessions
      operationId: SessionsV1_DeleteAuthenticationAsync
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Insite.Account.WebApi.V1.ApiModels.SessionModel'
            text/json:
              schema:
                $ref: '#/components/schemas/Insite.Account.WebApi.V1.ApiModels.SessionModel'
            application/xml:
              schema:
                $ref: '#/components/schemas/Insite.Account.WebApi.V1.ApiModels.SessionModel'
            text/xml:
              schema:
                $ref: '#/components/schemas/Insite.Account.WebApi.V1.ApiModels.SessionModel'
            text/html:
              schema:
                $ref: '#/components/schemas/Insite.Account.WebApi.V1.ApiModels.SessionModel'
      summary: Sessions V1 delete authentication async
      x-summary-source: derived
components:
  schemas:
    Insite.Customers.WebApi.V1.ApiModels.CostCodeModel:
      type: object
      properties:
        id:
          format: uuid
          type: string
          example: 00000000-0000-0000-0000-000000000000
        costCode:
          type: string
        description:
          type: string
        isActive:
          type: boolean
    Insite.Websites.WebApi.V1.ApiModels.StateModel:
      type: object
      properties:
        uri:
          type: string
        id:
          type: string
        name:
          type: string
        abbreviation:
          type: string
        properties:
          type: object
          additionalProperties:
            type: string
    Insite.Websites.WebApi.V1.ApiModels.CountryModel:
      type: object
      properties:
        uri:
          type: string
        id:
          type: string
        name:
          type: string
        abbreviation:
          type: string
        states:
          type: array
          items:
            $ref: '#/components/schemas/Insite.Websites.WebApi.V1.ApiModels.StateModel'
        properties:
          type: object
          additionalProperties:
            type: string
    Insite.Customers.WebApi.V1.ApiModels.BillToModel:
      type: object
      properties:
        uri:
          type: string
        shipTosUri:
          type: string
        isGuest:
          type: boolean
        label:
          type: string
        budgetEnforcementLevel:
          type: string
        costCodeTitle:
          type: string
        customerCurrencySymbol:
          type: string
        costCodes:
          type: array
          items:
            $ref: '#/components/schemas/Insite.Customers.WebApi.V1.ApiModels.CostCodeModel'
        shipTos:
          type: array
          items:
            $ref: '#/components/schemas/Insite.Customers.WebApi.V1.ApiModels.ShipToModel'
        validation:
          $ref: '#/components/schemas/Insite.Customers.Services.Dtos.CustomerValidationDto'
        isDefault:
          type: boolean
        accountsReceivable:
          $ref: '#/components/schemas/Insite.Customers.Services.Dtos.AccountsReceivableDto'
        id:
          type: string
        customerNumber:
          type: string
        customerSequence:
          type: string
        customerName:
          type: string
        firstName:
          type: string
        lastName:
          type: string
        contactFullName:
          type: string
        companyName:
          type: string
        attention:
          type: string
        address1:
          type: string
        address2:
          type: string
        address3:
          type: string
        address4:
          type: string
        city:
          type: string
        postalCode:
          type: string
        state:
          $ref: '#/components/schemas/Insite.Websites.WebApi.V1.ApiModels.StateModel'
        country:
          $ref: '#/components/schemas/Insite.Websites.WebApi.V1.ApiModels.CountryModel'
        phone:
          type: string
        fullAddress:
          type: string
        email:
          type: string
        fax:
          type: string
        isVmiLocation:
          type: boolean
        properties:
          type: object
          additionalProperties:
            type: string
    Insite.Customers.Services.Dtos.AccountsReceivableDto:
      type: object
      properties:
        agingBuckets:
          type: array
          items:
            $ref: '#/components/schemas/Insite.Customers.Services.Dtos.AgingBucketDto'
        agingBucketTotal:
          $ref: '#/components/schemas/Insite.Customers.Services.Dtos.AgingBucketDto'
        agingBucketFuture:
          $ref: '#/components/schemas/Insite.Customers.Services.Dtos.AgingBucketDto'
    Insite.Account.WebApi.V1.ApiModels.SessionModel:
      type: object
      properties:
        uri:
          type: string
        isAuthenticated:
          type: boolean
        hasRfqUpdates:
          type: boolean
        userName:
          type: string
        userProfileId:
          format: uuid
          type: string
          example: 00000000-0000-0000-0000-000000000000
        userLabel:
          type: string
        userRoles:
          type: string
        userRolesTranslated:
          type: string
        email:
          type: string
        password:
          type: string
        newPassword:
          type: string
        resetPassword:
          type: boolean
        activateAccount:
          type: boolean
        resetToken:
          type: string
        displayChangeCustomerLink:
          type: boolean
        redirectToChangeCustomerPageOnSignIn:
          type: boolean
        billTo:
          $ref: '#/components/schemas/Insite.Customers.WebApi.V1.ApiModels.BillToModel'
        shipTo:
          $ref: '#/components/schemas/Insite.Customers.WebApi.V1.ApiModels.ShipToModel'
        language:
          $ref: '#/components/schemas/Insite.Websites.WebApi.V1.ApiModels.LanguageModel'
        currency:
          $ref: '#/components/schemas/Insite.Websites.WebApi.V1.ApiModels.CurrencyModel'
        deviceType:
          type: string
        persona:
          type: string
        personas:
          type: array
          items:
            $ref: '#/components/schemas/Insite.Account.WebApi.V1.ApiModels.PersonaModel'
        defaultPersonaId:
          format: uuid
          type: string
          example: 00000000-0000-0000-0000-000000000000
        dashboardIsHomepage:
          type: boolean
        isSalesPerson:
          type: boolean
        customLandingPage:
          type: string
        hasDefaultCustomer:
          type: boolean
        rememberMe:
          type: boolean
        keepMeSignedIn:
          type: boolean
        isRestrictedProductRemovedFromCart:
          type: boolean
        firstName:
          type: string
        lastName:
          type: string
        customerWasUpdated:
          type: boolean
        isGuest:
          type: boolean
        isRestrictedProductExistInCart:
          type: boolean
        pickUpWarehouse:
          $ref: '#/components/schemas/Insite.Catalog.WebApi.V1.ApiModels.WarehouseModel'
        fulfillmentMethod:
          type: string
        cartReminderUnsubscribeToken:
          type: string
        cartReminderUnsubscribeEmail:
          type: string
        displayMyAccountMenu:
          type: boolean
        displayPricingAndInventory:
          type: boolean
        passwordExpiresInDays:
          format: int32
          type: integer
        properties:
          type: object
          additionalProperties:
            type: string
    Insite.Account.WebApi.V1.ApiModels.PersonaModel:
      type: object
      properties:
        uri:
          type: string
        id:
          format: uuid
          type: string
          example: 00000000-0000-0000-0000-000000000000
        name:
          type: string
        description:
          type: string
        isDefault:
          type: boolean
        properties:
          type: object
          additionalProperties:
            type: string
    Insite.Catalog.WebApi.V1.ApiModels.WarehouseModel:
      type: object
      properties:
        uri:
          type: string
        id:
          format: uuid
          type: string
          example: 00000000-0000-0000-0000-000000000000
        name:
          type: string
        address1:
          type: string
        address2:
          type: string
        city:
          type: string
        contactName:
          type: string
        countryId:
          format: uuid
          type: string
          example: 00000000-0000-0000-0000-000000000000
        deactivateOn:
          format: date-time
          type: string
        description:
          type: string
        phone:
          type: string
        postalCode:
          type: string
        shipSite:
          type: string
        state:
          type: string
        isDefault:
          type: boolean
        alternateWarehouses:
          type: array
          items:
            $ref: '#/components/schemas/Insite.Catalog.WebApi.V1.ApiModels.WarehouseModel'
        latitude:
          format: decimal
          type: number
        longitude:
          format: decimal
          type: number
        hours:
          type: string
        distance:
          format: double
          type: number
        allowPickup:
          type: boolean
        pickupShipViaId:
          format: uuid
          type: string
          example: 00000000-0000-0000-0000-000000000000
        properties:
          type: object
          additionalProperties:
            type: string
    Insite.Customers.Services.Dtos.AgingBucketDto:
      type: object
      properties:
        amount:
          format: decimal
          type: number
        amountDisplay:
          type: string
        label:
          type: string
    Insite.Websites.WebApi.V1.ApiModels.LanguageModel:
      type: object
      properties:
        uri:
          type: string
        id:
          type: string
        languageCode:
          type: string
        cultureCode:
          type: string
        description:
          type: string
        imageFilePath:
          type: string
        currencyPositioning:
          type: string
        languageTag:
          type: string
        isDefault:
          type: boolean
        isLive:
          type: boolean
        properties:
          type: object
          additionalProperties:
            type: string
    Insite.Customers.Services.Dtos.FieldValidationDto:
      type: object
      properties:
        isRequired:
          type: boolean
        isDisabled:
          type: boolean
        maxLength:
          format: int32
          type: integer
    Insite.Customers.Services.Dtos.CustomerValidationDto:
      type: object
      properties:
        firstName:
          $ref: '#/components/schemas/Insite.Customers.Services.Dtos.FieldValidationDto'
        lastName:
          $ref: '#/components/schemas/Insite.Customers.Services.Dtos.FieldValidationDto'
        companyName:
          $ref: '#/components/schemas/Insite.Customers.Services.Dtos.FieldValidationDto'
        attention:
          $ref: '#/components/schemas/Insite.Customers.Services.Dtos.FieldValidationDto'
        address1:
          $ref: '#/components/schemas/Insite.Customers.Services.Dtos.FieldValidationDto'
        address2:
          $ref: '#/components/schemas/Insite.Customers.Services.Dtos.FieldValidationDto'
        address3:
          $ref: '#/components/schemas/Insite.Customers.Services.Dtos.FieldValidationDto'
        address4:
          $ref: '#/components/schemas/Insite.Customers.Services.Dtos.FieldValidationDto'
        country:
          $ref: '#/components/schemas/Insite.Customers.Services.Dtos.FieldValidationDto'
        state:
          $ref: '#/components/schemas/Insite.Customers.Services.Dtos.FieldValidationDto'
        city:
          $ref: '#/components/schemas/Insite.Customers.Services.Dtos.FieldValidationDto'
        postalCode:
          $ref: '#/components/schemas/Insite.Customers.Services.Dtos.FieldValidationDto'
        phone:
          $ref: '#/components/schemas/Insite.Customers.Services.Dtos.FieldValidationDto'
        email:
          $ref: '#/components/schemas/Insite.Customers.Services.Dtos.FieldValidationDto'
        fax:
          $ref: '#/components/schemas/Insite.Customers.Services.Dtos.FieldValidationDto'
    Insite.Websites.WebApi.V1.ApiModels.CurrencyModel:
      type: object
      properties:
        uri:
          type: string
        id:
          type: string
        currencyCode:
          type: string
        description:
          type: string
        currencySymbol:
          type: string
        isDefault:
          type: boolean
        properties:
          type: object
          additionalProperties:
            type: string
    Insite.Customers.WebApi.V1.ApiModels.ShipToModel:
      type: object
      properties:
        uri:
          type: string
        isNew:
          type: boolean
        oneTimeAddress:
          type: boolean
        label:
          type: string
        validation:
          $ref: '#/components/schemas/Insite.Customers.Services.Dtos.CustomerValidationDto'
        isDefault:
          type: boolean
        id:
          type: string
        customerNumber:
          type: string
        customerSequence:
          type: string
        customerName:
          type: string
        firstName:
          type: string
        lastName:
          type: string
        contactFullName:
          type: string
        companyName:
          type: string
        attention:
          type: string
        address1:
          type: string
        address2:
          type: string
        address3:
          type: string
        address4:
          type: string
        city:
          type: string
        postalCode:
          type: string
        state:
          $ref: '#/components/schemas/Insite.Websites.WebApi.V1.ApiModels.StateModel'
        country:
          $ref: '#/components/schemas/Insite.Websites.WebApi.V1.ApiModels.CountryModel'
        phone:
          type: string
        fullAddress:
          type: string
        email:
          type: string
        fax:
          type: string
        isVmiLocation:
          type: boolean
        properties:
          type: object
          additionalProperties:
            type: string
  requestBodies:
    Insite.Account.WebApi.V1.ApiModels.SessionModel:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Insite.Account.WebApi.V1.ApiModels.SessionModel'
        text/json:
          schema:
            $ref: '#/components/schemas/Insite.Account.WebApi.V1.ApiModels.SessionModel'
        application/xml:
          schema:
            $ref: '#/components/schemas/Insite.Account.WebApi.V1.ApiModels.SessionModel'
        text/xml:
          schema:
            $ref: '#/components/schemas/Insite.Account.WebApi.V1.ApiModels.SessionModel'
        application/x-www-form-urlencoded:
          schema:
            $ref: '#/components/schemas/Insite.Account.WebApi.V1.ApiModels.SessionModel'
        text/html:
          schema:
            $ref: '#/components/schemas/Insite.Account.WebApi.V1.ApiModels.SessionModel'
      required: true
  securitySchemes:
    access_token:
      type: apiKey
      description: Token used to access storefront API.
      name: access_token
      in: query