To enable the with Impact IB integration CRM you need to follow the below steps
Step 1 - Role Creation
Go to Settings>System>User Management>Roles
Click on ‘New’
Type name of the new role i.e. ‘IB role'
In the permissions section tick on the ‘IB Reports’
Save your changes
Step 2 - User Creation
Go to Settings>System>User Management>Users
Click on ‘New’
Type First name, Last name, email and password of the new user
Click on Save
Assign the role you have created on Step 1 to the user
Save your changes
Note: Make sure that you verify the email sent by the system before the 7 days expiration period
Step 3 - Create an API key
Go to Settings>System>User Management>Api Keys
Click on ‘New’
Type the name of the API key i.e. ‘IB Portal API key’
Add an expiration date for the API key
Select the user that you have created in Step 2
Save your changes
From the column, ‘API key’ take the value that just generated
API key Usage:
In order to start tracking the source of created leads/customers, an association with the newly created lead/customer needs to be assigned. In order to achieve this, public lead and public customer creation endpoints need to add in their headers the provided header as X-Api-Key → [PROVIDED_API_KEY]
Accessing:
Authenticating: Call the following endpoint
Method:
POST
Path:
[domain]/api/v1/auth/login
Body:
{"email": "USER_EMAIL", "password": "USER_PASSWORD", "rememberMe": true}
Headers:
X-Api-Key (Provided Api Key)
X-DOMAIN (Api key based domain)
Content-Type application/json
Successful response:
{"token": "TOKEN_RESPONSE"}
You'll receive a token required for calling the following endpoints
Leads: Call the following endpoint:(Depends on IB Reports permission) Returns details in regards to system leads
Depends on the leads module
Method:
GET
Path:
[domain]/api/v1/ib/leads
Headers:
X-Api-Key (provided Api Key)
X-DOMAIN (Api key based domain)
X-Auth-Token (token from 1.)
Successful response:
See leads.json file
Query parameters (i.e. filters)
(*) registrationDateFrom (YYYY-MM-DD) : Lead registration date from filter
(*) registrationDateTo (YYYY-MM-DD) : Lead registration date to filter
(*) lastModifiedDateFrom (YYYY-MM-DD) : Lead last modified date from filter
(*) lastModifiedDateTo (YYYY-MM-DD) : Lead last modified date to filter
page (Optional - Default = 1): Requested page for the results
pageSize (Optional - Default = 1000): Requested page size for results
Example
/api/v1/ib/leads?registrationDateFrom=2017-04-01®istrationDateTo=2019-12-31&page=1&pageSize=500
(*) This endpoint requires either registration date OR last modified date to be present in the request
|
3. Registrations (converted leads/customers): (Depends on IB Reports permission) Returns details in regards to converted leads, known as customers.
Depends on the leads module
Method:
GET
Path:
[domain]/api/v1/ib/registrations
Headers:
X-Api-Key (provided Api Key)
X-DOMAIN (Api key based domain)
X-Auth-Token (token from 1.)
Successful response:
See registrations.json file
Query parameters (i.e. filters)
(*) registrationDateFrom (YYYY-MM-DD) : Customer registration date from filter
(*) registrationDateTo (YYYY-MM-DD) : Customer registration date to filter
(*) lastModifiedDateFrom (YYYY-MM-DD) : Customer last modified date from filter
(*) lastModifiedDateTo (YYYY-MM-DD) : Customer last modified date to filter
page (Optional - Default = 1): Requested page for the results
pageSize (Optional - Default = 1000): Requested page size for results
Example
/api/v1/ib/registrations?registrationDateFrom=2017-04-01®istrationDateTo=2019-12-31&page=1&pageSize=500
(*) This endpoint requires either registration date OR last modified date to be present in the request
|
4. Transactions: (Depends on IB Reports permission) Returns transaction details
Depends on transactions module
Method:
GET
Path:
[domain]/api/v1/ib/transactions
Headers:
X-Api-Key (provided Api Key)
X-DOMAIN (Api key based domain)
X-Auth-Token (token from 1.)
Successful response:
See transactions.json file
Query parameters (i.e. filters)
(*) transactionDateFrom (YYYY-MM-DD) : Lead registration date from filter
(*) transactionDateTo (YYYY-MM-DD) : Lead registration date to filter
page (Optional - Default = 1): Requested page for the results
pageSize (Optional - Default = 1000): Requested page size for results
includeFake (Optional [true/false] - Default = false): Allows retrieving fake transactions as part of the response
Example
/api/v1/ib/transactions?transactionDateFrom=2017-04-01&transactionDateTo=2019-12-31&page=1&pageSize=500&includeFake=true
(*) This endpoint requires transaction date to be present in the request
|
5. Available servers: (Depends on IB Reports permission) Returns available server ids (tags) of all platforms (mt4, mt5 etc.)
Depends on platforms module
Method:
GET
Path:
[domain]/api/v1/ib/servers
Headers:
X-Api-Key (provided Api Key)
X-DOMAIN (Api key based domain)
X-Auth-Token (token from 1.)
Successful response:
See servers.json file
|
6. Positions: (Depends on IB Reports permission) Returns closed position details.
Depends on platforms module
Method:
GET
Path:
[domain]/api/v1/ib/positions
Headers:
X-Api-Key (provided Api Key)
X-DOMAIN (Api key based domain)
X-Auth-Token (token from 1.)
Successful response:
See positions.json file
Query parameters (i.e. filters)
(*) positionCloseDateFrom (YYYY-MM-DD) : Position close date from filter
(*) positionCloseDateTo (YYYY-MM-DD) : Position close date to filter
(*) serverTag: Single server id as fetched from 5.
page (Optional - Default = 1): Requested page for the results
pageSize (Optional - Default = 1000): Requested page size for results
Example
/api/v1/ib/positions?positionCloseDateFrom=2017-04-01&positionCloseDateTo=2019-12-31&page=1&pageSize=500
(*) This endpoint requires serverTag and position close date to be present in the request
|
Notes:
If the total number of results exceeds 1000 (or predefined page size) users need to call the required endpoint with the same parameters but the `page` size increased. The number of total pages can be identified by dividing total (number of records) by pageSize
Registrations (customers)
User additional ID - Comma-separated values of each customer trading account (platform-based) as:
Transactions
Only successful transactions are returned
Product id if trade id is the trade-related identification (if any). If not found N/A is displayed
Available servers response groups all servers by platform type
login id, platform server, type (live/demo)) - Filtered only by live accounts (12345, mt4, live) |
|---|
Transactions
Only successful transactions are returned
Product id if trade id is the trade-related identification (if any). If not found N/A is displayed
Available servers response groups all servers by platform type
Change log:
2020-02-07
Transactions
Added
IncludeFake (true/false) - Filter: Allows retrieving fake transactions in the response
If not provided it will always default to false i.e. exclude fake transactions
isFake - Response model: Denotes if transaction
is fake/not
Leads/Registrations
Added
utmDetails
firstName
lastName
email
Modified
Tags
Categorized tags: array of tag category containing all assigned tags from the specific category
Affects:
/ib/leads
/ib/registrations
/ib/transactions