> 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="https://4110691288-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1iHXZgeTSXZwHDnWa5S8%2Fuploads%2Fiv59kfwgeLHZJGtUpXqR%2Fimage.png?alt=media&amp;token=67e45aa5-aab8-4424-9b63-f220adfbd893" 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="https://4110691288-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1iHXZgeTSXZwHDnWa5S8%2Fuploads%2FZVAe7FOL2WajbOGM8MVD%2Fimage.png?alt=media&amp;token=80e2724a-9f52-4c66-9923-b72b30c8c42b" 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="https://4110691288-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1iHXZgeTSXZwHDnWa5S8%2Fuploads%2Fgqcq7nYZCc46HG9nAdFF%2Fimage.png?alt=media&amp;token=32cd8d52-6a72-4f61-8c64-e75039a61f58" 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="https://4110691288-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1iHXZgeTSXZwHDnWa5S8%2Fuploads%2F3OCTDfarcbcSoCxdNPpY%2Fimage.png?alt=media&amp;token=8f89f64d-2ff8-41d2-8890-4d99501a54a7" 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="https://4110691288-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1iHXZgeTSXZwHDnWa5S8%2Fuploads%2FExsZKdCNJzwXLYkSULd8%2Fimage.png?alt=media&amp;token=c68df647-2a33-41f2-a9d4-a0bd3ef8c226" 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="https://4110691288-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1iHXZgeTSXZwHDnWa5S8%2Fuploads%2FtBAqafFVnkIdScmDkWSU%2Fimage.png?alt=media&amp;token=e889dff2-0418-47c3-a33f-ec95f4865664" 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="https://4110691288-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1iHXZgeTSXZwHDnWa5S8%2Fuploads%2FNPqASNFzrU42IZjkywBm%2Fimage.png?alt=media&amp;token=a676de31-a7dc-4910-aa8f-58d930611281" 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="https://4110691288-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1iHXZgeTSXZwHDnWa5S8%2Fuploads%2FKKa8kvp1K1Lnl66GCOKD%2Fimage.png?alt=media&amp;token=179a01d8-d0a2-4551-90a2-f77ba07f0a15" 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="https://4110691288-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1iHXZgeTSXZwHDnWa5S8%2Fuploads%2F2HQxfn8jFuJWDcaNHGDd%2Fimage.png?alt=media&amp;token=47fdeb24-98aa-482a-bda0-c193c4a1dad9" 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
