Registration

Introduction

The Registration Workflow in Connect API allows users to create an identity and profiles. The workflow links new profiles to existing identities and third party identity providers (e.g. Facebook). Only single-step registration is supported but the workflow has been designed to allow for multiple steps in the future.

How It Works

Initialize specifies the Application being registered for and the IdentityProvider being used. Initialize validates the request and returns either an error message or a registration GUID. An asynchronous call is made to the IdentityProvider to pre-populate available information into the registration (e.g. FirstName from Facebook). It is recommended that the client cache registrationId so that registration may be resumed at a later point in time.

Supported types of Applications are:

  • 'Connect' - MINDBODY Connect
  • 'MindbodySubscriberConsumer' - MINDBODY Subscriber Consumer

Supported types of IdentityProviders are:

  • 'FacebookConnect' - Facebook for MINDBODY Connect
  • 'Mindbody' - MINDBODY Identity (default)
  • 'MindbodySubscriber' - MINDBODY Subscriber

Fetch retrieves registration step(s) given the registration GUID. If Initialize's asynchronous call to the IdentityProvider has not completed, registration state will remain "Initializing". The client may choose to wait and call Fetch again until the state becomes "Active" or allow the user to continue. If the client chooses to wait, a timeout is advised so that the user is not blocked from registration. Each step has a template and set of metadata fields which must be completed by the user. Metadata may contain pre-populated values from the IdentityProvider. Metadata specifies rules which commonly indicate if a field is required.

CompleteStep validates and saves completed registration steps. CompleteStep validates the metadata values and returns the registration (similar to Fetch). The client should check the status of each step. If a step is "Incomplete" a metadata value did not pass validation. Values that do not pass validation will be returned as null. If all steps are "Completed" and the registration state is "Complete", the registration is ready to be Finalized. It is recommended that the client cache username and password so that a user token can be retreived without prompting for credentials after the user has verified their e-mail.

Finalize sends out a verification e-mail if the IdentityProvider's e-mail is not trusted or does not match the e-mail the user is signing up with. Once the user receives the e-mail and clicks the link, Finalize creates the identity (if applicable) and profile. Registration is done.

How To Use It

  • Initialize

    • Initialize creates the registration for the Application using the IdentityProvider.
    • Request
      • POST Users/Registrations/Initialize
      • Header
        • Content Type = Application/json
        • Authorization = Bearer {Authorization Token}
      • Data
        • UserRegistrationRequest object
        • Example
    • Response
  • Fetch

    • Retrieves registration step(s) given the registration GUID
    • Request
    • Response
      • UserRegistration object
      • Example
  • CompleteStep

    • Validates and saves completed registration steps
    • Request
      • POST Users/Registrations/{registrationId}/CompleteStep
      • Header
        • Content Type = Application/json
        • Authorization = Bearer {Authorization Token}
      • Data
        • UserRegistrationStep object
        • Example
    • Response
      • UserRegistration object
      • Example
  • Finalize

    • Sends out a verification e-mail (if applicable). Otherwise, creates the identity and profile.
    • Request
    • Response
      • Status = 200 OK

Miscellaneous

Registration States

  • Initializing

    • Registration has been initialized and is ready to build first step
  • Active

    • Registration is active and ready
  • Abandoned

    • Registration has been abandoned and is no longer being worked on
  • Completed

    • Registration has passed validation and steps have been completed
  • Finalized

    • Registration has been finalized

Current Limitations

  • 7/24/2015

    • Supported Identity Providers: FacebookConnect, Mindbody, MindbodySubscriber

Helpful Links