Optimizely Carts API

The Carts API from Optimizely — 8 operation(s) for carts.

Business capability
Cart & Checkout AE-140.20

Operations 18

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/carts/{cartId}/promotions List promotions applied to a cart · Promotions V1 get collection async #
Ask an LLM
“Which promotions are currently applied to a shopper's cart?”
“Can I see every promo code that has been used on a cart?”
Tell an agent
List the promotions applied to cart {cartId}.
Show all promo codes on cart {cartId}.
POST /api/v1/carts/{cartId}/promotions Apply a promotion code to a cart · Promotions V1 post async #
Ask an LLM
“How do I apply a promo code to a customer's cart?”
“What happens when I add a promotion code that doesn't qualify for the cart?”
Tell an agent
Apply promo code {promotionCode} to cart {cartId}.
Add promotion code {promotionCode} to cart {cartId} for order line {orderLineId}.
DELETE /api/v1/carts/{cartId}/promotions Remove all promotions from a cart · Promotions V1 delete collection async #
Ask an LLM
“How do I strip every promo code off a cart at once?”
“Can I clear all applied promotions from a cart in one call?”
Tell an agent destructive · confirm first
Remove all promotions from cart {cartId}.
Clear every applied promo code on cart {cartId}.
GET /api/v1/carts/{cartId}/promotions/{promotionId} Get one promotion applied to a cart · Promotions V1 get async #
Ask an LLM
“What discount amount did a specific promotion give on a cart?”
“Can I look up a single promotion that was applied to a cart?”
Tell an agent
Get promotion {promotionId} on cart {cartId}.
Show how much promotion {promotionId} took off cart {cartId}.
DELETE /api/v1/carts/{cartId}/promotions/{promotionId} Remove one promotion from a cart · Promotions V1 delete async #
Ask an LLM
“How do I remove just one promo code from a cart and keep the others?”
“Can a single applied promotion be taken off a shopper's cart?”
Tell an agent destructive · confirm first
Remove promotion {promotionId} from cart {cartId}.
Take promo {promotionId} off cart {cartId} but leave the other promotions.
GET /api/v1/carts List carts and orders in progress · Carts V1 get collection async #
Ask an LLM
“How do I find all carts for a particular bill-to account?”
“Can I filter carts by status and date range?”
Tell an agent
List carts with status {status}.
Show carts for bill-to {billToId} created between {fromDate} and {toDate}.
POST /api/v1/carts Create a new cart · Carts V1 post async #
Ask an LLM
“How do I start a new cart for a customer's bill-to and ship-to addresses?”
“Can I create a cart tied to a VMI location?”
Tell an agent
Create a new cart for bill-to {billToId} and ship-to {shipToId}.
Start a cart for VMI location {vmiLocationId} with notes {notes}.
GET /api/v1/carts/{cartId} Get a cart's details and totals · Carts V1 get async #
Ask an LLM
“What's the grand total, tax and shipping on a specific cart?”
“Can I check whether a cart is ready to check out?”
Tell an agent
Get cart {cartId}.
Show the totals and status of cart {cartId}.
DELETE /api/v1/carts/{cartId} Delete a cart · Carts V1 delete async #
Ask an LLM
“How do I throw away an entire cart?”
“Can I delete a saved cart that's no longer needed?”
Tell an agent destructive · confirm first
Delete cart {cartId}.
Discard cart {cartId} entirely.
PATCH /api/v1/carts/{cartId} Update a cart or submit it as an order · Carts V1 patch async #
Ask an LLM
“How do I set the PO number and shipping method on a cart?”
“Can I submit a cart by changing its status?”
Tell an agent
Set PO number {poNumber} on cart {cartId}.
Change the status of cart {cartId} to {status}.
GET /api/v1/carts/{cartId}/cartlines List the line items in a cart · Cart lines V1 get collection async #
Ask an LLM
“What products are in a customer's cart right now?”
“Can I page through the line items of a large cart?”
Tell an agent
List the lines in cart {cartId}.
Show page {page} of cart {cartId} line items.
POST /api/v1/carts/{cartId}/cartlines Add a product to a cart · Cart lines V1 post async #
Ask an LLM
“How do I add a product with a quantity to a cart?”
“Can I add an item to a cart with a line note?”
Tell an agent
Add {qtyOrdered} of product {productId} to cart {cartId}.
Put product {productId} in cart {cartId} with quantity {qtyOrdered} and note {notes}.
DELETE /api/v1/carts/{cartId}/cartlines Empty all lines from a cart · Cart lines V1 delete cart lines async #
Ask an LLM
“How do I empty a cart without deleting the cart itself?”
“Can I remove every line item from a cart at once?”
Tell an agent destructive · confirm first
Empty all line items from cart {cartId}.
Remove every product line from cart {cartId} but keep the cart.
GET /api/v1/carts/{cartId}/cartlines/{cartLineId} Get one line item in a cart · Cart lines V1 get async #
Ask an LLM
“What price and availability does one cart line show?”
“Can I look up a single line item in a cart?”
Tell an agent
Get line {cartLineId} in cart {cartId}.
Show pricing for cart line {cartLineId} of cart {cartId}.
DELETE /api/v1/carts/{cartId}/cartlines/{cartLineId} Remove one line item from a cart · Cart lines V1 delete async #
Ask an LLM
“How do I remove one product from a cart?”
“Can I delete a single cart line and leave the rest?”
Tell an agent destructive · confirm first
Remove line {cartLineId} from cart {cartId}.
Delete cart line {cartLineId} in cart {cartId}.
PATCH /api/v1/carts/{cartId}/cartlines/{cartLineId} Change quantity or notes on a cart line · Cart lines V1 patch async #
Ask an LLM
“How do I change the quantity of an item already in the cart?”
“Can I update the note or cost code on an existing cart line?”
Tell an agent
Change cart line {cartLineId} in cart {cartId} to quantity {qtyOrdered}.
Set the cost code on existing line {cartLineId} of cart {cartId} to {costCode}.
POST /api/v1/carts/{cartId}/cartlines/batch Add several products to a cart at once · Cart lines V1 post collection async #
Ask an LLM
“How do I bulk add many products to a cart in a single request?”
“What tells me if not every item in a batch made it into the cart?”
Tell an agent
Batch add these lines {cartLines} to cart {cartId}.
Add multiple products {cartLines} to cart {cartId} in one request.
POST /api/v1/carts/{cartId}/cartlines/wishlist/{wishListId} Add a wish list's items to a cart · Cart lines V1 post wish list async #
Ask an LLM
“How do I move everything from a wish list into a cart?”
“Can a shared list's items be added to the cart in one step?”
Tell an agent
Add all items from wish list {wishListId} to cart {cartId}.
Copy wish list {wishListId} into cart {cartId}.

Specifications

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-carts-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

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-carts-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: storefront-v1
  title: Storefront API V1 Carts API
servers:
- url: https://dogfood.commerce.insitesandbox.com
security: []
tags:


# --- truncated at 32 KB (83 KB total) ---
# Full source: https://artifacts.apis.io/optimizely/openapi/optimizely-carts-api-openapi.yml