Block · Arazzo Workflow

Block Square Catalog Browse And Order Verify

Version 1.0.0

Browse catalog items, open an order, and branch on whether the order is OPEN.

1 workflow 2 source APIs 1 provider
View Spec View on GitHub CommerceCryptocurrencyE-CommerceFintechPaymentsPoint-of-SaleSquareArazzoWorkflows

Provider

block

Workflows

catalog-browse-and-order-verify
List catalog items, create an order, and branch on the order state.
Lists catalog ITEM objects, opens an order at the location with the supplied line items, and branches on whether the order returned in the OPEN state so a caller knows it is ready to be paid.
2 steps inputs: accessToken, catalogTypes, lineItems, locationId, orderIdempotencyKey outputs: firstItemId, orderId, orderState
1
listCatalog
List catalog objects of the requested types to source the order.
2
createOrder
Open an order with the supplied line items and check its state.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Block Square Catalog Browse And Order Verify
  summary: Browse catalog items, open an order, and branch on whether the order is OPEN.
  description: >-
    A catalog browse with an order state check. The workflow lists catalog
    items, opens an order at the location, and then branches on whether the
    returned order is in the OPEN state, ready for payment. Each step inlines its
    bearer token and request body, including the idempotency key Square requires
    on the order write.
  version: 1.0.0
sourceDescriptions:
- name: catalogApi
  url: ../openapi/block-catalog-api-openapi.yml
  type: openapi
- name: ordersApi
  url: ../openapi/block-orders-api-openapi.yml
  type: openapi
workflows:
- workflowId: catalog-browse-and-order-verify
  summary: List catalog items, create an order, and branch on the order state.
  description: >-
    Lists catalog ITEM objects, opens an order at the location with the supplied
    line items, and branches on whether the order returned in the OPEN state so a
    caller knows it is ready to be paid.
  inputs:
    type: object
    required:
    - accessToken
    - locationId
    - lineItems
    properties:
      accessToken:
        type: string
        description: Square access token presented as a Bearer credential.
      locationId:
        type: string
        description: The seller location the order is associated with.
      catalogTypes:
        type: string
        description: Comma-separated list of CatalogObject types to return.
        default: ITEM
      lineItems:
        type: array
        description: Order line items, each with a name, quantity, and base_price_money.
        items:
          type: object
      orderIdempotencyKey:
        type: string
        description: Idempotency key for the create-order request.
  steps:
  - stepId: listCatalog
    description: List catalog objects of the requested types to source the order.
    operationId: list-catalog
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.accessToken
    - name: types
      in: query
      value: $inputs.catalogTypes
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      firstItemId: $response.body#/objects/0/id
  - stepId: createOrder
    description: Open an order with the supplied line items and check its state.
    operationId: create-order
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.accessToken
    requestBody:
      contentType: application/json
      payload:
        idempotency_key: $inputs.orderIdempotencyKey
        order:
          location_id: $inputs.locationId
          line_items: $inputs.lineItems
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      orderId: $response.body#/order/id
      orderState: $response.body#/order/state
      orderTotal: $response.body#/order/total_money
    onSuccess:
    - name: orderOpen
      type: end
      criteria:
      - context: $response.body
        condition: $.order.state == "OPEN"
        type: jsonpath
    - name: orderNotOpen
      type: end
      criteria:
      - context: $response.body
        condition: $.order.state != "OPEN"
        type: jsonpath
  outputs:
    firstItemId: $steps.listCatalog.outputs.firstItemId
    orderId: $steps.createOrder.outputs.orderId
    orderState: $steps.createOrder.outputs.orderState

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/block-catalog-browse-and-order-verify-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.