Okay
  Public Ticket #3329038
API
Closed

Comments

  •  1
    netwerk started the conversation

    Hi,  is there an API in Amelia. If yes, is there documentation? 
    Zsolt

  •  1,303
    Marko replied

    Hello Zsolt,

    Thank you for reaching out to us.

    Unfortunately, no we do not have it. We have API Routes for Amelia, but most of them are protected and depend on the permissions that are set in WordPress Accounts. You can check those API Routes in our free version of Amelia. Amelia Lite is a free WordPress booking plugin that allows you to set up a fully-featured automated WordPress booking system on your website. It is a handy tool for small businesses and individuals that depend on stable appointment-booking processes. You can download it from this link.

    When you download the Lite version you can find all API Routes in this file ../wp-content/plugins/ameliabooking/src/Infrastructure/Routes/Routes.php

    At the moment we have some JavaScript hooks that trigger after confirm booking, before confirming booking...

    Kind Regards, 

    Marko Davidovic
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  •  1
    netwerk replied

    You say: "most of them are protected and depend on the permissions that are set in WordPress Accounts." We have a pro version. Can we use these routes? Do you have documentation? 

  •  1,303
    Marko replied

    Hello Zsolt,

    Not sure if this is possible but I will check this out just to be sure and as soon as I have more information I will contact you on this ticket. 

    Kind Regards, 

    Marko Davidovic
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  •  1,303
    Marko replied


    Hello Zsolt,

    We just got the feedback from our colleagues and they have told us that API Routes are available in a lite version and unfortunately we do not have any documentation related to this. 

    You can take a look at what hooks Amelia has. 

    Amelia currently has the following hooks:

    <script>
    window.ameliaActions = {
      ViewContent: function (success = null, error = null, data) {
        //triggered when the form loads
        console.log('ViewContent HOOK')
        console.log(data)
        console.log('------------')
      },
      SelectService: function (success = null, error = null, data) {
        //triggered when the service is selected/changed in the form
        console.log('SelectService HOOK')
        console.log(data)
        console.log('------------')
      },
      SelectEmployee: function (success = null, error = null, data) {
        //triggered when the employee is selected/changed in the form
        console.log('SelectEmployee HOOK')
        console.log(data)
        console.log('------------')
      },
      SelectLocation: function (success = null, error = null, data) {
        //triggered when the location is selected/changed in the form
        console.log('SelectLocation HOOK')
        console.log(data)
        console.log('------------')
      },
      SelectCategory: function (success = null, error = null, data) {
        //triggered when the category is selected/changed in the form
        console.log('SelectCategory HOOK')
        console.log(data)
        console.log('------------')
      },
      SelectPackage: function (success = null, error = null, data) {
        //triggered when the package is selected/changed in the form
        console.log('SelectPackage HOOK')
        console.log(data)
        console.log('------------')
      },
      InitiateCheckout: function (success = null, error = null, data) {
        //triggered once the customer lands on the "info" page where they fill in their details
        console.log('InitiateCheckout HOOK')
        console.log(data)
        console.log('------------')
      },
      Schedule: function (success = null, error = null, data) {
        //triggered once the 'on-site' booking is completed
        console.log('Schedule HOOK')
        console.log(data)
        console.log('------------')
      },
      Purchased: function (success = null, error = null, data) {
        //triggered once an online booking is completed
        console.log('Purchased HOOK')
        console.log(data)
        console.log('------------')
      },
      beforeBooking: function (success = null, error = null, data) {
        //triggered when the "Confirm" button is clicked but before the booking is completed.
        //This hook currently doesn't work for Mollie and WooCommerce payments
        console.log('Before booking is created HOOK')
        console.log(data)
        console.log('------------')
      },
    }
    </script>

    These are the same hooks used in Google Analytics and Facebook Pixel integrations, but if you need some other hooks added, please let us know which ones and explain what they would contain and when they should be triggered. 

    We wish you all the best.

    Have a nice day. 


    Kind Regards, 

    Marko Davidovic
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  •  1
    netwerk replied

    Is there any hook to modify the appointment date? 

    For example. In the following HTML I want to extend each timeslots to 90 minutes. 15:30 - 17:00. 15:35 - 17:05 etc. How can I filter theses slot items?

    Zsolt 

    <div class="am-advsc__slots-wrapper"><div class="am-advsc__slots-heading">2023-07-31 - 15:30</div><div class="am-advsc__slots"><div class="am-advsc__slots-item am-advsc__slots-item__selected"><div class="am-advsc__slots-item__inner">15:30  - 15:35</div></div><div class="am-advsc__slots-item"><div class="am-advsc__slots-item__inner">15:35  - 15:40</div></div><div class="am-advsc__slots-item"><div class="am-advsc__slots-item__inner">15:40  - 15:45</div></div><div class="am-advsc__slots-item"><div class="am-advsc__slots-item__inner">15:45  - 15:50</div></div><div class="am-advsc__slots-item"><div class="am-advsc__slots-item__inner">15:50  - 15:55</div></div><div class="am-advsc__slots-item"><div class="am-advsc__slots-item__inner">15:55  - 16:00</div></div><div class="am-advsc__slots-item"><div class="am-advsc__slots-item__inner">16:00  - 16:05</div></div><div class="am-advsc__slots-item"><div class="am-advsc__slots-item__inner">16:05  - 16:10</div></div><div class="am-advsc__slots-item"><div class="am-advsc__slots-item__inner">16:10  - 16:15</div></div><div class="am-advsc__slots-item"><div class="am-advsc__slots-item__inner">16:15  - 16:20</div></div><div class="am-advsc__slots-item"><div class="am-advsc__slots-item__inner">16:20  - 16:25</div></div><div class="am-advsc__slots-item"><div class="am-advsc__slots-item__inner">16:25  - 16:30</div></div><div class="am-advsc__slots-item"><div class="am-advsc__slots-item__inner">16:30  - 16:35</div></div><div class="am-advsc__slots-item"><div class="am-advsc__slots-item__inner">16:35  - 16:40</div></div><div class="am-advsc__slots-item"><div class="am-advsc__slots-item__inner">16:40  - 16:45</div></div><div class="am-advsc__slots-item"><div class="am-advsc__slots-item__inner">16:45  - 16:50</div></div><div class="am-advsc__slots-item"><div class="am-advsc__slots-item__inner">16:50  - 16:55</div></div><div class="am-advsc__slots-item"><div class="am-advsc__slots-item__inner">16:55  - 17:00</div></div></div></div>


  •  1,303
    Marko replied

    Hello again Zsolt,

    Once again I need to check and see if this is possible and as soon as I have more information I will contact you on this ticket. 

    Kind Regards, 

    Marko Davidovic
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  •  1,303
    Marko replied

    Hello again Zsolt,

    If you want those time slots to show in service length for example like this

    7530590763.png

    You just need to enable the option in general settings called

    Use service duration for booking a time slot and time slots will appear in service length that you have set

    4340662603.png

    Hope this helps. 

    Kind Regards, 

    Marko Davidovic
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables