To enable Trackbox integration with Impact CRM follow the steps described below:
Step 1 - Role Creation
Go to Settings>System>User Management>Roles
Click ‘New’
Type the name of the new role, for example. ‘Trackbox role'
In the permissions section tick the ‘Trackbox Reports’
Save the changes
Step 2 - User Creation
Go to Settings>System>User Management>Users
Click ‘New’
Type First name, Last name, email and password of the new user
Click Save
Assign the role you have created in Step 1 to the user
Save the changes
Note: Ensure that the email sent by the system has been verified before the 7-day expiration period
Step 3 - Create an API key
Go to Settings>System>User Management>Api Keys
Click ‘New’
Type the name of the API key, for example, ‘Trackbox API key’
Add an expiration date for the API key
Select the user created in Step 2
Save the changes
From the column, ‘API key’ take the value that is generated
API Key usage:
To start tracking the source of the 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 be added to the provided header as X-Api-Key → [PROVIDED_API_KEY]
API Documentation
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 the token required for calling the following endpoints
1. Leads: Call the following endpoint: (Depends on Trackbox Reports permission) Returns details in regards to system leads
Method: GET Path: [domain]/api/v1/trackbox/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/trackbox/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 |
2. Registrations (converted leads/customers): (Depends on Trackbox Reports permission) Returns details in regards to converted leads, known as customers.
Method: GET Path: [domain]/api/v1/trackbox/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/trackbox/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 |
3. Transactions: (Depends on Trackbox Reports permission) Returns transaction details
Method: GET Path: [domain]/api/v1/trackbox/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 Example /api/v1/trackbox/transactions?transactionDateFrom=2017-04-01&transactionDateTo=2019-12-31&page=1&pageSize=500 (*) This endpoint requires transaction date to be present in the request |
4. Available servers: (Depends on Trackbox Reports permission) Returns available server IDS (tags) of all platforms (MT4, MT5 etc.)
Method: GET Path: [domain]/api/v1/trackbox/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 |
5. Positions: (Depends on Trackbox Reports permission) Returns closed position details.
Method: GET Path: [domain]/api/v1/trackbox/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 4. page (Optional - Default = 1): Requested page for the results pageSize (Optional - Default = 1000): Requested page size for results Example /api/v1/trackbox/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 |
Important 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 with an increased page size. The number of total pages can be identified by dividing total (number of records) by page size
Registrations (customers)
User additional ID - Comma-separated values of each customer trading account (platform-based) as:
(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