Filters for booking widget like the one for product widget

Question:
[via velo, Is it possible to create filters like the ones available for products but for booking?]

Product:
[Wix Editor]

What are you trying to achieve:
[I want the filters for service booking categories to appear as the filters for products. it looks better for the website and it might help the SEO]

What have you already tried:
[I tried playing with the available features on the for booking but non work]

Additional information:
[this is how the therapist want their profiles to be looked up on the website. They dont like the tab feature available on the booking services feature

Hi @Waves_Galore, yes, it can be done with a combination for REST and Velo APIs.
First, let’s get the categories.
For this you need to use the List | REST REST API as there is no matching API for Velo yet.
To use REST API, create an API key and store in your secret vault. See please API Keys
Now you need to get the categories.
Here is the code example for making an API call to extract the categories.

    const request = buildRequest('POST', '<API_KEY>');
   
// Using the fetch API to make the actual API call
    return fetch('https://bookings.wix.com/_api/services-server/v1/categories', request)
        .then(response => response.json())
        .then(data => {
            // Handle your data here
            console.log(data);
        })
        .catch(error => {
            console.error('Error fetching bookings:', error);
        });

function buildRequest(method, apiKey) {
    return {
        method: method,
        headers: {
            'Content-Type': 'application/json',
            Authorization: accessToken,
            'wix-account-id': OWNER_ACCOUNT_ID,
            'wix-site-id': META_SITE_ID_AKA_MSID,
        }
    };
}

After we got the category list, you can put the data into a repeater and them based on clicked item’s data, you can get the services:

import { services } from 'wix-bookings.v2';

export async function queryServices() {
  const result = (await services.queryServices()
  .eq('category.id', '968f05b2-7685-4aca-b37e-5e8e62898f37')
  .find()).items;
  console.log('result:', result);
  return result;
}

Cheers!

Hey, @jacobg
Thank you so much for the reply. I wish I saw this sooner. I ended up using dynamic pages to see if it helps with the websites performance as well. Also, since they are professional service providers, I’m thinking that maybe google will help them be found better with dynamics. So, I ended up using the filters they have there. It doesn’t look as chic but hopefully it will help the performance. However, after changing everything and deleting the products and pages not used, I’m noticing that the impressions and clicks went down on the google search. :frowning: