Discussions
Payment
Is there a way to add a payment section into waitwhile?
Posted by Jared Snyderman almost 3 years ago
What is the 'payload' when verifying webhook signature?
I'm looking at the documentation on how to verify the signature of a webhook, but I don't understand what the 'payload' should be in the example code:
function verifyWebhookSignature(signature, url, payload, secret) {
return signature == crypto.createHmac('sha256', secret).update(Buffer.from(url + payload, 'utf-8')).digest('base64');
}
Any help would be much appreciated!
Posted by Magne Skutle over 2 years ago
Search for specific visits
I am trying to search for a specific visit using API but I was not able to understand how can I trim the search result in the query tab.
"""
q
string
Search query, prefix match on name, phone, email, or customer identifier
"""
Can you please provide an example of how or what values I can pass in this "q"?
also, is It possible to search for a visit based on a data field that we have created?
Posted by ravi over 2 years ago
Documentation for POST v2/public/visits?
I had built myself a utility app to check in for appointments a while back, but it quit working somewhere within the last two months. I think a captcha was added which... well, maybe what I'm doing is exactly what it's meant to prevent. Is there a legitimate way to get my utility running again?
{"statusCode":403,"error":"Forbidden","message":"Recaptcha verification failed, no token provided"}
Posted by Jeff Turley over 2 years ago
CORS error while making API call
How do I whitelist my domain so the waitwhile server would not respond back with CORS error?
Code:
apikey: '<>',
apiUrl: 'https://api.waitwhile.com/v2/customers',
axios.post(this.apiUrl, data, {
headers: headers
})
.then((response) => {
console.log('Response - ');
console.log(response);
})
.catch((error) => {
console.log('Response Error - ');
console.log(error);
})
Error:
Access to XMLHttpRequest at 'https://api.waitwhile.com/v2/customers' from origin 'null' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Posted by Mathes Kanagarajan almost 2 years ago
Is there an intergration with Klaviyo?
Hello I am wondering if there's an integration with klaviyo in the works?
Posted by Ariel over 1 year ago
Adding location to service
Hi!
I was looking through your API docs for ways to add locations to existing services.
I've ended up solving this by POST-ing to /v2/services/{serviceId} with the new locationIds. While this works, it requires you to fetch the existing locationIds so you can append new IDs to the list. And while it's unlikely for our use case, this could lead to concurrency issues.
Is there some other way of patching services that I'm not seeing? Can I assign locations to services when creating them, e.g. with assignToServices? I'm having some trouble figuring out what these query params do, and how to use them.
Thanks! :)
Posted by Thomas H. over 1 year ago
Need to Update the each Location Calender date to some specifc start and end time
We are having many location, and some time, we required to adjust the working hours for all the store due to various occasion. Currently we are doing it manually which cause very huge effort. So we are looking for an API which can update each location's each queue with specific time update for a specific day.
Posted by SINAJ SALIM about 2 years ago
Invalid signature with Webhook
Hello,
We try to use webhook signature with NodeJs but it is always invalid. Can you confirm us expected parameter formats ?
Now, we use for example :
```typescript
const secret = 't5cU9SoudXtxfVRw1Z4wr9TS' // provide from webhook configuration. Here it's fake value
const signature = 'vI5Ut452kZyrZrmFIBq7Xu3mFPWr1g0sqlQZfU4ki1E' //provide header
const url = 'https://api-staging-eva-xxxx.eva.gg/my-webhook-url'//good format ?
const payload = '{\"id\":\"0TiYj71yYPBUNfppNB0E\",\"created\":\"2023-06-29T09:10:23.758Z\",\"accountId\":\"UpAwC7kELkvTCzFdA8fr\",\"type\":\"visit.created\",\"data\":{\"id\":\"cpnhrOit9OQ93HKInPTb\",\"locationId\":\"iQjqtEeWJ50DRaTv05OZ\",\"state\":\"WAITING\",\"customerId\":\"PmBgUqEPfVXzvcvFEs9AIR\",\"firstName\":\"Pierre\",\"lastName\":\"Marais\",\"name\":\"Pierre Marais\",\"phone\":\"+33621626157\",\"email\":\"[email protected]\",\"externalCustomerId\":\"\",\"notes\":\"\",\"publicId\":\"cpnhrO\",\"isAnonymized\":false,\"created\":\"2023-06-29T09:10:23.587Z\",\"createdBy\":\"QK09NV3HImXelgH9J73YrkXWGX03\",\"updated\":\"2023-06-29T09:10:23.587Z\",\"updatedBy\":\"QK09NV3HImXelgH9J73YrkXWGX03\",\"pendingExpireTime\":null,\"remoteIp\":\"82.216.37.75\",\"country\":\"FR\",\"region\":\"bre\",\"city\":\"rennes\",\"isBlock\":false,\"source\":\"WEB-APP\",\"locale\":\"fr-FR\",\"partySize\":1,\"resources\":{},\"resourceIds\":[],\"services\":{},\"serviceIds\":[],\"fields\":{\"ulPPzfE7de2QaHYz9Si6\":[\"test\"],\"skdOlHhyAik7BcdhJBSd\":[true]},\"dataFields\":[{\"id\":\"ulPPzfE7de2QaHYz9Si6\",\"values\":[\"test\"]},{\"id\":\"skdOlHhyAik7BcdhJBSd\",\"values\":[true]}],\"tags\":[],\"waitlistTime\":\"2023-06-29T09:10:23.587Z\",\"bookingReminderSmsTime\":null,\"bookingReminderEmailTime\":null,\"bookingReminderAppTime\":null,\"followUpSmsTime\":null,\"followUpEmailTime\":null,\"followUpAppTime\":null,\"ngrams\":[\"pie\",\"pier\",\"pierr\",\"pierre\",\"mar\",\"mara\",\"marai\",\"marais\",\"336\",\"3362\",\"33621\",\"336216\",\"3362162\",\"33621626\",\"336216261\",\"3362162615\",\"33621626157\",\"062\",\"0621\",\"06216\",\"062162\",\"0621626\",\"06216261\",\"062162615\",\"0621626157\",\"piem\",\"piema\",\"piemar\",\"piemara\",\"piemarai\",\"piemarais\",\"wai\",\"wait\",\"wait3\",\"gma\",\"gmai\",\"gmail\",\"com\",\"a048\",\"p:1\",\"r:\",\"d:ulPPzfE7de2QaHYz9Si6=test\",\"d:skdOlHhyAik7BcdhJBSd=true\"],\"estWaitDuration\":0,\"position\":1,\"lastWaitingPosition\":1,\"originalPosition\":1,\"ticket\":\"A048\",\"numVisits\":16,\"prevEstWaitDuration\":0,\"originalEstWaitDuration\":0}}'
// we get payload with json.stringify(req.body) we already try to get payload from req.body only
return (
signature ===
crypto
.createHmac('sha256', secret)
.update(Buffer.from(url + payload, 'utf-8'))
.digest('base64')
);
```
Posted by Pierre Marais 10 months ago
Captcha verification
Hello, I am trying to sign join the waitwhile list and it is saying that captcha verification failed, but there was no option to verify it.
Posted by SoSo Stra about 1 year ago