> For the complete documentation index, see [llms.txt](https://track360.gitbook.io/track360/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://track360.gitbook.io/track360/section-10-integrations/editor/10.3-reports-via-api.md).

# 10.3 Reports via API

* Provide **Reports via API** to Affiliate/IBs or internal employees, allowing them to access performance data directly in their own systems without logging into the platform.

{% hint style="info" %}
To enable API access, you must first whitelist them and generate an API key to the desired Affiliate/IB or employee following next steps.
{% endhint %}

### **API access for Affiliate/IB**

* Navigate into **Affiliate Management**
* Select the affiliate or click to the arrow icon on the rightmost of the row. Click on the **selected Affiliate/IB** to see details&#x20;

<figure><img src="/files/iurO5Rh58qG0W7GHUlGi" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
To enable API access for Affiliate/IBs you must first whitelist API, give permission and generate the API Token, following the next steps
{% endhint %}

* Navigate into **API tab**
* Select on **API Token Permission** dropdown the **Get leads report** option. Then, Save Permissions

<figure><img src="/files/JdxummS7eeKV7cZ63S43" alt=""><figcaption></figcaption></figure>

* **Whitelisted IPs** to secure API access. Define the **From** and **To** fields to define a range of IP addresses or add a single IP. Then, click **Add** to save the IP(s) to the whitelist.
  * To allow the **full API range**, set the minimum (0.0.0.0) and maximum (255.255.255.255). Only set full range if you really want open access.
  * Additionally, find previously added IP ranges in the list with a trashcan icon to delete unwanted entries.

<figure><img src="/files/ZIlmDBABmVbi44z2PDfX" alt=""><figcaption></figcaption></figure>

* **API Key** gives you the unique token for API integration.&#x20;
  * To generate the key, click the Plus button and copy the **token API** value&#x20;
  * To renew the key, click the **Extend Expiry Date** button to update its validity.

<figure><img src="/files/J8qjsjl2xT0BYIhHu91P" alt=""><figcaption></figcaption></figure>

{% hint style="danger" %}
*The API Key is sensitive information. Share it only with the corresponding affiliate/IB and never expose it publicly.*
{% endhint %}

* Once is API Key is generated, you can customize the Report to share with the Affiliate/IB.

### **API access for Employees**

* To enable API access for employees you must first whitelist API, give permission and generate the API Token, following the next steps
* Navigate into **Integration > API Token Management**&#x20;

<figure><img src="/files/bTwyvOYmplSlfonLk7dX" alt=""><figcaption></figcaption></figure>

* Select the desired **Employee** to create the API token&#x20;
* Select on **API Token Permission** dropdown the **Get leads report** option. Then, Save Permissions
* **Whitelisted IPs** to secure API access. Define the **From** and **To** fields to define a range of IP addresses or add a single IP. Then, click **Add** to save the IP(s) to the whitelist.
  * To allow the **full API range**, set the minimum (0.0.0.0) and maximum (255.255.255.255). Only set full range if you really want open access.
  * Additionally, find previously added IP ranges in the list with a **trashcan icon** to delete unwanted entries.

<figure><img src="/files/Gzo87zbbfqLXTVvYzaVs" alt=""><figcaption></figcaption></figure>

* **API Key** gives you the unique token for API integration.&#x20;
  * To generate the key, click the Plus button and copy the **token API** value&#x20;
  * To renew the key, click the **Extend Expiry Date** button to update its validity.

{% hint style="danger" %}
*The API Key is sensitive information. Share it only with the corresponding employee and never expose it publicly.*
{% endhint %}

* Once **API Token is generated** for employee or affiliate/IB
* **Log in as the employee or affiliate/IB** to have their permissions and preview exactly how the report will appear for them.
  * One way: Use the top search bar for looking for the desired affiliate/IB.
  * Another way: Navigate into **Affiliate Management** and select the desired affiliate/IB&#x20;
  * Select the log in as the affiliate/IB

{% hint style="info" %}
If there is not available a report or column report under the affiliate/IB view, go into [section 5.3 Manage Affiliate Role](/track360/section-5-settings/editor-3/5.6-manage-affiliate-roles.md#modify-a-role) to modify the permissions.
{% endhint %}

<figure><img src="/files/f7lnkJejpck1mjIcgrJu" alt=""><figcaption></figcaption></figure>

* Navigate by the **left Sidebar Menu** and click on the Reports or Performance Report. Select the desired report you want to create the API&#x20;
* **Customize Reports** using the Columns button at top of the report.&#x20;

{% hint style="info" %}
Follow up step by step on [section 4.2 Customize Reports](/track360/section-4-reports-and-analytics/editor/4.2-customize-reports.md) to properly configure.
{% endhint %}

* Click on the **API** button on the top right corner, to display API information

<figure><img src="/files/ncKhEHrDSP0uW4hjRJXX" alt=""><figcaption></figcaption></figure>

* Check the **cURL mode** to select the **system format**
* **Copy Clipboard** to share the API Body Report to the desired Affiliate/IB

<figure><img src="/files/nQh63R9MnqEZCJcIrIqa" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
For a deeply explanation of how to set Report via API refer to [4.2 Customize reports](/track360/section-4-reports-and-analytics/editor/4.2-customize-reports.md)
{% endhint %}

***


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://track360.gitbook.io/track360/section-10-integrations/editor/10.3-reports-via-api.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
