Partners API

You can find our public swagger API here.

Embedded Telivy's Quote Button

Example of implementation can be found here.

1. Load Telivy's Library

The easiest way to import Telivy's library to ensure no requests are hitting your server is to load quote-form.min.js and quote-form.min.css.
	

<head>
  <!-- other head elements -->
  <link 
    rel="stylesheet" 
    href="https://storage.googleapis.com/cdn.telivy.com/packages/get-quote-form@2.1.0/dist/telivy.min.css">
  <script src="https://storage.googleapis.com/cdn.telivy.com/packages/get-quote-form@2.1.0/dist/telivy.min.js">
  </script>
</head>

  

2. Set up HTML component

Add an empty <form> element with "createQuoteForm" id to the page you will like the embed the Quote button. The Telivy library will automatically inject the necessary elements into the page.
 

<body>
  <form id="createQuoteForm">
    <!-- Telivy will inject component and application behavior here -->
  </form>
</body>

 

3. Initialize Telivy with config

On page load, initialize the Telivy library by setting the API key, referring the source of leads (optional), and calling the initialize function. Telivy will handle the rest.
	

<script>
// Define API key and style
const config = {
	showInput?: boolean; // should show business name input, defaults to false
  apiKey: string; // Your API key (required)
  formElementId?: string; // form element id, defaults to 'createQuoteForm'
  utmSource?: string; // define the application source, eg. EPIC - IMA CHANNEL, defaults to 'external'
  useDev?: boolean; // should use the dev api url, defaults to false
  inputClass?: string; // customise the input class, won't be used if showInput is false, default class is telivy-input
  buttonClass?: string; // customise the button class, default class is telivy-button
}

// Initialize Telivy to render components
window.Telivy.initialize(config);
</script>

  

4. Style your elements (optional)

By specifying the custom classes in the config, it is easy to style the look of the input and button elements through CSS.
	

.quote-input {
  width: 70%;
  color: $primary-color;
}

.quote-button {
  width: 30%;
  color: $text-color;
  background-color: $primary-color;
}