Swell · Arazzo Workflow

Swell Storefront Add Item and Submit Order

Version 1.0.0

Look up a product, add it to the session cart, then submit the cart as an order.

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

Provider

swell-io

Workflows

storefront-add-item-and-submit-order
Resolve a product, add it to the cart, then submit the order.
Gets a product by slug, adds it to the session cart, then submits the cart as an order.
3 steps inputs: publicKey, quantity, slug outputs: cartId, orderId, orderNumber
1
getProductStep
Retrieve the product by slug to resolve its id.
2
addItemStep
Add the resolved product to the session cart with the given quantity.
3
submitOrderStep
Submit the current cart, converting it into an order.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Swell Storefront Add Item and Submit Order
  summary: Look up a product, add it to the session cart, then submit the cart as an order.
  description: >-
    The canonical headless storefront checkout. The workflow retrieves a product
    by slug to resolve its id, adds that product to the session-scoped cart with
    a quantity, and then submits the current cart, converting it into an order.
    Each step spells out its request inline, including the public-key
    authorization, so the flow can be read and executed without opening the
    underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: cartApi
  url: ../openapi/swell-io-cart-api-openapi.yml
  type: openapi
- name: checkoutApi
  url: ../openapi/swell-io-checkout-api-openapi.yml
  type: openapi
- name: productsApi
  url: ../openapi/swell-io-products-api-openapi.yml
  type: openapi
workflows:
- workflowId: storefront-add-item-and-submit-order
  summary: Resolve a product, add it to the cart, then submit the order.
  description: >-
    Gets a product by slug, adds it to the session cart, then submits the cart
    as an order.
  inputs:
    type: object
    required:
    - publicKey
    - slug
    properties:
      publicKey:
        type: string
        description: Public storefront key, prefixed with pk_.
      slug:
        type: string
        description: Product slug or id to add to the cart.
      quantity:
        type: integer
        description: Quantity of the product to add.
  steps:
  - stepId: getProductStep
    description: Retrieve the product by slug to resolve its id.
    operationId: frontendGetProduct
    parameters:
    - name: slug
      in: path
      value: $inputs.slug
    - name: Authorization
      in: header
      value: $inputs.publicKey
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      productId: $response.body#/id
      price: $response.body#/price
  - stepId: addItemStep
    description: Add the resolved product to the session cart with the given quantity.
    operationId: frontendAddCartItem
    parameters:
    - name: Authorization
      in: header
      value: $inputs.publicKey
    requestBody:
      contentType: application/json
      payload:
        product_id: $steps.getProductStep.outputs.productId
        quantity: $inputs.quantity
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      cartId: $response.body#/id
      grandTotal: $response.body#/grand_total
  - stepId: submitOrderStep
    description: Submit the current cart, converting it into an order.
    operationId: frontendSubmitOrder
    parameters:
    - name: Authorization
      in: header
      value: $inputs.publicKey
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      orderId: $response.body#/id
      orderNumber: $response.body#/number
      grandTotal: $response.body#/grand_total
  outputs:
    cartId: $steps.addItemStep.outputs.cartId
    orderId: $steps.submitOrderStep.outputs.orderId
    orderNumber: $steps.submitOrderStep.outputs.orderNumber

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-storefront-checkout-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.