Catalog Service Pricing Option Search

Introduction

Catalog searching for Service Pricing Option is very similar to the ‘generic’ catalog searching for items, with the difference being that you will either pass in an AppointmentSearchDefiniton, or a specific Instance ID of a Class or Enrollment and a type to find the Service Pricing Option that can pay for them.

See Searchable Service Category Types for a complete list.

How It Works

New endpoints had to be built to be able to search for Service Pricing Option, as the previous catalog searching endpoints uses OData queries and not predefined search definitions.

Other than that, it works very similarly to Catalog Search in that the search results are built asynchronously and you would first post your search request, then get your results via another API call.

While the results are being built, any validation, masking, or filtering of items due to user permissions and such will be taken into account.

How To Use It

Catalog searching for Service Pricing Options that can pay for an appointment is done by passing a search definition into the Appointment search, or the specific ID and Type to the instance search endpoint.

For example, to find service pricing options that can pay for appointments, I would pass an AppointmentSearchDefinition object into the Sales/{subscriberId}/Catalog/Search/Services/Appointments/PaymentMethods endpoint.

If I wanted to find service pricing options that could pay for specific class or enrollment, I would pass the service type (class or enrollment) along with the specific instance of that service to the Sales/{subscriberId}/Catalog/Search/Services/{ServiceCategoryType}/{InstanceId}/PaymentMethods endpoint.

Example for finding Service Pricing Options that can pay for appointments.

  • Post Search Request

    • Request
      • POST Sales/{subscriberId}/Catalog/Search/Services/Appointments/PaymentMethods
      • Type = POST
      • Header
        • Content Type = Application/json
        • Authorization = Bearer {Authorization Token}
      • Data
        • AppointmentSearchDefinition object
          {
            "Start": "2015-01-29T15:29:26.7080553-08:00",
            "End": "2018-01-29T15:29:26.7080553-08:00",
            "StaffId": 100000007,
            "LocationId": 1,
            "SessionTypeId": 34
          }
          
          
    • Response
      • {
            "RequestId": "deafc970-db4c-4378-adf8-f2d9c9efe885",
            "ExpiresIn": 900
        }
        
  • Get search results

    • Request
      • GET Sales/{subscriberId}/Catalog/Search/Services/deafc970-db4c-4378-adf8-f2d9c9efe885
      • Type = GET
      • Header
        • Content Type = Application/json
        • Authorization = Bearer {Authorization Token}
      • Data = NULL
    • Response

Example for finding Service Pricing Options that can pay for a specific class instance

  • Post Search Request

    • Request
      • POST Sales/{subscriberId}/Catalog/Search/Services/Class/3193/PaymentMethods
      • Type = POST
      • Header
        • Content Type = Application/json
        • Authorization = Bearer {Authorization Token}
      • Data = NULL
    • Response
      • {
            "RequestId": "6cc11525-2b98-413c-96c5-a2b6e5c62857",
            "ExpiresIn": 900
        }
        
  • Get search results

    • Request
      • GET Sales/{subscriberId}/Catalog/Search/Services/6cc11525-2b98-413c-96c5-a2b6e5c62857
      • Type = GET
      • Header
        • Content Type = Application/json
        • Authorization = Bearer {Authorization Token}
      • Data = NULL
    • Response

Miscellaneous

Searchable Service Category Types

The searchable service category types to pass into the route of the service pricing option for a specific instance search call are:

  • Class
  • Appointment
  • Enrollment

For example, if I wanted to search for service pricing options that can pay for an enrollment, I would pass "Enrollment" into the search route as: .../Sales/{subscriberId}/Catalog/Search/Services/Enrollment/{InstanceId}/PaymentMethods

If I wanted to search for service pricing options that could pay for a specific class I would set the route as:
.../Sales/{subscriberId}/Catalog/Search/Services/Class/{InstanceId}/PaymentMethods
and if I wanted to search against a specific appointment my route would be:
.../Sales/{subscriberId}/Catalog/Search/Services/Appointment/{InstanceId}/PaymentMethods

AppointmentSearchDefinition

The AppointmentSearchDefinition is used to search for Service Pricing Options that can pay for appointments

  • Start
    • DateTime
    • Start date and time of the appointments
  • End
    • DateTime
    • End date and time of the appointments
  • StaffId
    • Int
    • Trainer ID of the appointments
  • LocationId
    • Int
    • Location ID of the appointments
  • SessionTypeId
    • Int
    • Session Type ID of the appointments.