Third party API

I’m sitting here at the support desk in NYC with a gentleman by the name of James Gates (WiX Suport NYC), I am the ‘webmaster’ for a couple of restaurants in the city who utilize Wix for their sites - (Love it!!)
I am re-creating third party booking forms in code! However, I need to transfer the information captured in the booking form for use by the third party software via API.
The company’s name is TRIPLESEAT, and their API uses OAUTH to authenticate requests.
I have no idea how to integrate this into the code form on my site, or to help my site communicate with TripeSeat via API.

My site’s URL: www.glasserieevents.com/submitionform It’s
It is password protected:
Here is the link to TripleSeat’s support for Lead Form API endpoint:

https://tripleseat.z endesk.com/hc/en-us/ articles/205161948-Lead-Form-API-endpoint

Thank you so much, from both myself and James!
Best,
Remy

1 Like

I fully support learning/being able to do this. I have had to let go of a number of highly potential restaurant and bar leads, including a major local chain, solely because of the fact that their POS system and kitchen printer and all the other little functionalities they wanted and were available from Wix, would not fully and properly integrate in the end. Having a standard way in place for these will at least provide some avenue so when such needs come up we can hope their other vendors also use best standards and solutions to allow for seamless integration.

By standard way I mean ACROSS all Wix and non-Wix app market apps and various functional elements and back-end all combined. I am aware some apps can already be integrated to some extent.

2 Likes

Following. Come on Wix, make life easier :stuck_out_tongue:

Hi Remi,

Send data to a third party API using wix-fetch
From what I saw in the link you provided you need to get a public API key and use it.

The endpoint URL should look something like

http://api.tripleseat.com/v1/leads/create.js?public_key=9abe42f759038eab352976e0ba0ad1512asdfasdf

And the code like

import {fetch} from 'wix-fetch';
// ...

fetch('http://api.tripleseat.com/v1/leads/create.js?public_key=[your public key]&lead[first_name]=Kevin&lead[last_name]=Zink...', {method: 'get'})
  .then( (httpResponse) => {
    if (httpResponse.ok) {
      return httpResponse.json();
    } else {
      return Promise.reject("Fetch did not succeed");
    }
  } ).then(json => console.log(json))
  .catch(err => console.log(err));

Place the code in the dataset afterSave event. That way the data is first stored in the site database and then sent to the third party.

1 Like

Hi @Shay, Is there a way to receive information from a third party into a database so that the database can be updated?