Commerce Layer · Arazzo Workflow

Commerce Layer Create Customer, Address, and Order

Version 1.0.0

Onboard a customer, save a customer address book entry, then open an order for them.

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

Provider

commerce-layer

Workflows

create-customer-address-order
Create a customer, attach an address, and open an order for them.
Creates a customer, creates an address and links it to the customer, then creates a draft order in the supplied market associated with the customer.
4 steps inputs: accessToken, city, countryCode, email, line1, marketId, phone outputs: addressId, customerAddressId, customerId, orderId
1
createCustomer
Create the customer record from the supplied email.
2
createAddress
Create a reusable address resource for the customer.
3
linkCustomerAddress
Link the address to the customer as an address book entry.
4
createOrder
Open a draft order in the market for the new customer.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Commerce Layer Create Customer, Address, and Order
  summary: Onboard a customer, save a customer address book entry, then open an order for them.
  description: >-
    A customer onboarding flow for Commerce Layer. The workflow creates a
    customer record, creates a reusable address, links that address to the
    customer as a customer address book entry, and finally opens a draft order
    in a market tied to the new customer. 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
  x-realizes-capability-ids:
  - BC-420.10
  - 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-420.10
      capability_name: Customer Data Management
      spec: commerce-layer-customers-api-openapi.yml
      confidence: 0.85
    - capability_id: BC-520.40
      capability_name: Order Fulfilment Management
      spec: commerce-layer-orders-api-openapi.yml
      confidence: 0.7
    model: Turbo EA Capabilities by Vincent Verdet — Turbo EA, https://github.com/vincentmakes/turbo-ea-capabilities, CC BY 4.0
sourceDescriptions:
- name: addressesApi
  url: ../openapi/commerce-layer-addresses-api-openapi.yml
  type: openapi
- name: customerAddressesApi
  url: ../openapi/commerce-layer-customer-addresses-api-openapi.yml
  type: openapi
- name: customersApi
  url: ../openapi/commerce-layer-customers-api-openapi.yml
  type: openapi
- name: ordersApi
  url: ../openapi/commerce-layer-orders-api-openapi.yml
  type: openapi
workflows:
- workflowId: create-customer-address-order
  summary: Create a customer, attach an address, and open an order for them.
  description: >-
    Creates a customer, creates an address and links it to the customer, then
    creates a draft order in the supplied market associated with the customer.
  inputs:
    type: object
    required:
    - accessToken
    - marketId
    - email
    - line1
    - city
    - countryCode
    - phone
    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.
      email:
        type: string
        description: The customer email address.
      line1:
        type: string
        description: First line of the street address.
      city:
        type: string
        description: City of the address.
      countryCode:
        type: string
        description: Two-letter country code of the address.
      phone:
        type: string
        description: Phone number for the address.
  steps:
  - stepId: createCustomer
    description: Create the customer record from the supplied email.
    operationId: POST/customers
    parameters:
    - name: Authorization
      in: header
      value: "Bearer $inputs.accessToken"
    requestBody:
      contentType: application/vnd.api+json
      payload:
        data:
          type: customers
          attributes:
            email: $inputs.email
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      customerId: $response.body#/data/id
  - stepId: createAddress
    description: Create a reusable address resource for the customer.
    operationId: POST/addresses
    parameters:
    - name: Authorization
      in: header
      value: "Bearer $inputs.accessToken"
    requestBody:
      contentType: application/vnd.api+json
      payload:
        data:
          type: addresses
          attributes:
            line_1: $inputs.line1
            city: $inputs.city
            country_code: $inputs.countryCode
            phone: $inputs.phone
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      addressId: $response.body#/data/id
  - stepId: linkCustomerAddress
    description: Link the address to the customer as an address book entry.
    operationId: POST/customer_addresses
    parameters:
    - name: Authorization
      in: header
      value: "Bearer $inputs.accessToken"
    requestBody:
      contentType: application/vnd.api+json
      payload:
        data:
          type: customer_addresses
          attributes:
            customer_email: $inputs.email
          relationships:
            customer:
              data:
                type: customers
                id: $steps.createCustomer.outputs.customerId
            address:
              data:
                type: addresses
                id: $steps.createAddress.outputs.addressId
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      customerAddressId: $response.body#/data/id
  - stepId: createOrder
    description: Open a draft order in the market for the new customer.
    operationId: POST/orders
    parameters:
    - name: Authorization
      in: header
      value: "Bearer $inputs.accessToken"
    requestBody:
      contentType: application/vnd.api+json
      payload:
        data:
          type: orders
          attributes:
            customer_email: $inputs.email
          relationships:
            market:
              data:
                type: markets
                id: $inputs.marketId
            customer:
              data:
                type: customers
                id: $steps.createCustomer.outputs.customerId
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      orderId: $response.body#/data/id
  outputs:
    customerId: $steps.createCustomer.outputs.customerId
    addressId: $steps.createAddress.outputs.addressId
    customerAddressId: $steps.linkCustomerAddress.outputs.customerAddressId
    orderId: $steps.createOrder.outputs.orderId

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-create-customer-address-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.