Mindbody · Arazzo Workflow

Mindbody Session Type Book Appointment

Version 1.0.0

Discover session types, find a bookable slot, and book an appointment.

1 workflow 1 source API 1 provider
View Spec View on GitHub FitnessWellnessBeautySchedulingBookingPoint of SaleStudiosSalonsSpasWebhooksArazzoWorkflows

Provider

mindbody

Workflows

session-type-book-appointment
Discover session types, check availability, and book an appointment when open.
Lists the bookable session types, searches availabilities for the chosen session type, and books an appointment for the client when a slot is open.
3 steps inputs: apiKey, authorization, clientId, endDate, locationId, sessionTypeId, siteId, staffId, startDateTime outputs: appointmentId, sessionTypes
1
listSessionTypes
getSessionTypes
List the bookable session types offered by the site to confirm the session type catalog.
2
findAvailabilities
getBookableItems
Retrieve the bookable availabilities for the chosen session type and date range.
3
createAppointment
addAppointment
Book the appointment for the client into the open slot.

Source API Descriptions

Arazzo Workflow Specification

mindbody-session-type-book-appointment-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Mindbody Session Type Book Appointment
  summary: Discover session types, find a bookable slot, and book an appointment.
  description: >-
    An end-to-end appointment booking flow that starts from the studio's
    catalog. The workflow lists the bookable session types, finds an
    availability for the chosen session type and date range, branches on
    whether a slot is open, and books the appointment only when availability
    exists. Every step inlines the Mindbody API-Key, SiteId, and staff
    authorization headers along with its request body so the flow can be read
    and executed without opening the underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: mindbodyApi
  url: ../openapi/mindbody-public-api-v6-openapi-original.yml
  type: openapi
workflows:
- workflowId: session-type-book-appointment
  summary: Discover session types, check availability, and book an appointment when open.
  description: >-
    Lists the bookable session types, searches availabilities for the chosen
    session type, and books an appointment for the client when a slot is open.
  inputs:
    type: object
    required:
    - apiKey
    - siteId
    - authorization
    - sessionTypeId
    - clientId
    - locationId
    - staffId
    - startDateTime
    properties:
      apiKey:
        type: string
        description: The Mindbody-issued API key sent in the API-Key header.
      siteId:
        type: string
        description: The ID of the site from which to pull data and write records.
      authorization:
        type: string
        description: A staff user authorization (OAuth bearer) token.
      sessionTypeId:
        type: integer
        description: The session type to search and book.
      clientId:
        type: string
        description: The RSSID of the client the appointment is being made for.
      locationId:
        type: integer
        description: The ID of the location where the appointment takes place.
      staffId:
        type: integer
        description: The ID of the staff member providing the appointment.
      startDateTime:
        type: string
        description: The start date and time of the appointment / availability search.
      endDate:
        type: string
        description: The end date for the availability search.
  steps:
  - stepId: listSessionTypes
    description: >-
      List the bookable session types offered by the site to confirm the
      session type catalog.
    operationId: getSessionTypes
    parameters:
    - name: version
      in: path
      value: '6'
    - name: API-Key
      in: header
      value: $inputs.apiKey
    - name: siteId
      in: header
      value: $inputs.siteId
    - name: authorization
      in: header
      value: $inputs.authorization
    - name: request.onlineOnly
      in: query
      value: false
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      sessionTypes: $response.body#/SessionTypes
  - stepId: findAvailabilities
    description: >-
      Retrieve the bookable availabilities for the chosen session type and date
      range.
    operationId: getBookableItems
    parameters:
    - name: version
      in: path
      value: '6'
    - name: API-Key
      in: header
      value: $inputs.apiKey
    - name: siteId
      in: header
      value: $inputs.siteId
    - name: authorization
      in: header
      value: $inputs.authorization
    - name: request.sessionTypeIds
      in: query
      value: $inputs.sessionTypeId
    - name: request.startDate
      in: query
      value: $inputs.startDateTime
    - name: request.endDate
      in: query
      value: $inputs.endDate
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      availabilities: $response.body#/Availabilities
    onSuccess:
    - name: hasAvailability
      type: goto
      stepId: createAppointment
      criteria:
      - context: $response.body
        condition: $.Availabilities.length > 0
        type: jsonpath
    - name: noAvailability
      type: end
      criteria:
      - context: $response.body
        condition: $.Availabilities.length == 0
        type: jsonpath
  - stepId: createAppointment
    description: >-
      Book the appointment for the client into the open slot.
    operationId: addAppointment
    parameters:
    - name: version
      in: path
      value: '6'
    - name: API-Key
      in: header
      value: $inputs.apiKey
    - name: siteId
      in: header
      value: $inputs.siteId
    - name: authorization
      in: header
      value: $inputs.authorization
    requestBody:
      contentType: application/json
      payload:
        ClientId: $inputs.clientId
        LocationId: $inputs.locationId
        SessionTypeId: $inputs.sessionTypeId
        StaffId: $inputs.staffId
        StartDateTime: $inputs.startDateTime
        ApplyPayment: true
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      appointmentId: $response.body#/Appointment/Id
  outputs:
    sessionTypes: $steps.listSessionTypes.outputs.sessionTypes
    appointmentId: $steps.createAppointment.outputs.appointmentId