API Init Data
For detailed information about API integration please follow this link
As stated on the API Integration page, If flow contains API Init Data interaction, you can define fields which can become part of the token pair.
When using the API Init feature, you have the option to specify the data included in the Init token. This data can be utilized for pre-filling forms or other interactions within the flow. This functionality is similar to the URL Data feature, but with all the data stored together with the start/pull token pair. These details remain hidden to the user from the URL or any other part of the flow, as they are securely stored in the Hub for the same time-to-live (TTL) duration as configured for the token pair.
To incorporate this feature, simply add an API Init Data interaction at the beginning or any desired location in the flow. This interaction can be found under “Data” in the interaction library in Flow. Define the expected data, similar to URL Data, and indicate whether a data field is mandatory or optional. This will guide the flow, directing traffic to different routes based on the presence or absence of specific data.
Outputs
If some field is mandatory, and it's not passed, then outcome of the app would be WITHOUT DATA output, with no data in the load, even if optional attributes are passed.
If all fields are optional, and again, only some of them are passed, it still would go out of WITH DATA output, having all the values that are passed.
Keep that in mind if you need some optional data delivered to your flow.
Generating data for a given token is straightforward; you just need to call the same API init endpoint as for regular API init, but with a JSON-formatted data payload. The Design Studio provides guidance through the user interface for this process.
POST https://instance.prod-eu.onboardapp.io/api/gateway/execute/pavel.lsegapidata.stage.flow/init
Content-Type:application/json
X-SYNC-TIMEOUT:30000
X-API-KEY:z9rg81six3emjuaf1qbqqkijd7tqiv2rj8adod2w
{
"somefield": "mydata",
"otherfield":"something",
"id": "123Ysk"
}
Call will generate standard token pair to be used in the URL handled to the Customer.
{
"tokens": {
"pull": "MHqPED",
"start": "bwTX29"
}
}
All stored data can be used in the Flow or passed to the other systems utilizing standard Data mapping feature of the Design Studio.
Facts
All data provided by the API call are securely stored in our system. There is no way how to intercept or change the data by knowing final URL of the target.
Updated about 1 month ago