I receive this message : {"message":"You are not allowed to update booking status"}
I just wanted to try a GET without bothering with AJAX POST CALL.
It would be really appreciated by the community if you could share an example of how to call properly the API either with CURL or thru jquery or other ways.
I commented temporarily this block : if (!$customerAS->isCustomerBooking($booking, $user, $command->getField('token'))) and then the GET request did cancel that appointment
I checked the status of your ticket and this has been forwarded to our developers. As soon as we get feedback from them we will contact on this ticket.
We just got the feedback from our developers and they have told us that this URL requires a token to be sent with it... this token is generated when the link is generated, and is sent in notifications and webHooks... it should also be found via the WordPress action "AmeliaBookingAdded" after the booking is triggered.
function ameliaBookingAddedMethod($reservation, $bookings, $container) {
// inspect $bookings for Cancel Url
}
add_action( 'AmeliaBookingAdded', 'ameliaBookingAddedMethod' );
We just got the feedback from our colleagues and they have told us to ask you to please check that you are not accidentally using the Hook that we sent you the first time?
So you should not use this one: AmeliaBookingAdded but this one: AmeliaAppointmentBookingAdded.
Hello,
I know you don't want to provide documentation for your API just yet but I need to know if it can do the job before buying the full version.
I am trying to cancel an appointment, when I go this URL :
https://mysite.com/wp-admin/admin-ajax.php?action=wpamelia_api&call=/bookings/cancel/2
I receive this message : {"message":"You are not allowed to update booking status"}
I just wanted to try a GET without bothering with AJAX POST CALL.
It would be really appreciated by the community if you could share an example of how to call properly the API either with CURL or thru jquery or other ways.
Thank you in advance
I commented temporarily this block : if (!$customerAS->isCustomerBooking($booking, $user, $command->getField('token'))) and then the GET request did cancel that appointment
Hello Pierre,
We have forwarded this ticket to our level to agents to check if we can help you with this.
As soon as we get feedback from them we will contact you on this ticket.
Kind Regards,
Marko Davidovic
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia 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
Hello Pierre,
I checked the status of your ticket and this has been forwarded to our developers. As soon as we get feedback from them we will contact on this ticket.
We wish you all the best.
Have a nice day.
Kind Regards,
Marko Davidovic
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia 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
Hello Pierre,
We just got the feedback from our developers and they have told us that this URL requires a token to be sent with it... this token is generated when the link is generated, and is sent in notifications and webHooks... it should also be found via the WordPress action "AmeliaBookingAdded" after the booking is triggered.
We wish you all the best.
Have a nice day.
Kind Regards,
Marko Davidovic
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia 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
Thank you Marko.
Can you please be a bit more precise on the token location? Is it in $container in the hook mentioned?
I have tried to append &token=XXX from the customer portal URL sent to the customer but it does not work like this :
https://mysite.com/wp-admin/admin-ajax.php?action=wpamelia_api&call=/bookings/cancel/2&token=XXX
Hello Pierre,
I can only forward this again to our developers and when I get feedback from them I can contact you again on this ticket.
Kind Regards,
Marko Davidovic
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia 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
Hello Pierre,
We just got the feedback from our colleagues and they have told us that you can try and use this hook
And token and cancel URL cre in "$bookings[0]".
If you have any more questions please open a new separate ticket for each question and we will gladly help you there.
We wish you all the best.
Have a nice day.
Kind Regards,
Marko Davidovic
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia 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
Thank you, I did check again in the 3 variables and i do not see anything...
In the bookings parameter there is no cancel url, there is a token label but it is empty as you can see below :
[04-May-2023 05:38:03 UTC] bookings: Array
(
[0] => Array
(
[id] => 55
[customerId] => 13
[customer] =>
[status] => approved
[extras] => Array
(
)
[couponId] =>
[price] => 0
[coupon] =>
[customFields] => {"2":{"label":"Ethnicity","type":"select","value":""},"5":{"label":"Address","type":"text-area","value":""},"6":{"label":"Reason","type":"text-area","value":"km"},"7":{"label":"Name of child (if booking for one)","type":"text","value":""},"8":{"label":"DOB of child (if booking for one)","type":"datepicker","value":""}}
[info] => {"firstName":"Pie","lastName":"Bi","phone":"444","locale":"en_US","timeZone":"America\/Cancun","urlParams":null}
[appointmentId] => 47
[persons] => 1
[token] =>
[payments] => Array
(
[0] => Array
(
[id] => 55
[customerBookingId] => 55
[packageCustomerId] =>
Hello Pierre,
I can only forward this again to our developers again and when I get feedback from them I can contact you again on this ticket.
Kind Regards,
Marko Davidovic
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia 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
Hello Pierre,
We just got the feedback from our colleagues and they have told us to ask you to please check that you are not accidentally using the Hook that we sent you the first time?
So you should not use this one: AmeliaBookingAdded but this one: AmeliaAppointmentBookingAdded.
Looking forward to your reply.
Kind Regards,
Marko Davidovic
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia 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