Shopify · Arazzo Workflow

Shopify Archive a Stale Product

Version 1.0.0

Read a product and branch on its status, archiving it only when it is still active.

1 workflow 1 source API 1 provider
View Spec View on GitHub CommerceE-CommercePaymentsRetailShopping CartT1ArazzoWorkflows

Provider

shopify

Workflows

archive-stale-product
Archive a product only if it is currently active, otherwise short circuit.
Reads the product, archives it when active, and reads it back; ends cleanly when the product is already archived.
3 steps inputs: productId outputs: product, productId, status
1
getProduct
Read the product and branch on its status so an already-archived product is left untouched.
2
archiveProduct
Set the active product's status to archived.
3
confirmProduct
Read the product back to confirm it is archived.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Shopify Archive a Stale Product
  summary: Read a product and branch on its status, archiving it only when it is still active.
  description: >-
    Retires a product from the active catalog idempotently. The workflow reads
    the product and branches on its status: an active product is archived (status
    set to archived) and read back, while an already-archived product short
    circuits so the operation is safe to re-run. Every step spells out its
    request inline so the flow can be read and executed without opening the
    underlying OpenAPI description.
  version: 1.0.0
  x-realizes-capability-ids:
  - BC-2370.10
  x-capability-derivation:
    method: 'deterministic join: sourceDescriptions -> per-tag OpenAPI -> tag/capability edge. No classification at this step.'
    min_confidence: 0.7
    sources:
    - capability_id: BC-2370.10
      capability_name: Item Master Data Management
      spec: shopify-products-api-openapi.yml
      confidence: 0.82
    model: Turbo EA Capabilities by Vincent Verdet — Turbo EA, https://github.com/vincentmakes/turbo-ea-capabilities, CC BY 4.0
sourceDescriptions:
- name: productsApi
  url: ../openapi/shopify-products-api-openapi.yml
  type: openapi
workflows:
- workflowId: archive-stale-product
  summary: Archive a product only if it is currently active, otherwise short circuit.
  description: >-
    Reads the product, archives it when active, and reads it back; ends cleanly
    when the product is already archived.
  inputs:
    type: object
    required:
    - productId
    properties:
      productId:
        type: integer
        description: The ID of the product to archive.
  steps:
  - stepId: getProduct
    description: >-
      Read the product and branch on its status so an already-archived product
      is left untouched.
    operationId: getProduct
    parameters:
    - name: product_id
      in: path
      value: $inputs.productId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      productId: $response.body#/product/id
      status: $response.body#/product/status
    onSuccess:
    - name: isActive
      type: goto
      stepId: archiveProduct
      criteria:
      - context: $response.body
        condition: $.product.status == "active"
        type: jsonpath
    - name: alreadyArchived
      type: end
      criteria:
      - context: $response.body
        condition: $.product.status != "active"
        type: jsonpath
  - stepId: archiveProduct
    description: Set the active product's status to archived.
    operationId: updateProduct
    parameters:
    - name: product_id
      in: path
      value: $steps.getProduct.outputs.productId
    requestBody:
      contentType: application/json
      payload:
        product:
          status: archived
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      status: $response.body#/product/status
  - stepId: confirmProduct
    description: Read the product back to confirm it is archived.
    operationId: getProduct
    parameters:
    - name: product_id
      in: path
      value: $inputs.productId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      status: $response.body#/product/status
      product: $response.body#/product
  outputs:
    productId: $steps.getProduct.outputs.productId
    status: $steps.confirmProduct.outputs.status
    product: $steps.confirmProduct.outputs.product

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/shopify-archive-stale-product-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.