Commerce Layer · Arazzo Workflow

Commerce Layer Create Customer with Address Book Entry

Version 1.0.0

Create a customer, create an address, and link it as a customer address book entry.

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

create-customer-with-address-book
Create a customer and add an address book entry.
Creates a customer, creates an address, then links them with a customer address book entry.
3 steps inputs: accessToken, city, countryCode, email, line1, phone outputs: addressId, customerAddressId, customerId
1
createCustomer
POST/customers
Create the customer record.
2
createAddress
POST/addresses
Create the address resource.
3
linkCustomerAddress
POST/customer_addresses
Link the customer and address with a customer address book entry.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Commerce Layer Create Customer with Address Book Entry
  summary: Create a customer, create an address, and link it as a customer address book entry.
  description: >-
    The Commerce Layer customer address book setup flow. The workflow creates a
    customer, creates a reusable address resource, and links the two by creating
    a customer address that references both. 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: create-customer-with-address-book
  summary: Create a customer and add an address book entry.
  description: >-
    Creates a customer, creates an address, then links them with a customer
    address book entry.
  inputs:
    type: object
    required:
    - accessToken
    - email
    - line1
    - city
    - countryCode
    - phone
    properties:
      accessToken:
        type: string
        description: Bearer access token for the Commerce Layer organization.
      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.
    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 the address resource.
    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 customer and address with a customer 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
  outputs:
    customerId: $steps.createCustomer.outputs.customerId
    addressId: $steps.createAddress.outputs.addressId
    customerAddressId: $steps.linkCustomerAddress.outputs.customerAddressId

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-with-address-book-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.