Shopify · Arazzo Workflow

Shopify Restock a Product Variant

Version 1.0.0

Read a variant to find its inventory item, resolve a location, and set the available quantity.

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

Provider

shopify

Workflows

restock-product-variant
Set a variant's available stock at the primary location by resolving its inventory item.
Resolves a variant's inventory item from the product, resolves the primary location, and sets the variant's available quantity there.
3 steps inputs: available, productId, variantId outputs: available, inventoryItemId, locationId
1
resolveVariant
List the product's variants and select the matching variant so its inventory item id can be used for the stock update.
2
resolveLocation
List the store's locations and use the first location as the target.
3
setLevel
Set the available quantity for the variant's inventory item at the resolved location.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Shopify Restock a Product Variant
  summary: Read a variant to find its inventory item, resolve a location, and set the available quantity.
  description: >-
    Restocks a specific product variant by quantity. The workflow lists the
    product's variants to resolve the variant's inventory item, lists locations
    to resolve the target location, and sets the available quantity for that
    inventory item at that location. This is the variant-centric entry point for
    keeping stock accurate. 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-530.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-530.10
      capability_name: Stock Level Management
      spec: shopify-inventory-levels-api-openapi.yml
      confidence: 0.85
    model: Turbo EA Capabilities by Vincent Verdet — Turbo EA, https://github.com/vincentmakes/turbo-ea-capabilities, CC BY 4.0
sourceDescriptions:
- name: inventoryLevelsApi
  url: ../openapi/shopify-inventory-levels-api-openapi.yml
  type: openapi
- name: locationsApi
  url: ../openapi/shopify-locations-api-openapi.yml
  type: openapi
- name: productVariantsApi
  url: ../openapi/shopify-product-variants-api-openapi.yml
  type: openapi
workflows:
- workflowId: restock-product-variant
  summary: Set a variant's available stock at the primary location by resolving its inventory item.
  description: >-
    Resolves a variant's inventory item from the product, resolves the primary
    location, and sets the variant's available quantity there.
  inputs:
    type: object
    required:
    - productId
    - variantId
    - available
    properties:
      productId:
        type: integer
        description: The product ID owning the variant.
      variantId:
        type: integer
        description: The variant ID to restock (matched within the product's variants).
      available:
        type: integer
        description: The absolute available quantity to set.
  steps:
  - stepId: resolveVariant
    description: >-
      List the product's variants and select the matching variant so its
      inventory item id can be used for the stock update.
    operationId: listProductVariants
    parameters:
    - name: product_id
      in: path
      value: $inputs.productId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      inventoryItemId: $response.body#/variants/0/inventory_item_id
  - stepId: resolveLocation
    description: List the store's locations and use the first location as the target.
    operationId: listLocations
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      locationId: $response.body#/locations/0/id
  - stepId: setLevel
    description: >-
      Set the available quantity for the variant's inventory item at the
      resolved location.
    operationId: setInventoryLevel
    requestBody:
      contentType: application/json
      payload:
        inventory_item_id: $steps.resolveVariant.outputs.inventoryItemId
        location_id: $steps.resolveLocation.outputs.locationId
        available: $inputs.available
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      available: $response.body#/inventory_level/available
      inventoryItemId: $response.body#/inventory_level/inventory_item_id
  outputs:
    inventoryItemId: $steps.resolveVariant.outputs.inventoryItemId
    locationId: $steps.resolveLocation.outputs.locationId
    available: $steps.setLevel.outputs.available

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-restock-product-variant-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.