Swell · Arazzo Workflow

Swell Find and Cancel Active Subscription

Version 1.0.0

Locate an account's active subscription and cancel it, branching when none exists.

1 workflow 1 source API 1 provider
View Spec View on GitHub CommerceHeadless CommerceAPI-FirstB2CB2BSubscriptionMarketplacesWholesaleStorefrontCheckoutPaymentsCartOrderCatalogInternationalizationArazzoWorkflows

Provider

swell-io

Workflows

find-and-cancel-subscription
Find an account's active subscription and cancel it.
Filters subscriptions to the account with active status; on a hit it cancels the matched subscription, on a miss it ends.
2 steps inputs: account_id outputs: canceledSubscriptionId
1
findSubscriptionStep
List subscriptions for the account that are currently active, returning at most one.
2
cancelSubscriptionStep
Cancel the matched active subscription.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Swell Find and Cancel Active Subscription
  summary: Locate an account's active subscription and cancel it, branching when none exists.
  description: >-
    A find-then-act lifecycle flow for self-service or support-driven churn. The
    workflow lists subscriptions filtered to an account with active status and
    branches: when an active subscription is found it cancels that subscription,
    and when none is found it ends without acting. Each step spells out its
    request inline so the flow can be read and executed without opening the
    underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: subscriptionsApi
  url: ../openapi/swell-io-subscriptions-api-openapi.yml
  type: openapi
workflows:
- workflowId: find-and-cancel-subscription
  summary: Find an account's active subscription and cancel it.
  description: >-
    Filters subscriptions to the account with active status; on a hit it cancels
    the matched subscription, on a miss it ends.
  inputs:
    type: object
    required:
    - account_id
    properties:
      account_id:
        type: string
        description: The account whose active subscription should be canceled.
  steps:
  - stepId: findSubscriptionStep
    description: >-
      List subscriptions for the account that are currently active, returning at
      most one.
    operationId: listSubscriptions
    parameters:
    - name: where
      in: query
      value:
        account_id: $inputs.account_id
        status: active
    - name: limit
      in: query
      value: 1
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      subscriptionId: $response.body#/results/0/id
    onSuccess:
    - name: subscriptionFound
      type: goto
      stepId: cancelSubscriptionStep
      criteria:
      - context: $response.body
        condition: $.results.length > 0
        type: jsonpath
    - name: noSubscription
      type: end
      criteria:
      - context: $response.body
        condition: $.results.length == 0
        type: jsonpath
  - stepId: cancelSubscriptionStep
    description: Cancel the matched active subscription.
    operationId: cancelSubscription
    parameters:
    - name: id
      in: path
      value: $steps.findSubscriptionStep.outputs.subscriptionId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      canceledSubscriptionId: $steps.findSubscriptionStep.outputs.subscriptionId
  outputs:
    canceledSubscriptionId: $steps.cancelSubscriptionStep.outputs.canceledSubscriptionId

Work with this as data

Every workflow 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 arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • 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 workflow
curl "https://apis.io/api/v1/arazzo/swell-io-cancel-subscription-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?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.