Swell Carts API

Pending purchase requests that can be converted into orders.

Operations 5

GET /carts List Carts #
POST /carts Create Cart #
GET /carts/{id} Retrieve Cart #
PUT /carts/{id} Update Cart #
DELETE /carts/{id} Delete Cart #

Documentation

Specifications

Schemas & Data

Other Resources

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/swell-io-carts-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

swell-io-carts-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Swell Backend Carts API
  version: 2025-01
  description: 'Swell Backend API — the server-side REST surface for managing every resource in a Swell commerce store: products, variants, carts, orders, payments, refunds, shipments, returns, subscriptions, accounts (customers), invoices, coupons, promotions, gift cards, content, files, data models, events, and webhooks. Authenticated with a store ID and secret key. The official Node and PHP libraries connect over a custom wire protocol on port 8443 for improved performance; HTTPS REST is available at https://api.swell.store.'
  contact:
    name: Swell Developer Support
    url: https://developers.swell.is
    email: support@swell.is
  license:
    name: API Profile — API Evangelist
    url: https://apievangelist.com
servers:
- url: https://api.swell.store
  description: Production Backend API
security:
- SwellStoreId: []
  SwellSecretKey: []
tags:
- name: Carts
  description: Pending purchase requests that can be converted into orders.
paths:
  /carts:
    get:
      tags:
      - Carts
      summary: List Carts
      operationId: listCarts
      parameters:
      - $ref: '#/components/parameters/Limit'
      - $ref: '#/components/parameters/Page'
      - $ref: '#/components/parameters/Where'
      responses:
        '200':
          description: A page of carts.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CartList'
    post:
      tags:
      - Carts
      summary: Create Cart
      operationId: createCart
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CartCreate'
      responses:
        '201':
          description: Cart created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Cart'
  /carts/{id}:
    parameters:
    - $ref: '#/components/parameters/PathId'
    get:
      tags:
      - Carts
      summary: Retrieve Cart
      operationId: getCart
      responses:
        '200':
          description: Cart.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Cart'
    put:
      tags:
      - Carts
      summary: Update Cart
      operationId: updateCart
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CartUpdate'
      responses:
        '200':
          description: Updated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Cart'
    delete:
      tags:
      - Carts
      summary: Delete Cart
      operationId: deleteCart
      responses:
        '200':
          description: Deleted.
components:
  parameters:
    Page:
      name: page
      in: query
      description: Result page number, 1-indexed.
      schema:
        type: integer
        minimum: 1
        default: 1
    Limit:
      name: limit
      in: query
      description: Records per page (1-1000). Default 15.
      schema:
        type: integer
        minimum: 1
        maximum: 1000
        default: 15
    Where:
      name: where
      in: query
      description: MongoDB-style filter object. Supports operators $eq, $ne, $gt, $gte, $lt, $lte, $in, $nin, $regex, $type, $exists, $and, $or, $nor, $all, $elemMatch, $size.
      schema:
        type: object
    PathId:
      name: id
      in: path
      required: true
      description: The object ID of the resource.
      schema:
        type: string
        pattern: ^[a-f0-9]{24}$
  schemas:
    CartCreate:
      $ref: '#/components/schemas/Cart'
    CartList:
      type: object
      properties:
        count:
          type: integer
        page:
          type: integer
        results:
          type: array
          items:
            $ref: '#/components/schemas/Cart'
    Cart:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/ObjectId'
        status:
          type: string
          enum:
          - active
          - converted
          - abandoned
          - recovered
        account_id:
          $ref: '#/components/schemas/ObjectId'
        items:
          type: array
          items:
            type: object
        billing:
          type: object
        shipping:
          type: object
        sub_total:
          $ref: '#/components/schemas/Money'
        discount_total:
          $ref: '#/components/schemas/Money'
        tax_total:
          $ref: '#/components/schemas/Money'
        shipment_total:
          $ref: '#/components/schemas/Money'
        grand_total:
          $ref: '#/components/schemas/Money'
        coupon_code:
          type: string
        currency:
          type: string
        date_created:
          type: string
          format: date-time
        date_updated:
          type: string
          format: date-time
    Money:
      type: number
      format: float
      description: Currency amount expressed in store currency.
    ObjectId:
      type: string
      pattern: ^[a-f0-9]{24}$
    CartUpdate:
      $ref: '#/components/schemas/Cart'
  securitySchemes:
    SwellStoreId:
      type: apiKey
      in: header
      name: X-Store-Id
      description: Your Swell store ID, found in the Developer section of the dashboard.
    SwellSecretKey:
      type: apiKey
      in: header
      name: Authorization
      description: 'Secret API key prefixed with `sk_`. Sent as `Authorization: Basic <base64(store-id:secret-key)>` or equivalent custom header by official libraries.'