Back

Qwilr API Essential Guide

Sep 14, 20246 minute read

What type of API does Qwilr provide?

API Type

Qwilr has a REST API.

Key Details

  • The Qwilr API documentation explicitly states that "Our API is organized around REST".
  • The base URL for the Qwilr API is https://api.qwilr.com/v1.
  • The API uses bearer token authentication, with access tokens used in the Authorization header.

Does the Qwilr API have webhooks?

Yes, the official Qwilr API does have webhooks. Here are the key points about Qwilr's webhook functionality:

Webhook Support

  • Qwilr's API allows you to subscribe to webhook events for your Qwilr account.

Available Event Types

You can subscribe to the following webhook event types:

  1. "pageAccepted" - Triggered when a page is accepted
  2. "pagePreviewAccepted" - Triggered when a page preview is accepted
  3. "pageViewed" - Triggered when a page is viewed
  4. "pageFirstViewed" - Triggered when a page is viewed for the first time

Creating Webhook Subscriptions

  • To create a webhook subscription, you need to specify the event type and a target URL where the webhook will be sent.
  • When creating a subscription, you should store the returned id field in case you want to cancel the subscription later.

Managing Webhook Subscriptions

  • You can retrieve a list of all your webhook subscriptions.
  • You can cancel a webhook subscription using the id that was returned when the subscription was created.

Testing Webhooks

  • You can test the pageAccepted webhook by completing the preview Acceptance flow for all accepters, which will trigger the pagePreviewAccepted webhook.

Best Practices

  • Use HTTPS for all requests.
  • Keep your access token secret and do not share it in public spaces.
  • When testing, use tags to easily identify and manage test documents.

It's important to note that Qwilr's webhook functionality allows you to receive real-time notifications about important events in your Qwilr account, enabling you to automate workflows and integrate Qwilr with other systems more effectively.

Rate Limits and other limitations

Based on the search results provided, there is no specific information about the API rate limits for the Qwilr API. The search results do not mention any rate limiting for Qwilr's API.

However, here are the key points to consider regarding API usage for Qwilr:

Authentication

  • All API requests need to be authenticated using an access token [1].
  • The access token should be included in the Authorization header as a bearer token [1].
  • Example: Authorization: Bearer fakeaccesstoken [1].

Best Practices

  • All requests should be sent over HTTPS [1].
  • Keep your access token secret and do not share it in public spaces [1].

Error Handling

  • Qwilr uses conventional HTTP response codes to indicate success or failure of API requests [2].
  • 2xx codes indicate success, 4xx codes indicate errors with the provided information, 5xx codes indicate server errors [2].

API Documentation

  • Full API documentation is available at https://docs.qwilr.com/api-reference.

While there are no explicit rate limits mentioned, it's generally a good practice to implement reasonable request rates and error handling in your API integration. If you need specific information about rate limits, you may want to contact Qwilr support directly at [email protected].

Latest API Version

Based on the search results provided, here is the most up-to-date information about the Qwilr API:

The most recent version of the Qwilr API appears to be v1.0.0. [3]

Key points to consider:

  1. The Qwilr API allows developers to programmatically generate Qwilr Pages, create custom quotes, and automate document creation. [3]

  2. The API is organized around REST principles and uses HTTPS for all requests. [3]

  3. The base URL for API requests is https://api.qwilr.com/v1 [3]

  4. Authentication is required for all API requests using bearer authentication with an access token. [3]

  5. The API provides endpoints for managing Pages, Blocks, Account information, and Webhooks. [3]

Best practices:

  1. Keep your access token secret and do not share it in public spaces. [3]

  2. Always send requests over HTTPS to ensure security. [3]

  3. Refer to the official API documentation for the most up-to-date information on endpoints and request/response formats. [3]

  4. Use the provided API reference to understand the available operations and their parameters. [3]

While the search results do not explicitly state when this version was released or if there are any planned updates, the information provided appears to be current as of the last update to the documentation. For the most accurate and up-to-date information, it's always best to check the official Qwilr API documentation or contact their support team directly.

How to get a Qwilr developer account and API Keys?

To get a developer account for Qwilr and create an API integration, you need to follow these steps:

1. Obtain an Enterprise Qwilr Account

First and foremost, you need to have an Enterprise Qwilr account with API access enabled. If you don't have one, you'll need to contact Qwilr to set this up for you.

2. Create an Access Token

Once you have an Enterprise account with API access:

  1. Go to https://app.qwilr.com/#/settings/api.
  2. Use the access token generator to create a new token.
  3. Copy the token and store it securely. Note that you can only view the token once, so make sure to save it in a safe place.

3. Familiarize Yourself with the API Documentation

Before starting your integration:

  • Review the Qwilr API documentation available at https://docs.qwilr.com/api-reference.
  • Understand the authentication process, which uses bearer authentication with your access token.

4. Start Developing Your Integration

To begin developing your integration:

  1. Decide whether you'll be using templates or saved blocks for your Qwilr pages.
  2. Create the necessary templates or saved blocks in your Qwilr account.
  3. Use the API to create pages, either from templates or by assembling saved blocks.

What can you do with the Qwilr API?

Based on the provided information, here's a list of data models you can interact with using the Qwilr API, along with what is possible for each:

Pages

  • Create new pages
  • Retrieve page details, including status and acceptance information
  • Update existing pages
  • Set page metadata
  • Retrieve page metadata

Quote Blocks

  • Add quote data to new or existing pages
  • Override existing quote contents in saved Quote Blocks
  • Set quote currency and other block-level settings (indirectly through page creation/update)

Quote Sections

  • Create and manage multiple quote sections within a quote
  • Set section descriptions
  • Configure section settings (e.g., selection, discounts)
  • Add metadata to quote sections

Line Items

  • Add various types of line items (e.g., fixed cost, text)
  • Set line item details (description, unit price, quantity, etc.)
  • Configure line item visibility (e.g., hide price, quantity, or cost)
  • Add metadata to line items

Plan Cards

  • Configure plan card display options
  • Set billing schedules for line items
  • Mark items as recommended
  • Add feature lists to line items

Acceptance and Webhooks

  • Set up webhook subscriptions for page acceptance events
  • Retrieve acceptance details, including accepted quote information

Metadata

  • Add metadata to pages, quote sections, and line items
  • Retrieve metadata for reconciliation purposes

Key Points:

  • The API allows for comprehensive management of quotes and pages
  • Metadata can be used to link Qwilr data with external systems
  • The API supports complex quote structures, including multiple sections and various line item types
  • Plan card functionality is fully supported through the API
  • Webhook integration enables real-time tracking of page acceptance

It's important to note that the current public API does not support variable line items, but this feature may be added in future updates.