Working with external APIs

Prelim connects to whatever API you need for your customer experience. External API calls can be added to forms so that forms can seamlessly transfer data in and out of the application experience of any user.

Connections are where you set up the base url to be called out too, as well as the authentication specific to that API.

Interactions are where you can setup specific API calls that will be used in the forms.

Creating a connection

🚧

Special Permission Required

To create and modify connections you will need the right permission on your role.

  1. To setup that external connection, the first step is creating an interaction!
1249
  1. Next let's fill the basic information about the api.
1474
  1. If there's any authentication that's needed for this API, we can add it to the authentication options.
1474

Creating an interaction

Now that we've create a connection, we'll need to make an interaction for the actual API call itself.

🚧

Special Permission Required

To create and modify interactions you will need the right permission on your role.

  1. First let's make the interaction.
1474
  1. Let's make sure to fill in the interaction with the route, the connection, etc.
1474

As you can see from the above, to create a post request to https://example.com/car with a body of { "foo": "cdr" }, we've filled in the path and the body.

Adding to a form

Now that we've created the form we can add the interaction to the form so that a user walking through the form can trigger the external API call. This can be done either via a button or via a rule.

🚧

Special Permission Required

To modify forms you will need the right permission on your role.

To add to a button in the form:

1474