Swell Coupons API

Coupon definitions with codes, redemptions, and discount rules.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).
Business capability
Discount & Promotion Management BC-440.30

Operations 6

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 /coupons List coupons · List Coupons #
Ask an LLM
“What coupons are available in my store?”
“Can I see all discount codes I've created?”
Tell an agent
List all coupons.
Show every discount code in my store.
POST /coupons Create a coupon · Create Coupon #
Ask an LLM
“How do I create a new discount code for my store?”
“Can I add a new coupon for a promotion?”
Tell an agent
Create a new coupon.
Add a discount code to my store.
GET /coupons/{id} Get a coupon · Retrieve Coupon #
Ask an LLM
“How do I look up one coupon by ID?”
“What are the details of a specific coupon?”
Tell an agent
Get coupon {id}.
Show me the details of coupon {id}.
PUT /coupons/{id} Update a coupon · Update Coupon #
Ask an LLM
“How do I change the details of an existing coupon?”
“Can I edit a coupon I already created?”
Tell an agent
Update coupon {id}.
Edit the existing coupon {id}.
DELETE /coupons/{id} Delete a coupon · Delete Coupon #
Ask an LLM
“How do I remove a coupon from my store?”
“Can I delete a discount code I no longer use?”
Tell an agent destructive · confirm first
Delete coupon {id}.
Remove the discount code {id} from my store.
GET /api/coupons/{code} Validate a coupon code · Validate Coupon Code #
Ask an LLM
“How do I check whether a customer's coupon code is valid?”
“Can I look up a coupon by its code?”
Tell an agent
Validate coupon code {code}.
Check whether the code {code} is a valid coupon.

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:swell-io-coupons-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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

swell-io-coupons-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Swell Io Coupons API
  version: 2025-01
  license:
    name: API Profile — API Evangelist
    url: https://apievangelist.com
  description: 'Operations tagged Coupons across 2 of this provider''s published API definitions: swell-backend-api-openapi.yml, swell-frontend-api-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.swell.store
  description: Production Backend API
- url: https://{storeId}.swell.store
  description: Per-store Frontend API endpoint
  variables:
    storeId:
      default: my-store
      description: Your Swell store ID (subdomain).
tags:
- name: Coupons
  description: Coupon definitions with codes, redemptions, and discount rules.
paths:
  /coupons:
    get:
      tags:
      - Coupons
      summary: List Coupons
      operationId: listCoupons
      responses:
        '200':
          description: Coupons.
      security:
      - SwellStoreId: []
        SwellSecretKey: []
    post:
      tags:
      - Coupons
      summary: Create Coupon
      operationId: createCoupon
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
      responses:
        '201':
          description: Created.
      security:
      - SwellStoreId: []
        SwellSecretKey: []
    servers:
    - url: https://api.swell.store
      description: Production Backend API
  /coupons/{id}:
    parameters:
    - $ref: '#/components/parameters/PathId'
    get:
      tags:
      - Coupons
      summary: Retrieve Coupon
      operationId: getCoupon
      responses:
        '200':
          description: Coupon.
      security:
      - SwellStoreId: []
        SwellSecretKey: []
    put:
      tags:
      - Coupons
      summary: Update Coupon
      operationId: updateCoupon
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
      responses:
        '200':
          description: Updated.
      security:
      - SwellStoreId: []
        SwellSecretKey: []
    delete:
      tags:
      - Coupons
      summary: Delete Coupon
      operationId: deleteCoupon
      responses:
        '200':
          description: Deleted.
      security:
      - SwellStoreId: []
        SwellSecretKey: []
    servers:
    - url: https://api.swell.store
      description: Production Backend API
  /api/coupons/{code}:
    parameters:
    - name: code
      in: path
      required: true
      schema:
        type: string
    get:
      tags:
      - Coupons
      summary: Validate Coupon Code
      operationId: frontendGetCoupon
      responses:
        '200':
          description: Coupon validity.
      security:
      - SwellPublicKey: []
    servers:
    - url: https://{storeId}.swell.store
      description: Per-store Frontend API endpoint
      variables:
        storeId:
          default: my-store
          description: Your Swell store ID (subdomain).
components:
  parameters:
    PathId:
      name: id
      in: path
      required: true
      description: The object ID of the resource.
      schema:
        type: string
        pattern: ^[a-f0-9]{24}$
  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.'
    SwellPublicKey:
      type: apiKey
      in: header
      name: Authorization
      description: 'Public storefront key, prefixed with `pk_`. Pass as `Authorization: pk_...`.'
x-refined-from:
- swell-backend-api-openapi.yml
- swell-frontend-api-openapi.yml