Introduction
The Flex Web Service is a small, standalone HTTP API for programmatically generating and retrieving pre-configured Flex Queries. Flex Queries are first constructed manually as templates in Client Portal, after which the Flex Web Service API is used to generate an instance of a report populated with up-to-date data and deliver it back to the requesting client. The Flex Web Service offers access to the same Flex Query reports that you’d otherwise retrieve manually from within Client Portal.
Create Access Token
Before using the Flex Web Service API to programmatically retrieve Flex Query reports, you’ll need to manually obtain some values from within Client Portal.
Create queries & retrieve their ID
Users create a Flex Query within Client Portal as a template of information to retrieve programmatically or through the Portal directly.
For more information about Flex Queries and about IB’s reporting functionality overall, please consult the following documentation:

