Optimizely Countries API

The Countries API from Optimizely — 7 operation(s) for countries.

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/Countries List the countries configured in the store · Returns the EntitySet Countries #
Ask an LLM
“Which countries are set up in our Optimizely Commerce admin?”
“Can I filter the country list to only the active ones and sort it by name?”
Tell an agent
List all configured countries.
List countries matching the filter {filter}, ordered by {orderby}.
POST /api/v1/admin/Countries Add a new country · Post a new entity to EntitySet Countries #
Ask an LLM
“What ISO codes and unit settings are required to add a country?”
“Can I block anonymous traffic from a country when I add it?”
Tell an agent
Add the country {name} with abbreviation {abbreviation}, ISO codes {isoCode2} and {isoCode3}, ISO number {isoNumber}, using {distanceUnitOfMeasure}.
Create country {name} ({isoCode2}/{isoCode3}, number {isoNumber}, abbreviation {abbreviation}, distance unit {distanceUnitOfMeasure}) as inactive.
GET /api/v1/admin/Countries({id}) Get a country by id · Returns the entity with the key from Countries #
Ask an LLM
“How do I look up one country's ISO codes and VAT default by its id?”
“Can I select only certain fields when fetching a single country?”
Tell an agent
Get country {id}.
Show only the fields {select} for country {id}.
PUT /api/v1/admin/Countries({id}) Replace a country record · Replace entity in EntitySet Countries #
Ask an LLM
“Can I overwrite a country's whole record, including its ISO codes, in one call?”
“Does a full replace of a country reset fields I leave out?”
Tell an agent
Replace country {id} with name {name}, abbreviation {abbreviation}, codes {isoCode2}/{isoCode3}, number {isoNumber}, unit {distanceUnitOfMeasure}.
Overwrite the full record of country {id} with a new definition.
DELETE /api/v1/admin/Countries({id}) Delete a country · Delete entity in EntitySet Countries #
Ask an LLM
“Can I remove a single country from the store configuration?”
“Does deleting a country support an If-Match concurrency check?”
Tell an agent destructive · confirm first
Delete country {id}.
Delete country {id} only if its ETag still matches {etag}.
PATCH /api/v1/admin/Countries({id}) Update fields on a country · Update entity in EntitySet Countries #
Ask an LLM
“How do I deactivate a country without resending all its details?”
“Can I change a country's default VAT code with a partial update?”
Tell an agent
Set isActive to {isActive} on country {id}.
Patch country {id} so its default VAT code is {defaultVatCodeId}.
GET /api/v1/admin/Countries/Default.Default() Call the countries Default function · Call operation Default #
Ask an LLM
“What does the Default function on the Countries set return?”
“Is there an endpoint that gives me the default country entry?”
Tell an agent
Call the Default function on countries.
Fetch the default country result.
DELETE /api/v1/admin/countries/delete Bulk delete countries by id · Countries delete route #
Ask an LLM
“Can I delete several countries in one request by passing a list of ids?”
“Is there a bulk removal route for countries?”
Tell an agent destructive · confirm first
Delete the countries with ids {ids}.
Bulk remove countries {ids} in one call.
GET /api/v1/admin/countries({key})/customproperties({custompropertyKey}) Get a custom property of a country · Countries get custom property by key and custompropertykey #
Ask an LLM
“Where do I read a custom property value stored on a country?”
“Can I fetch one named custom property for a given country?”
Tell an agent
Get custom property {custompropertyKey} of country {key}.
Show the value of custom property {custompropertyKey} on country {key}.
GET /api/v1/admin/countries({key})/states({stateKey}) Get a state within a country · Countries get state by key and statekey #
Ask an LLM
“How do I look up a specific state or province that belongs to a country?”
“Can I fetch one state record through its parent country?”
Tell an agent
Get state {stateKey} of country {key}.
Show the province {stateKey} under country {key}.
GET /api/v1/admin/countries({key})/websites({websiteKey}) Get a website linked to a country · Countries get website by key and websitekey #
Ask an LLM
“Which storefront websites is a country assigned to?”
“Can I check whether a particular website is linked to a country?”
Tell an agent
Get website {websiteKey} linked to country {key}.
Check the website {websiteKey} assignment for country {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-countries-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-countries-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: admin-v1
  title: Admin API V1 Countries API
servers:
- url: https://dogfood.commerce.insitesandbox.com
security: []
tags:
- name: Countries
paths:
  /api/v1/admin/Countries:
    get:
      tags:
      - Countries
      summary: Returns the EntitySet Countries
      operationId: Countries_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:
      - Countries
      summary: Post a new entity to EntitySet Countries
      operationId: Countries_Post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Insite.Data.Entities.Country'
        description: The entity to post
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: object
      deprecated: false
      security:
      - access_token: []
  /api/v1/admin/Countries({id}):
    get:
      tags:
      - Countries
      summary: Returns the entity with the key from Countries
      operationId: Countries_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:
      - Countries
      summary: Replace entity in EntitySet Countries
      operationId: Countries_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.Country'
        description: The entity to put
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: object
      deprecated: false
      security:
      - access_token: []
    delete:
      tags:
      - Countries
      summary: Delete entity in EntitySet Countries
      operationId: Countries_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:
      - Countries
      summary: Update entity in EntitySet Countries
      operationId: Countries_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.Country'
        description: The entity to patch
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: object
      deprecated: false
      security:
      - access_token: []
  /api/v1/admin/Countries/Default.Default():
    get:
      tags:
      - Countries
      summary: Call operation Default
      operationId: Countries_Default
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: object
      deprecated: false
      security:
      - access_token: []
  /api/v1/admin/countries/delete:
    delete:
      tags:
      - Countries
      operationId: Countries_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: Countries delete route
      x-summary-source: derived
  /api/v1/admin/countries({key})/customproperties({custompropertyKey}):
    get:
      tags:
      - Countries
      operationId: Countries_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: Countries get custom property by key and custompropertykey
      x-summary-source: derived
  /api/v1/admin/countries({key})/states({stateKey}):
    get:
      tags:
      - Countries
      operationId: Countries_GetStateByKeyAndStatekey
      parameters:
      - name: key
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: stateKey
        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: Countries get state by key and statekey
      x-summary-source: derived
  /api/v1/admin/countries({key})/websites({websiteKey}):
    get:
      tags:
      - Countries
      operationId: Countries_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: Countries get website by key and websitekey
      x-summary-source: derived
components:
  schemas:
    Insite.Data.Entities.Country:
      required:
      - name
      - abbreviation
      - isoCode2
      - isoCode3
      - isoNumber
      - distanceUnitOfMeasure
      type: object
      properties:
        id:
          format: uuid
          type: string
          example: 00000000-0000-0000-0000-000000000000
        name:
          maxLength: 100
          minLength: 0
          type: string
        abbreviation:
          maxLength: 32
          minLength: 0
          type: string
        isActive:
          type: boolean
        isoCode2:
          maxLength: 50
          minLength: 0
          type: string
        isoCode3:
          maxLength: 50
          minLength: 0
          type: string
        isoNumber:
          maxLength: 50
          minLength: 0
          type: string
        distanceUnitOfMeasure:
          maxLength: 50
          minLength: 0
          type: string
        blockAnonymousTraffic:
          type: boolean
        defaultVatCodeId:
          format: uuid
          type: string
          example: 00000000-0000-0000-0000-000000000000
        piiRegionId:
          format: uuid
          type: string
          example: 00000000-0000-0000-0000-000000000000
        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