Skip to main content

Interfaces

Interfaces define how Flowize receives, reads, and maps data sent from external systems through the API. Use an interface when you need to insert data records, upload batches of records, test API ingestion, or review responses received by an interface.

An interface depends on both the request format and the structure of the data. For example, you can create multiple JSON interfaces if each one receives a different JSON structure.

Interfaces page​

Open Interfaces to view the interfaces available in your account.

The overview page lets you:

  • Search, sort, and page through the interfaces table.
  • Create a new interface when interface creation is available and you have the required permissions.
  • Open an existing interface.

Create an interface​

Select New Interface to open the interface editor in create mode.

New interfaces start on the Input Data tab. Existing interfaces include these tabs:

  • Interface details
  • Input Data & Mapping
  • Test API

The Test API tab appears only after an interface has been saved.

Choose the request format​

In Input Data, choose the request format for the data that the interface will receive.

Supported request formats are:

  • JSON (JavaScript Object Notation)
  • XML (eXtensible Markup Language)
  • CSV (Comma-Separated Values)
  • Multi Record
  • Raw

Configure a JSON interface​

JSON is the format that Flowize internally uses, and any other format will be converted to it with the help of the mapping. Example:

{
"user": {
"name": "Jane",
"age": 32
}
}

For JSON interfaces, choose whether the request follows the global data structure or uses a custom structure.

OptionUse when
Data Structure (JSON)The incoming JSON already follows the global data structure.
Custom structureThe incoming JSON uses a different structure and needs example data so Flowize can generate variables and mapping options.

It is convenient to define a Data Structure as it will allow you to use @data variables that will be replaced in your contents and/or flows, independently of the interface used. Another advantage of @data variables is that they can be updated through the flow process.

If you haven't already created a Data Structure, don't worry, you can define it before continuing or skip the step if you don't plan to use @data variables, and you will only use @interface variables.

If you use a custom structure, paste example JSON or select Import from file, then select Check the payload and mapping.

When a JSON array is provided, Flowize uses the first object to define variables and mapping.

Configure an XML interface​

It's a markup language that defines a set of rules for encoding documents in a format that is both human-readable and machine-readable. Example:

<?xml version="1.0" encoding="UTF-8"?>
<menu>
<food>
<name>Belgian Waffles</name>
<price>$5.95</price>
<description>
Two of our famous Belgian Waffles with plenty of real maple syrup
</description>
<calories>650</calories>
</food>
</menu>

For XML interfaces, paste example XML or select Import from file, then select Check the payload and mapping.

Flowize uses the example payload to generate variables and mapping options.

Configure a CSV interface​

It's a comma-separated values file, which allows data to be saved in a tabular format. Although it's mainly known for using the comma as a separator between values, other divisions can be used. The most common ones are commas, semicolons, colons, pipes, or tabs.

For CSV interfaces, paste example CSV data or select Import from file, then select Check the payload and mapping.

Flowize can show CSV options and a tabular preview after the payload is processed. The browser preview is truncated to the first 100 lines for large CSV payloads.

CSV options include:

  • Header: Defines whether the first row contains column names.
  • Delimiter: Defines the character that separates values.
  • Enclosure: Defines the character that encloses field values.

Flowize rejects invalid delimiter choices.

Configure a Multi Record interface​

Use Multi Record when the incoming data does not follow JSON, XML, or CSV structure and you need to define how records are detected and split.

You can choose from the Multi Record templates or create your template so later on, you can use it for other interfaces.

After you paste or import an example payload, configure the record detection settings and select Check the payload and mapping. Flowize can then show record setup, preview, sections, variables, and mapping options.

The browser preview is truncated to the first 100 lines for large multi-record payloads.

Type: There are different types of Multi Record based on how the fields are delimited:​
SettingUsage
Multi Record DelimitedUse when each data record starts with a specific delimiter, for example :20:.
Multi Record FixedUse when each data record starts with a fixed string, for example 01,.
Multi Record Fixed by PositionUse when each data record starts at a fixed character position, for example position 83 with the value 300.
HeaderSpecify whether the input data contains a header row or not.

Repeat Header: You need to select if the header needs to be repeated on every record or not.

Header starts with: In case your header always starts with the same pattern, you can also type it. It can be one only character or a list of possible characters. The symbol | is equivalent to the OR logic operator.

E.g.: {
E.g.: {head}
E.g.: 01|02|03

Delimiter: It's the character which separates the values in each row of the file. Most common delimiters are comma ( ,), semicolon (;), colon (:) and tabs. If "Custom Delimiter" is selected, but you don't provide any, the default delimiter will be a comma (,).

Enclosure: It's the character that encloses the values of each field. Most common enclosures are quote (") and single quote (').

New Record starts with: Choose which record type will be the start of a new record. In the example that we show, we know that always our data records start with the ":20:", and as the delimiter is ":", we need to type "20".

Delimited field index: Choose which column from 1 to n is the starting point. So if the value is "2" then it will start in column "2". In our example, these are the first column values:

Column 1: ":"
Column 2: "2"
Column 3: "0"
Column 4: ":"
Column 5: "P"
Column 6: "1"

Indicator size: Defines what the length of the indicator between delimiters is. Use 0 for the entire field. If you have a document like this:

{1:F01INGBNL2ABXXX0000000000}{2:I940INGBNL2AXXXN}{3:{108:B12345678S000001}}{4: :20:P140104000009999 :25:NL20INGB0001234567EUR :28C:00003

and your delimiter is ":" then, these are the posibilities:

The header starts with the character => {

Delimited field index of the first record-type indicator => 2

Indicator SizeWill Recognize
0"20", "25", "28C"
1"2", "2", "2" (first character only)
2"20", "25", "28"
3"20" "25" "28C"

Delimited field index of the first record-type indicator => 2

Indicator sizeWill recognize
0"0" "5" "8C"
1"0" "5" "8"
2"0" "5" "8C"

While you are setting up these parameters, you will see in the editor outlined how the codes are being recognized, where the data record starts, etc. Once you are okay with the preview, we can move into setting up the Sections, that will define how our data record is structured.

Sections and Parameters​

Once we reach here, our data structure is flat, which means that only has one level, identified by "root". In the example, we show only the first lines:

{
"root": {
"header": "{1:F01INGBNL2ABXXX0000000000}{2:I940INGBNL2AXXXN}{3:{108:B12345678S000001}}{4:",
"20": "P140104000009999",
"25": "NL20INGB0001234567EUR",
"28C": "00003",
"60F": "C140102EUR1000,00"
}
}

If you want to change the text of any key, for example, you want to change "20" into "transaction_detail", type it in the input.

Now let's focus, for example in the line "60F": "C140102EUR1000,00" The value "C140102EUR1000,00" is not worth it for us, and we know it is a compound of different values. Our goal is to achieve this:

{
"root": {
"header": "{1:F01INGBNL2ABXXX0000000000}{2:I940INGBNL2AXXXN}{3:{108:B12345678S000001}}{4:",
"20": "P140104000009999",
"25": "NL20INGB0001234567EUR",
"28C": "00003",
"opening_balance": {
"credit_debit": "C",
"date": "140102",
"currency": "EUR",
"balance": "1000,00"
}
}
}

Edit Parameters: Click in the "Edit Parameters" next to the "60F" input, and a modal window will appear. Then, type "opening_balance" in the label of the parameter to change the name of it. Then you have to choose how are you going to split the values. There are four possibilities:

Split wayDescription
Per lengthTo define from which position to which position is each value. In this example, you need to keep in mind that we start in position "6" because from the start of the line we have 5 characters ":60F:"
Per delimiterYou can use the same kind of delimiters explained before
Flexible lengthIf your values are based in length but it is not always the same, and you don't have delimiters
Regular expressionIf you know how to write regular expressions, this is very useful when it's very complex to extract the values from a string

In our case, we are going to choose "Flexible length". Then we need to start "Adding new Parameter" till we have 4, that is our goal.

Then we start typing all the labels of the parameters.

In length, we need to put the maximum length the parameter can have. We have the opportunity to decide if the length is fixed or flexible. For example, we know that "credit_debit" is always 1 character, and it's always a letter [a-zA-Z].

On the other side, we have "balance" that its length can vary from 4 characters (0,00) to 15 characters ( 999999999999,99). In type we choose "Amount" which includes digits [0-9] and [,.] characters.

Type: These are the different types you can choose:

TypeIncludes
Only digitsOnly numbers [0-9]
Only lettersLetters in lower and upper case [a-zA-Z]
Letters + Symbols[a-zA-Z] and symbols like `[]()\
AlphanumericNumbers and letters [a-zA-Z0-9]
Alphanumeric + Symbols
AmountCharacters used in amounts [0-9] and [,.]
Param ending​

Row example:

140D1030103C125,00NRTINONREF//00000000000009/TRCD/00190/ defines what should be the ending of the string.

Based on the example above, if as LENGTH we put 5, OPTION is NOT FIXED, TYPE Alphanumeric and ENDING as "D" then we will map "140D"; or if as LENGTH we put 5, OPTION is NOT FIXED, TYPE Alphanumeric and ENDING as "C" then we will map EMPTY because the LENGTH is not enough to reach the "C".

You can test if you are mapping the parameters correctly by clicking in the "Detect parameters" and it will highlight them.

Configure a Raw interface​

Use Raw when the interface should accept unstructured content as-is, without mapping or structural conversion. It is a flexible format intended for single record submissions and does not support batching. Unlike other interface formats (JSON, XML, CSV, or Multi Record), the RAW format directly accepts input as-is, without converting or validating the data.

This is an example of use:

curl -k -i -X POST 'https://api-xxxx-xxxx-xxxx.onflowize.com/v1/record' \
-H 'X-Apikey: *****************' \
-H 'X-Environment: TEST' \
-H 'X-App: raw_interface' \
-H 'X-Flow: {{flow_name}}' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/x-raw' \
-d 'This is an interface type raw, where I can send whatever I want.'

For raw payloads, Flowize exposes a single wildcard interface variable:

interface.{app_key}.*

Check the payload and mapping​

Select Check the payload and mapping after entering example data. Flowize parses the payload and, when parsing succeeds, generates the available preview, variables, and mapping options for the selected request format.

If the selected request format does not match the payload, or if the payload is malformed, Flowize shows an error and does not generate the mapping preview.

Map interface variables to the data structure​

When a global data structure is available, you can map interface variables to data structure variables.

Use Automap variables or Auto map your Interface when the interface variables and data structure variables share the same names at the same level. Review the generated mapping before saving.

Variable types must match. For example, an array variable cannot be mapped to a non-array variable.

Configure interface details​

Open Interface details to configure the saved identity, security, endpoint, and variable settings for the interface.

You can:

  • Edit the Interface name and Description.
  • Copy the generated Interface ID. Add it in the headers of the API request to identify how the data you are sending will be mapped with your Data Structure.
  • Reveal the API key after password confirmation.
  • Review the API upload size limit and endpoint information.
  • Configure IP allowlisting.
  • Configure PGP encrypted payload settings.
  • Configure CORS origins.
  • Add GET parameter extraction rows.
  • View generated variables.
info

The Interface ID is generated from the interface name. Unsupported characters are removed from the name while editing, and the generated ID uses the resulting name.

Depending on the type of Interface, you can have two different endpoints:

  • Data Record: You need to use this endpoint when you want to insert them one by one. This option is only enabled for JSON or XML.
  • Batch: You need to use this endpoint when you want to insert more than one data record in the same request. You can use it with the four different types.
note
  • If JSON, you need to send in the request an array of JSON objects. Example:
[
{
"user": {
"name": "Jane",
"age": 32
}
},
{
"user": {
"name": "Peter",
"age": 41
}
}
]
  • If XML, the first level after the root tag will be considered as the array of data records that you want to insert. Example:
<?xml version="1.0" encoding="UTF-8"?>
<menu>
<food>

<name>Belgian Waffles</name>

<price>$5.95</price>

<description>
Two of our famous Belgian Waffles with plenty of real maple syrup

</description>

<calories>650</calories>
</food>
<food>

<name>Apple Pie</name>

<price>$8.95</price>

<description>
Pie with an apple filling spiced with cinnamon

</description>

<calories>342</calories>
</food>
</menu>
  • If CVS, all of your lines must have the same number of columns.

Secure an interface​

In Interface details, use Do you want to secure your interface? to show or hide the Whitelist IPs settings.

When IP allowlisting is enabled, each added value must be a valid IPv4 or IPv6 address. Invalid IP entries are removed and Flowize shows an error message.

note

If you don't type any IP, all requests using your credentials will be accepted in the API.

Use Are you using a PGP encrypted payload? to show or hide encrypted payload fields.

Use Do you want to allow CORS requests? to show or hide CORS origin settings. CORS origins must start with https:// and include a hostname. Flowize normalizes saved CORS origins to the scheme and host.

Add GET parameters​

URL GET parameters are values appended to the end of a URL after the ? character. They allow information to be passed to a page, such as search terms, filters, identifiers, or tracking data, without changing the page path. Multiple parameters can be included in the same URL and are separated by the & character.

In Interface details, use Add new GET parameter to add a URL parameter row.

Each row includes:

  • URL Parameter
  • How to use it

You can delete a GET parameter row. To make the change permanent click on Save at the top.

Save the interface​

The save action is disabled until the required payload or global-structure conditions are met.

Test an interface​

After saving an interface, open Test API.

The Test action is disabled until a published flow is selected

If the interface has unsaved payload or mapping changes, Flowize warns that the test uses the previously saved data.

Common request headers shown in the generated cURL include:

HeaderDescription
X-ApikeyThe API key used to authenticate the request.
X-EnvironmentThe environment for the data record, such as TEST data.
X-AppThe Interface ID.
X-FlowThe flow that receives the data.
Content-TypeThe content type for the selected request format. Such as application/json, application/xml, text/csv, text/plain...

Review interface responses​

For an existing interface, select Responses to open the response history for that interface.

The responses page lets you:

  • Review response records in a paginated table.
  • Open response details from a response row.

Use header variables in flows​

Flowize can make interface header values available in flows with this variable format:

@interface-header.interface_name.header_name@

Use the interface name and the header name in lowercase.

For example:

@interface-header.interface_example.x-usertype@

If a request sends a header named X-usertype, reference it in Flowize as x-usertype.

Using an API Platform​

When sending the header variable via Postman, for example, the header variable will be sent like "X-usertype" with the value "test". So, your Postman setup would look like this:

Key: X-usertype
Value: test

Was this article helpful?