Table of Contents

REST API Request

The REST API Request action enables you to call Finago Office (24SevenOffice) API and retrive data. A typical use case is to create data integrations for pulling data from Finago Office/24SevenOffice into a data platform solution.

img

Example img
The example above shows a Flow that use a dynamic connection to 'request accounts' . The json data in the response content is converted to a table and the data is inserted into an SQL server table.


Properties

Name Type Description
Connection Required The connection used to make an authenticated request to the Finago Office REST API.
Dynamic connection Optional Use this option of You needs to create a connection using different credentials stored outside the workspace (for example in your own database). It is also useful when To dynamically create a connection, use the Create Finago Office Connection action.
Configuration Required Defines the HTTP request to make to the API. See details below.
Disabled Optional Boolean value indicating whether the action is disabled (true/false).
Description Optional Additional details or notes about the action.

Returns

The return type is defined when configuring the action. It can be a custom data type or the raw JSON response from the API.
We recommend using the built-in HttpResponse<T> type because it will include additional information about the response, such as the HTTP status code and error(s).

We also recommend simply dumping the raw response to a data store, and then use data transformation tools to transform the data into a usable format. If you know the API returns small amounts of data (10 000 - 200 000 records), you can consider using the Get JSON DataReader to flatten JSON to a tabular format and process the data as rows and columns, for example by inserting directly to a SQL Server table.


Configuration

To define a request to the REST API, you can start from a template, or define it manually. If you press the New Request button in the Configuration dialog, you can choose from a set of predefined request templates.
The template collection contains a subset of the available APIs. If you cannot find a template for the request you want to make, you can refer to the API documentation and define the request manually.


Defining a request manually

To define a request manually, please refer to the API documentation to learn which endpoint and parameters to use.

  1. Define the Method (GET, PUT, POST, DELETE, etc ). Most APIs for fetching data requires the GET method.
  2. Define the URI. This is the API endpoint, for example companies/{id}. If a query requires parameters (for example the company id in this example), insert a variable from Flow using the popup that appears when the URI editor gets focus.
  3. Add optional Query Parameters. E.g. when requesting TransactionLines, add parameters for dateFrom and dateTo with date values (ISO format).
  4. Define the Response. The default response type is HttpResponse<string>. This means you get back the raw JSON response from the API. You can change the data type to a custom type if you want to, but keep in mind that this will allocate more memory and impact performance negatively for large data sets such as dimensions and general ledger queries. We recommend simply dumping the raw response to a data store (like a database or blob storage), and then use tools like dbt, SQLMesh or Azure Data Factory to transform the data into a usable format.