Widget

The Widget API endpoints allows you to build your own UX flow without relying on Railz Connect.

❗️

We recommend you use Railz Connect to continue gaining access to new integrations we support. The widget API will only grant you access to QuickBooks Online, Xero and FreshBooks and will be deprecated by December 2021.

The Widget API endpoints allow you to generate and retrieve the accounting service provider's login URL to embed directly in your application without the need for Railz Connect.

To generate the URL:

  1. Request a widget session using the /widget/session/{widgetId}.
  2. This will return an access_token that you can use to generate the service URL.
  3. Request the service URL using /services/{serviceName} by providing the serviceName and access_token as an Authentication Bearer.

For FreshBooks, you will need to do the following additional steps:

  1. Request a list of the FreshBooks accounts associated with the authorized user using /freshbooks/account.
  2. This will return a list of accounts that you can use to finalize the connection.
  3. Select the FreshBooks account to connect using /freshbooks/account.