Shopify · Arazzo Workflow

Shopify Cancel and Restock an Order

Version 1.0.0

Confirm an order, cancel it with a reason and restock, then read the cancelled order back.

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

Provider

shopify

Workflows

cancel-and-restock-order
Cancel an order with restock and confirm the cancellation.
Confirms the order, cancels it with a reason and restock, and reads the order back to confirm the cancellation.
3 steps inputs: email, orderId, reason, restock outputs: cancelReason, cancelledAt, orderId
1
confirmOrder
Read the order to confirm it exists before cancelling.
2
cancelOrder
Cancel the order with a documented reason, restocking items and emailing the customer per the supplied flags.
3
getOrder
Read the order back to confirm the cancellation reason and timestamp.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Shopify Cancel and Restock an Order
  summary: Confirm an order, cancel it with a reason and restock, then read the cancelled order back.
  description: >-
    Handles an order cancellation cleanly. The workflow reads the order to
    confirm it exists and is cancellable, cancels it with a documented reason
    while restocking items and emailing the customer, and then reads the order
    back so the caller can confirm the cancellation timestamp and reason. 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-520.40
  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-520.40
      capability_name: Order Fulfilment Management
      spec: shopify-orders-api-openapi.yml
      confidence: 0.78
    model: Turbo EA Capabilities by Vincent Verdet — Turbo EA, https://github.com/vincentmakes/turbo-ea-capabilities, CC BY 4.0
sourceDescriptions:
- name: ordersApi
  url: ../openapi/shopify-orders-api-openapi.yml
  type: openapi
workflows:
- workflowId: cancel-and-restock-order
  summary: Cancel an order with restock and confirm the cancellation.
  description: >-
    Confirms the order, cancels it with a reason and restock, and reads the
    order back to confirm the cancellation.
  inputs:
    type: object
    required:
    - orderId
    properties:
      orderId:
        type: integer
        description: The ID of the order to cancel.
      reason:
        type: string
        description: Cancellation reason (customer, fraud, inventory, declined, or other).
        default: customer
      email:
        type: boolean
        description: Whether to send a cancellation email to the customer.
        default: true
      restock:
        type: boolean
        description: Whether to restock the order's items.
        default: true
  steps:
  - stepId: confirmOrder
    description: Read the order to confirm it exists before cancelling.
    operationId: getOrder
    parameters:
    - name: order_id
      in: path
      value: $inputs.orderId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      orderId: $response.body#/order/id
      cancelledAt: $response.body#/order/cancelled_at
  - stepId: cancelOrder
    description: >-
      Cancel the order with a documented reason, restocking items and emailing
      the customer per the supplied flags.
    operationId: cancelOrder
    parameters:
    - name: order_id
      in: path
      value: $steps.confirmOrder.outputs.orderId
    requestBody:
      contentType: application/json
      payload:
        reason: $inputs.reason
        email: $inputs.email
        restock: $inputs.restock
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      cancelledOrderId: $response.body#/order/id
  - stepId: getOrder
    description: Read the order back to confirm the cancellation reason and timestamp.
    operationId: getOrder
    parameters:
    - name: order_id
      in: path
      value: $inputs.orderId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      cancelledAt: $response.body#/order/cancelled_at
      cancelReason: $response.body#/order/cancel_reason
      order: $response.body#/order
  outputs:
    orderId: $steps.confirmOrder.outputs.orderId
    cancelledAt: $steps.getOrder.outputs.cancelledAt
    cancelReason: $steps.getOrder.outputs.cancelReason

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-cancel-and-refund-order-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.