Commerce Layer · Arazzo Workflow

Commerce Layer Guest Order Add Line Item and Place

Version 1.0.0

Open a guest order, add a SKU line item, then place the order in one flow.

1 workflow 1 source API 1 provider
View Spec View on GitHub Headless CommerceComposable CommerceAPI-FirstE-CommerceJSON:APIAuthenticationMulti-MarketMulti-CurrencyB2CB2BSubscriptionPromotionsInventoryOrder ManagementCheckoutArazzoWorkflows

Provider

commerce-layer

Workflows

guest-order-add-line-item-place
Open a guest order, add a line item, and place it.
Creates a guest order with a customer email, adds a SKU line item, then patches the order with the documented _place flag to submit it.
3 steps inputs: accessToken, customerEmail, marketId, quantity, skuCode outputs: lineItemId, orderId, status
1
createGuestOrder
POST/orders
Open a guest order in the market with the customer email.
2
addLineItem
POST/line_items
Add a SKU line item to the guest order.
3
placeOrder
PATCH/orders/orderId
Toggle the documented _place transition flag to submit the order.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Commerce Layer Guest Order Add Line Item and Place
  summary: Open a guest order, add a SKU line item, then place the order in one flow.
  description: >-
    A streamlined Commerce Layer guest checkout flow. The workflow opens a guest
    order in a market with a customer email, adds a SKU line item, and then
    patches the order with the documented _place transition flag to submit it.
    Every step spells out its JSON:API request inline so the flow can be read and
    executed without opening the underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: coreApi
  url: ../openapi/commerce-layer-core-api-openapi.json
  type: openapi
workflows:
- workflowId: guest-order-add-line-item-place
  summary: Open a guest order, add a line item, and place it.
  description: >-
    Creates a guest order with a customer email, adds a SKU line item, then
    patches the order with the documented _place flag to submit it.
  inputs:
    type: object
    required:
    - accessToken
    - marketId
    - customerEmail
    - skuCode
    - quantity
    properties:
      accessToken:
        type: string
        description: Bearer access token for the Commerce Layer organization.
      marketId:
        type: string
        description: The id of the market the order belongs to.
      customerEmail:
        type: string
        description: The guest customer email for the order.
      skuCode:
        type: string
        description: The SKU code to add as a line item.
      quantity:
        type: integer
        description: The quantity of the SKU to add.
  steps:
  - stepId: createGuestOrder
    description: Open a guest order in the market with the customer email.
    operationId: POST/orders
    parameters:
    - name: Authorization
      in: header
      value: "Bearer $inputs.accessToken"
    requestBody:
      contentType: application/vnd.api+json
      payload:
        data:
          type: orders
          attributes:
            guest: true
            customer_email: $inputs.customerEmail
          relationships:
            market:
              data:
                type: markets
                id: $inputs.marketId
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      orderId: $response.body#/data/id
  - stepId: addLineItem
    description: Add a SKU line item to the guest order.
    operationId: POST/line_items
    parameters:
    - name: Authorization
      in: header
      value: "Bearer $inputs.accessToken"
    requestBody:
      contentType: application/vnd.api+json
      payload:
        data:
          type: line_items
          attributes:
            sku_code: $inputs.skuCode
            quantity: $inputs.quantity
          relationships:
            order:
              data:
                type: orders
                id: $steps.createGuestOrder.outputs.orderId
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      lineItemId: $response.body#/data/id
  - stepId: placeOrder
    description: Toggle the documented _place transition flag to submit the order.
    operationId: PATCH/orders/orderId
    parameters:
    - name: Authorization
      in: header
      value: "Bearer $inputs.accessToken"
    - name: orderId
      in: path
      value: $steps.createGuestOrder.outputs.orderId
    requestBody:
      contentType: application/vnd.api+json
      payload:
        data:
          type: orders
          id: $steps.createGuestOrder.outputs.orderId
          attributes:
            _place: true
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      status: $response.body#/data/attributes/status
  outputs:
    orderId: $steps.createGuestOrder.outputs.orderId
    lineItemId: $steps.addLineItem.outputs.lineItemId
    status: $steps.placeOrder.outputs.status

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/commerce-layer-guest-order-add-line-item-place-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 email required.

A second provider on the same verified email joins the account you already have.