{"info":{"_postman_id":"a234ba01-2c09-4711-a83d-7f57c03a079a","name":"iGsuite Manager Documentation","description":"<html><head></head><body><h2 id=\"ℹ️-introduction\"><strong>ℹ️ Introduction</strong></h2>\n<blockquote>\n<p>This document will guide you through the integration of both the <strong>BI</strong> &amp; <strong>Affiliate Platform</strong> of <strong>iGsuite</strong>. These are the parties we have identified to take part in this process: </p>\n</blockquote>\n<ul>\n<li><p>The <strong>Operator</strong>: This is the Client who will use the software to manage their Brands</p>\n</li>\n<li><p>The <strong>iGaming Platform</strong>: This is the Platform under which the Operator Brand is built</p>\n</li>\n<li><p><strong>iGsuite</strong>: Us, who manage the Software of the <strong>Affiliate Platform</strong> and <strong>BI</strong></p>\n</li>\n</ul>\n<h2 id=\"🧬-1-what-is-igsuite\"><strong>🧬 1. What is iGsuite?</strong></h2>\n<p><strong>iGsuite</strong> combines two products in one <strong>- Affiliate Platform</strong> and <strong>BI:</strong></p>\n<ul>\n<li><p><strong>Affiliate Platform -</strong> built for the iGaming industry. Its purpose is to enable Affiliate Marketing for the operators allowing them to build, manage and scale their partners to ensure sustainable growth. The software itself provides the following key functionality:</p>\n<ul>\n<li><p>Registration and management of affiliates</p>\n</li>\n<li><p>Allow Affiliates to access all sorts of creatives</p>\n</li>\n<li><p>Tracking affiliate customers</p>\n</li>\n<li><p>Collecting and visualising data about customers</p>\n</li>\n<li><p>Calculates affiliates' profit based on customer activities</p>\n</li>\n<li><p>Monitor and manage affiliate portfolio and payments</p>\n</li>\n</ul>\n</li>\n<li><p><strong>Newton</strong> - the <strong>BI</strong>, tailored for the iGaming industry is the only BI built to support end to end the customer journey, cost and P&amp;L of the company. Its main purpose is to:</p>\n<ul>\n<li><p>Automate all reports</p>\n</li>\n<li><p>Provide ready Analysis and insights of the business</p>\n</li>\n<li><p>Update all data in real-time</p>\n</li>\n</ul>\n</li>\n</ul>\n<h2 id=\"📋-2-integration-flow\"><strong>📋 2. Integration Flow</strong></h2>\n<p>Below you will find described the exact order of actions that should take place in order to get iGsuite products live for you as fast as possible.</p>\n<ol>\n<li><p><strong>iGsuite</strong> should initiate the integration with the relevant parties</p>\n</li>\n<li><p>The <strong>Operator</strong> has to provide iGsuite with their specifications towards the Affiliate Platform setup.</p>\n</li>\n<li><p>The <strong>iGaming Platform</strong> should start to collect and return iGsuite tokens.</p>\n</li>\n<li><p>The <strong>iGaming Platform</strong> should complete the File Integration:</p>\n<ol>\n<li><p>Registration File</p>\n</li>\n<li><p>Activity File</p>\n</li>\n</ol>\n</li>\n<li><p><strong>iGsuite</strong> will handle full test on the Affiliate Platform end to end.</p>\n</li>\n<li><p>The <strong>Operator</strong> should state the launch date.</p>\n</li>\n</ol>\n<h2 id=\"🚀-3-get-started---operator-requirements\"><strong>🚀 3. Get Started - Operator Requirements</strong></h2>\n<p>In order to configure iGsuite, the <strong>Operator</strong> should provide some key preferences for the platform, a questionnaire will be provided to the client later on.</p>\n<p>In this section, we also explain the necessary server configuration to have the platform under the Operator's domain.</p>\n<p><strong>Note! Everything under point 3, is a blocker for the next steps of the integration process!</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Main Participants:</th>\n<th><strong>The Operator</strong></th>\n</tr>\n</thead>\n<tbody>\n</tbody>\n</table>\n</div><h3 id=\"31-platform-preferences\"><strong>3.1 Platform Preferences</strong></h3>\n<p>The <strong>Operator</strong> should provide the following in the Integration Ticket:</p>\n<ol>\n<li><p><strong>Branding</strong>:</p>\n<ol>\n<li><p>Affiliate Platform Official name</p>\n</li>\n<li><p>Domain name under which you will operate the Affiliate Platform</p>\n</li>\n<li><p>Logo</p>\n</li>\n</ol>\n</li>\n<li><p><strong>Platform Preferences &amp; Access</strong>:</p>\n<ol>\n<li><p>Timezone</p>\n</li>\n<li><p>Currency</p>\n</li>\n<li><p>Type of integration: (API/SFTP)</p>\n</li>\n<li><p>Data transfer option: (Json, CSV, etc)</p>\n</li>\n<li><p>Frequency: (1h, 6h, 24h, etc)</p>\n</li>\n<li><p>Email under which to sign the initial Admin Account</p>\n</li>\n<li><p>Email under which to sign the data Integration Account</p>\n</li>\n<li><p>Email used for our system mailers (Password reset, Confirm Account Registration, Affiliate Account approval, etc.)</p>\n</li>\n</ol>\n</li>\n</ol>\n<h3 id=\"32-operator-domain-server-setup\"><strong>3.2 Operator Domain Server Setup</strong></h3>\n<p>The Operator should provide the domain under which they would like the platform to be made available. Our integration team will provide the Operator with the necessary details so they can configure the DNS record on their domain provider.</p>\n<h2 id=\"🔐-4-authentication\"><strong>🔐 4. Authentication</strong></h2>\n<p>Every request to a <code>/workspaces/api/...</code> endpoint must include the bearer token in the <code>Authorization</code> header:</p>\n<p><code>Authorization: Bearer YOUR_TOKEN</code></p>\n<p>There are two ways to obtain a token.</p>\n<h3 id=\"41-obtaining-a-token-via-the-report-book-ui-recommended\"><strong>4.1 Obtaining a token via the report-book UI (Recommended)</strong></h3>\n<p>This produces a <strong>long-lived api token</strong> that does not expire and does not interfere with anyone's active app session. It is the right choice for production integrations.</p>\n<p>Step by step:</p>\n<ol>\n<li><p>Open the report-book web application in your browser and <strong>log in</strong> as the integration account (the email you provided as the <em>Data Integration Account</em> in section 3.1).</p>\n</li>\n<li><p>If 2-Factor Authentication is enabled on this account, complete the 2FA challenge.</p>\n</li>\n<li><p>From the main navigation, open <strong>Tools</strong>.</p>\n</li>\n<li><p>Open the <strong>Api Tokens</strong> tab.</p>\n</li>\n<li><p>Click the <strong>Generate</strong> button. A modal will appear with the plaintext token.</p>\n</li>\n<li><p><strong>Copy the token immediately and store it somewhere safe</strong> (e.g. your secrets manager). The token is shown <strong>only once</strong> — there is no way to retrieve it again later.</p>\n</li>\n<li><p>Close the modal. The Api Tokens tab will now show an <strong>Active</strong> state with the creation date.</p>\n</li>\n</ol>\n<p>Send the token as the value of the <code>Authorization</code> header (formatted as <code>Bearer YOUR_TOKEN</code>) on any<br><code>/workspaces/api/...</code> request. That's it — you're authenticated.</p>\n<h4 id=\"token-characteristics\">Token characteristics</h4>\n<ul>\n<li><p><strong>No expiration.</strong> Valid until you explicitly revoke or re-generate it.</p>\n</li>\n<li><p><strong>Survives deploys.</strong> Restarts and deploys of the platform do not invalidate it.</p>\n</li>\n<li><p><strong>Independent of UI sessions.</strong> Logging in or out of the app does not affect the token, and creating the token does not log anyone out.</p>\n</li>\n<li><p><strong>Acts as the user.</strong> Requests authenticated with this token carry the integration account's full permissions — treat the token like a password.</p>\n</li>\n<li><p><strong>One active api token per user at a time.</strong> Re-generating creates a new one and invalidates the old one.</p>\n</li>\n<li><p><strong>Revocable anytime</strong> via the same Tools → Api Tokens screen, or programmatically via the <code>Revoke Api Token</code> request in the AUTH folder.</p>\n</li>\n</ul>\n<p>We strongly recommend <strong>rotating</strong> the token periodically to limit blast radius in the event of a leak.</p>\n<h3 id=\"42-obtaining-a-token-via-the-report-book-api\"><strong>4.2 Obtaining a token via the report-book API</strong></h3>\n<blockquote>\n<p><strong>Not recommended for production integrations.</strong> Use 4.1 unless you have a specific reason not to. </p>\n</blockquote>\n<p>Partners can also authenticate by calling <code>POST /workspaces/api/login</code> with email and password and using the returned bearer token directly. See the <code>Login</code> request in the AUTH folder for full details.</p>\n<h4 id=\"why-this-is-not-recommended\">Why this is not recommended</h4>\n<ul>\n<li><p><strong>Destroys active app sessions.</strong> Calling <code>POST /login</code> invalidates the user's existing session token — if the same user is currently signed in to the report-book UI, they will be <strong>signed out</strong>.</p>\n</li>\n<li><p><strong>Token expires after 7 days.</strong> You will need to re-login periodically. Each re-login produces a new token and (again) signs the user out of the app.</p>\n</li>\n<li><p><strong>Only one active session token per user at a time.</strong> Parallel integrations under the same user account will stomp on each other.</p>\n</li>\n</ul>\n<p>The api token from section 4.1 has none of these downsides.</p>\n<h2 id=\"🌐-5-customer-tracking\"><strong>🌐 5. Customer Tracking</strong></h2>\n<p>After the Affiliate Platform is set, iGsuite will be able to generate tracking links that will be used to track the customers of the affiliates. At this point, the <strong>iGaming Platform</strong> should proceed with the integration process.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Main Participants:</th>\n<th><strong>The iGaming Platform</strong></th>\n</tr>\n</thead>\n<tbody>\n</tbody>\n</table>\n</div><h3 id=\"51-how-does-igsuite-track-the-customers\"><strong>5.1 How does iGsuite track the customers?</strong></h3>\n<p>Every Affiliate who has signed in the Affiliate Platform will have a unique tracking link. The Affiliate uses this link to refer the customers towards the Operator Brand. The customer journey is as follows:</p>\n<ol>\n<li><p>Customer clicks on the affiliate link</p>\n</li>\n<li><p>iGsuite tracking link redirects the customer to the given Landing Page by the Operator</p>\n</li>\n<li><p>A unique token is generated upon the redirect.</p>\n<ol>\n<li><p>This token is unique for every click</p>\n</li>\n<li><p>Through this token, we track the Customers</p>\n</li>\n</ol>\n</li>\n</ol>\n<h3 id=\"52-about-the-customer-token\"><strong>5.2 About The Customer Token</strong></h3>\n<p>The customer token is generated by iGsuite and is unique for every single customer! The customer token is generated when the customer clicks on any of the Affiliate Platform tracking links.</p>\n<ul>\n<li><p><em>Example of a Tracking Link:</em> <a href=\"http://www.affiliate-platform-domain.com/api/tracking-links/record?trackingLinkId=1&amp;affiliateId=1\"><b>www.Affiliate-Platform-Domain.com/api/tracking-links/record?trackingLinkId=1&amp;affiliateId=1<br></b></a></p>\n</li>\n<li><p><em>Example of where the Tracking Link will Redirect:</em> <a href=\"http://www.operator-brand.com/signup?15bedea716ee7a35279520b61aa3d2a5\"><b>www.Operator-Brand.com/signup?15bedea716ee7a35279520b61aa3d2a5</b></a></p>\n<ul>\n<li>The Token starts after the “?”</li>\n</ul>\n</li>\n<li><p><em>Example of the Customer Token</em><strong>:</strong><code>15bedea716ee7a35279520b61aa3d2a5</code></p>\n</li>\n</ul>\n<h3 id=\"53-token-requirements-from-the-igaming-operator\"><strong>5.3 Token Requirements from the iGaming Operator</strong></h3>\n<ol>\n<li><p>The iGaming Platform should ensure the following:</p>\n</li>\n<li><p>Requirements from the iGaming Operator:</p>\n<ol>\n<li><p>To store the customer token of the customer upon successful Registration</p>\n</li>\n<li><p>To return the token of the customer within the Registration File</p>\n</li>\n</ol>\n</li>\n<li><p>Customer Token Specifications:</p>\n<ol>\n<li>The token itself contains valuable information about the customer &amp; the Affiliate, such as:</li>\n</ol>\n</li>\n</ol>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Parameter</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><strong>affiliateId</strong></td>\n<td><strong>iGsuite ID of the affiliate this customer belongs to</strong></td>\n</tr>\n<tr>\n<td><strong>username</strong></td>\n<td><strong>The username of the affiliate</strong></td>\n</tr>\n<tr>\n<td><strong>ipAddress</strong></td>\n<td><strong>The IP Address that the customer accessed the landing page from</strong></td>\n</tr>\n<tr>\n<td><strong>referralLink</strong></td>\n<td><strong>The page the customer landed on after visiting the tracking link (nullable)</strong></td>\n</tr>\n<tr>\n<td><strong>externalAffiliateClickId</strong></td>\n<td><strong>The external click identifier the affiliate inserts through iGsuite when forming the tracking link</strong></td>\n</tr>\n<tr>\n<td><strong>trafficSource</strong></td>\n<td><strong>The type of traffic that the customer came from based on the type selected for the affiliate (Example: \"SEO\")</strong></td>\n</tr>\n<tr>\n<td><strong>trackingLinkId</strong></td>\n<td><strong>iGsuite ID of the tracking link this customer came from</strong></td>\n</tr>\n<tr>\n<td><strong>brandId</strong></td>\n<td><strong>iGsuite ID of the brand the tracking link points to</strong></td>\n</tr>\n<tr>\n<td><strong>brandName</strong></td>\n<td><strong>Display name of the brand the tracking link points to</strong></td>\n</tr>\n<tr>\n<td><strong>campaignId</strong></td>\n<td><strong>iGsuite ID of the campaign associated with the click (optional — present only when the affiliate set a campaign on the tracking link)</strong></td>\n</tr>\n<tr>\n<td><strong>campaignName</strong></td>\n<td><strong>Display name of the campaign (optional — present only when campaignId is present)</strong></td>\n</tr>\n</tbody>\n</table>\n</div><ul>\n<li><p>The iGaming Platform may decode the token to collect and store the provided information in the previous point.</p>\n</li>\n<li><p>The token is generated upon a click on the tracking links and it’s unique for each and every click.</p>\n</li>\n</ul>\n<h3 id=\"54-how-the-igaming-platform-can-decode-the-customer-token\"><strong>5.4 How The iGaming Platform Can Decode the Customer Token</strong></h3>\n<p>The iGaming Platform can decode the Customer Token in order to collect the embedded information for the customer via an API request.</p>\n<ul>\n<li><strong>You can find more information within the</strong> <a href=\"#5ddce0c7-c486-4ebc-8fb5-8129ad6326d3\">Tracking</a> <strong>section of the documentation.</strong></li>\n</ul>\n<h2 id=\"🤝-6-data-integration\"><strong>🤝 6. Data integration</strong></h2>\n<p>The integration is achieved through HTTPS or SFTP where we expect to receive consistently the given set of files in the agreed format.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Main Participants:</th>\n<th><strong>The iGaming Platform</strong></th>\n</tr>\n</thead>\n<tbody>\n</tbody>\n</table>\n</div><h3 id=\"61-minimum-required-data--format\"><strong>6.1 Minimum Required Data &amp; Format</strong></h3>\n<p>In order to ensure stable and consistent data flow without interruption, iGsuite requires that The iGaming Platform respects the following basic <strong>requirements</strong>:</p>\n<ol>\n<li><p>The IGaming Platform will always provide two files with a different set of data:</p>\n<ol>\n<li><p>Registration File (see <a href=\"https://igsuite.postman.co/workspace/018a3f86-2f6c-447d-bf30-e224373f95f9/request/28572506-515b2251-88b6-4007-bd56-68044b9ccc54?action=share&amp;source=copy-link&amp;creator=17749899&amp;ctx=documentation\">Import Customers</a>)</p>\n</li>\n<li><p>Activity File (see <a href=\"https://igsuite.postman.co/workspace/018a3f86-2f6c-447d-bf30-e224373f95f9/request/28572506-799ceec7-e632-4e3b-a8e2-e733fbe2b9c1?action=share&amp;source=copy-link&amp;creator=17749899&amp;ctx=documentation\">Import Activity</a>)</p>\n</li>\n</ol>\n</li>\n<li><p>The iGaming Platform should always respect the data Format requirements for every column</p>\n</li>\n<li><p>Each column should have a single header only. To make the integration easier, the exact header names can be discussed and changed prior to beginning the process.</p>\n</li>\n</ol>\n<p><strong>Note! All the fields in the CSV, JSON files and Body contents are subject to agreement between the two parties before beginning the daily integration process.</strong></p>\n<h3 id=\"62-sending-data-to-igsuite\"><strong>6.2 Sending data to iGsuite</strong></h3>\n<h4 id=\"sftp\"><strong>SFTP</strong></h4>\n<p>If you choose to proceed with the SFTP integration approach, our team will grant you server access and dedicated credentials for your iGsuite platform. To complete the process, simply upload two files - registrations.csv and activities.csv - into the files directory at the agreed times. Once uploaded, our team will handle the rest, ensuring that your data is seamlessly available in your iGsuite platform.</p>\n<blockquote>\n<p>Note: SFTP file uploads are not exercised in this collection. If you choose SFTP, the integration is arranged with our team outside Postman. </p>\n</blockquote>\n<h4 id=\"https\"><strong>HTTPS</strong></h4>\n<p>Data integration is achieved via API integration with your iGsuite instance. This method offers a more streamlined and automated approach and reduces the risk of file upload failures.</p>\n<p>The API integration with iGsuite involves two separate requests for the customer registration and activity files, respectively. These requests can be made using the example requests provided below. The baseURL corresponds to the URL of the provided iGsuite instance, which will be communicated to you separately.</p>\n<h4 id=\"sending-registration-file\"><strong>Sending Registration File</strong></h4>\n<p>To integrate data via API, a POST request is used to send the CSV file. The registration CSV file should adhere to the format described in <a href=\"https://igsuite.postman.co/workspace/018a3f86-2f6c-447d-bf30-e224373f95f9/request/28572506-515b2251-88b6-4007-bd56-68044b9ccc54?action=share&amp;source=copy-link&amp;creator=17749899&amp;ctx=documentation\">Import Customers</a>.</p>\n<h4 id=\"sending-activity-file\"><strong>Sending Activity File</strong></h4>\n<p>To integrate data via API, a POST request is used to send the CSV file. The activities CSV file should adhere to the format described in <a href=\"https://igsuite.postman.co/workspace/018a3f86-2f6c-447d-bf30-e224373f95f9/request/28572506-799ceec7-e632-4e3b-a8e2-e733fbe2b9c1?action=share&amp;source=copy-link&amp;creator=17749899&amp;ctx=documentation\">Import Activity</a>.</p>\n<p>⚠️ Note: Only customers who are affiliated with our system should be sent to us. Any customer record without an assigned affiliate or token must not be included in the import files. Submitting unregistered or unaffiliated customers will result in the files being rejected.</p>\n<h3 id=\"63-import-frequency\">6.3 Import Frequency</h3>\n<p>The frequency of data imports is fully customizable, depending on your integration method:</p>\n<ul>\n<li><p><strong>API Integration:</strong> If you're sending data via direct API, you may import data <strong>at any preferred interval</strong>—daily, hourly, or even in real-time. However, it's important to ensure a 5-min delay between the customer registration import and the corresponding activity import. This allows the system to process and calculate the relevant metrics accurately.</p>\n</li>\n<li><p><strong>SFTP Integration:</strong> If you choose to integrate via SFTP, please inform our team of your preferred import schedule during the initial integration setup. This enables us to configure the system accordingly and ensure timely and accurate data processing.</p>\n</li>\n</ul>\n<blockquote>\n<p>If the frequency of the import is Hourly or less, we insist on using overwrite method over merge.</p>\n</blockquote>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"28572506","collectionId":"a234ba01-2c09-4711-a83d-7f57c03a079a","publishedId":"2sA3s7k9k4","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"2B77FF"},"publishDate":"2025-01-09T11:38:33.000Z"},"item":[{"name":"AUTH","item":[{"name":"Get Api Token","id":"f3834732-cdb9-389a-9c01-c840a901754a","request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":false},"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"/workspaces/api/api-token","description":"<p>Returns metadata about the user's currently active long-lived api token, if one exists.</p>\n<blockquote>\n<p>⚠️ <strong>Auth requirements:</strong> this endpoint requires a <strong>2FA-verified UI session token</strong> obtained via <code>Login</code> followed by <code>Verify Token (2FA)</code> if 2FA is enabled on the account. Long-lived api tokens <strong>cannot</strong> be used to call this endpoint by design — manage api tokens from a session that is already verified through the regular login flow, or use the report-book UI (Tools → Api Tokens).</p>\n</blockquote>\n<h3 id=\"request\">Request</h3>\n<p>No request body or query parameters.</p>\n<h3 id=\"response\">Response</h3>\n<h4 id=\"200-ok\">200 Ok</h4>\n<p>The user has an active api token. Returns its metadata. The plaintext token value is <strong>not</strong> included — it is only returned at mint time via <code>Generate Api Token</code>.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-typescript\">{\n  id: number,\n  createdAt: string,         // ISO 8601 timestamp of when the token was created\n  lastUsedAt: string | null  // ISO 8601 timestamp of the most recent successful API call using this token, or null if never used\n}\n\n</code></pre>\n<h4 id=\"404-not-found\">404 Not Found</h4>\n<p>The user does not currently have an active api token.</p>\n","urlObject":{"path":["workspaces","api","api-token"],"host":[""],"query":[],"variable":[]}},"response":[],"_postman_id":"f3834732-cdb9-389a-9c01-c840a901754a"},{"name":"Generate Api Token","id":"425abad6-a42f-c6cc-70f0-1136a059f171","request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":false},"method":"POST","header":[],"url":"/workspaces/api/api-token","description":"<p>Generates a new long-lived api token for the authenticated user. If the user already has an active api token, it is <strong>immediately invalidated</strong> and a new one is created.</p>\n<p>The plaintext token is returned <strong>once</strong> in this response — store it immediately, you will not be able to retrieve it again.</p>\n<blockquote>\n<p>⚠️ <strong>Auth requirements:</strong> this endpoint requires a <strong>2FA-verified UI session token</strong> obtained via <code>Login</code> followed by <code>Verify Token (2FA)</code> if 2FA is enabled on the account. Long-lived api tokens <strong>cannot</strong> mint a new api token by design. The same operation is available without programmatic auth via the report-book UI (Tools → Api Tokens), which is the recommended path.</p>\n</blockquote>\n<h3 id=\"request\">Request</h3>\n<p>No request body or query parameters.</p>\n<h3 id=\"response\">Response</h3>\n<h4 id=\"201-created\">201 Created</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-typescript\">{\n  id: number,\n  createdAt: string,         // ISO 8601 timestamp of creation\n  lastUsedAt: string | null, // null on creation\n  token: string              // plaintext token — keep secret, store immediately, NOT retrievable later\n}\n\n</code></pre>\n<h3 id=\"token-characteristics\">Token characteristics</h3>\n<ul>\n<li><strong>No expiration.</strong> Once minted, the token is valid until explicitly revoked or replaced by a re-generation.</li>\n<li><strong>Survives deploys.</strong> Restarts and deploys of the platform do not invalidate it.</li>\n<li><strong>Acts as the user.</strong> Requests authenticated with this token carry the user's full permissions — treat it like a password.</li>\n<li><strong>Single active token per user.</strong> Generating a new token automatically revokes the previous one.</li>\n</ul>\n","urlObject":{"path":["workspaces","api","api-token"],"host":[""],"query":[],"variable":[]}},"response":[],"_postman_id":"425abad6-a42f-c6cc-70f0-1136a059f171"},{"name":"Revoke Api Token","id":"b5201070-e4ba-a75b-81b2-4b86315a830b","request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":false},"method":"DELETE","header":[],"url":"/workspaces/api/api-token","description":"<p>Revokes the user's currently active long-lived api token. Subsequent requests using the revoked token return <code>401 Unauthorized</code>.</p>\n<blockquote>\n<p>⚠️ <strong>Auth requirements:</strong> this endpoint requires a <strong>2FA-verified UI session token</strong> obtained via <code>Login</code> followed by <code>Verify Token (2FA)</code> if 2FA is enabled on the account. Long-lived api tokens <strong>cannot</strong> revoke themselves by design. The same operation is available via the report-book UI (Tools → Api Tokens → Disable).</p>\n</blockquote>\n<h3 id=\"request\">Request</h3>\n<p>No request body or query parameters.</p>\n<h3 id=\"response\">Response</h3>\n<h4 id=\"204-no-content\">204 No Content</h4>\n<p>The api token was successfully revoked. The user has no active api token after this call.</p>\n","urlObject":{"path":["workspaces","api","api-token"],"host":[""],"query":[],"variable":[]}},"response":[],"_postman_id":"b5201070-e4ba-a75b-81b2-4b86315a830b"},{"name":"Login","event":[{"listen":"test","script":{"id":"634f8ec3-3ed7-48ab-a0d2-db21b4592cd0","exec":["var token = pm.response.json().token","pm.environment.set(\"token\", token)","postman.setEnvironmentVariable(\"token\", token);",""],"type":"text/javascript","packages":{},"requests":{}}}],"id":"442fc0b0-5762-40f4-868a-5646bd47fa72","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"john.smith@email.com\",\n  \"password\": \"password123\"\n}"},"url":"/workspaces/api/login","description":"<p>This API endpoint authenticates a user and returns a short-lived <strong>session bearer token</strong> for use against <code>/api/*</code> endpoints.</p>\n<blockquote>\n<p>⚠️ <strong>For programmatic API integrations, this is the not-recommended path.</strong> The <strong>recommended</strong> way to authenticate a service is to obtain a long-lived api token via the report-book UI — see <strong>section 4.1</strong> of the collection overview. The flow described below has significant downsides — see <strong>section 4.2</strong>.</p>\n</blockquote>\n<h3 id=\"request-body\">Request Body</h3>\n<ul>\n<li><p><code>email</code> (string, required): The email address of the user.</p>\n</li>\n<li><p><code>password</code> (string, required): The password of the user.</p>\n</li>\n</ul>\n<h3 id=\"response\">Response</h3>\n<p>Upon successful login, the server returns:</p>\n<ul>\n<li><p><code>token</code> — the bearer token to send as <code>Authorization: Bearer &lt;token&gt;</code> on subsequent requests.</p>\n</li>\n<li><p><code>requiresTwoFactorAuthentication</code> — if <code>true</code>, the token is unverified and must be verified by calling <code>Verify Token (2FA)</code> with the code emailed to the user before it can be used on most endpoints.</p>\n</li>\n</ul>\n<h3 id=\"token-characteristics\">Token characteristics</h3>\n<ul>\n<li><p><strong>Short-lived:</strong> the session token expires after 7 days. After expiration, requests return <code>401 Unauthorized</code>. Generate a new one by logging in again.</p>\n</li>\n<li><p><strong>Session-bound:</strong> logging in via <code>POST /login</code> invalidates the user's previous active session token, including the one their active app session may be using. <strong>Performing this login while a person is signed in to the report-book UI under the same account will sign them out.</strong></p>\n</li>\n<li><p><strong>One active session token per user at a time.</strong> You cannot run parallel integrations under the same user account this way without them stomping on each other.</p>\n</li>\n</ul>\n","urlObject":{"path":["workspaces","api","login"],"host":[""],"query":[],"variable":[]}},"response":[{"id":"9a0ba204-ceaf-4f0c-af96-a8149f85e841","name":"Login","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"john.smith@email.com\",\n  \"password\": \"password123\"\n}"},"url":"/api/login"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"content-length","value":"131"},{"key":"content-type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Wed, 21 Aug 2024 06:31:00 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"type\": \"bearer\",\n    \"token\": \"someRandomCharactersComprisingAUniqueToken\",\n    \"requiresTwoFactorAuthentication\": false\n}"}],"_postman_id":"442fc0b0-5762-40f4-868a-5646bd47fa72"},{"name":"Verify Token (2FA)","event":[{"listen":"test","script":{"type":"text/javascript","exec":["// 2FA verification returns an empty body on success.","// The token obtained from Login becomes verified server-side; no extraction needed here."]}}],"id":"6d831525-0605-4e2e-bac2-efda4ae14bfc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n  \"code\": \"12345678\"\n}","options":{"raw":{"language":"json"}}},"url":"/workspaces/api/verify-token","description":"<h3 id=\"request\">Request</h3>\n<p>The endpoint is used for token verification, given that you've got 2-Factor Authentication enabled. Upon logging in, a code will be sent to the email address associated with the account in question. This exact code should be included in the request body.</p>\n<h4 id=\"request-body\">Request Body</h4>\n<ul>\n<li><code>code</code> (string, required): The code to be verified.</li>\n</ul>\n","urlObject":{"path":["workspaces","api","verify-token"],"host":[""],"query":[],"variable":[]}},"response":[{"id":"30daa000-ad0c-46d6-ba6c-fdbb4e646c64","name":"Verify Token (2FA)","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n  \"code\": \"12345678\"\n}","options":{"raw":{"language":"json"}}},"url":"/workspaces/api/verify-token"},"status":"OK","code":200,"_postman_previewlanguage":"plain","header":[{"key":"Date","value":"Wed, 21 Aug 2024 06:39:36 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"},{"key":"Transfer-Encoding","value":"chunked"}],"cookie":[],"responseTime":null,"body":null}],"_postman_id":"6d831525-0605-4e2e-bac2-efda4ae14bfc"}],"id":"59a78ccd-bc5b-484d-927b-3bd86b1b2494","_postman_id":"59a78ccd-bc5b-484d-927b-3bd86b1b2494","description":""},{"name":"AFFILIATE","item":[{"name":"Affiliates","event":[{"listen":"test","script":{"id":"b2374704-6068-44c4-abb4-dbfda194aebc","exec":[""],"type":"text/javascript","packages":{},"requests":{}}}],"id":"5f230c83-44b3-4930-ac7c-7ee827bc0c70","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":false},"method":"GET","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":""},"url":"/workspaces/api/affiliates","description":"<p>This endpoint returns a paginated list of affiliates. By default the response includes all affiliates the requester has access to, ordered newest first. The list can be narrowed via optional query parameters.</p>\n<h4 id=\"request\">Request</h4>\n<p>All query parameters are optional:</p>\n<ul>\n<li><p><code>type</code> (string) — Filter by affiliate status. One of: <code>approved</code>, <code>rejected</code>, <code>waiting</code>, <code>suspended</code>. Returns 400 Bad Request if any other value is supplied.</p>\n</li>\n<li><p><code>search</code> (string) — Substring match against affiliate name, username, email, website, or numeric id.</p>\n</li>\n<li><p><code>page</code> (integer) — Page number (&gt;= 1). Default: 1.</p>\n</li>\n<li><p><code>perPage</code> (integer) — Page size. Default: 15.</p>\n</li>\n</ul>\n<p>Filters compose: <code>?type=approved&amp;search=nik</code> returns approved affiliates whose name/username/email/website contains \"nik\".</p>\n<h4 id=\"response\">Response</h4>\n<h5 id=\"200-ok\">200 OK</h5>\n<p>Returns a JSON object with two top-level keys:</p>\n<ul>\n<li><p><code>meta</code> — pagination information (total records, perPage, currentPage, lastPage, firstPage, etc.).</p>\n</li>\n<li><p><code>data</code> — array of affiliate objects.</p>\n</li>\n</ul>\n<h5 id=\"400-bad-request\">400 Bad Request</h5>\n<p>Returned when <code>type</code> is not one of the allowed values listed above.</p>\n","urlObject":{"path":["workspaces","api","affiliates"],"host":[""],"query":[{"disabled":true,"description":{"content":"<p>Filter by affiliate status. One of: approved, rejected, waiting, suspended.</p>\n","type":"text/plain"},"key":"type","value":"approved"},{"disabled":true,"description":{"content":"<p>Substring match against affiliate name, username, email, website, or numeric id.</p>\n","type":"text/plain"},"key":"search","value":"nik"},{"disabled":true,"description":{"content":"<p>Page number (&gt;= 1). Default: 1.</p>\n","type":"text/plain"},"key":"page","value":"1"},{"disabled":true,"description":{"content":"<p>Page size. Default: 15.</p>\n","type":"text/plain"},"key":"perPage","value":"15"}],"variable":[]}},"response":[{"id":"cf658dc1-9346-4ff3-ae46-aaf0bdd2e037","name":"Affiliates","originalRequest":{"method":"GET","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":""},"url":{"raw":"/workspaces/api/affiliates?type=approved","path":["workspaces","api","affiliates"],"query":[{"key":"type","value":"approved"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 24 Sep 2024 11:30:16 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"x-ratelimit-limit","value":"600"},{"key":"x-ratelimit-remaining","value":"599"},{"key":"x-do-app-origin","value":"c3e1d531-2936-4810-8479-54fa5cf2030c"},{"key":"Cache-Control","value":"private"},{"key":"x-do-orig-status","value":"200"},{"key":"Last-Modified","value":"Tue, 24 Sep 2024 11:30:16 GMT"},{"key":"CF-Cache-Status","value":"MISS"},{"key":"Set-Cookie","value":"__cf_bm=hKUEi3TwQDuBtpX7FmCB7egkljvDXNkRTl5hek.4gqs-1727177416-1.0.1.1-hM9aZV4NqAzb2c2h0y.A.Kh.8RsHSVo97pk.J4vIAbyy9xyY8OUyz0JG7Ym8RWaM5HJD0Y7EatNOe9o_xR4UOg; path=/; expires=Tue, 24-Sep-24 12:00:16 GMT; domain=.develop.report-book.com; HttpOnly; Secure; SameSite=None"},{"key":"Vary","value":"Accept-Encoding"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"8c8271060a34d0ea-SOF"},{"key":"Content-Encoding","value":"br"}],"cookie":[],"responseTime":null,"body":"{\n    \"meta\": {\n        \"total\": 15784,\n        \"perPage\": 15,\n        \"currentPage\": 1,\n        \"lastPage\": 1053,\n        \"firstPage\": 1,\n        \"firstPageUrl\": \"/?page=1\",\n        \"lastPageUrl\": \"/?page=1053\",\n        \"nextPageUrl\": \"/?page=2\",\n        \"previousPageUrl\": null\n    },\n    \"data\": [\n        {\n            \"id\": 1,\n            \"email\": \"niki@email.com\",\n            \"username\": \"niki\",\n            \"name\": \"Nicholas Smith\",\n            \"statusReason\": \"\",\n            \"masterAffiliateId\": null,\n            \"approved\": \"2023-05-19T08:07:38.840+00:00\",\n            \"rejected\": null,\n            \"suspended\": null,\n            \"createdAt\": \"2023-04-12T06:32:36.455+00:00\",\n            \"updatedAt\": \"2023-11-28T02:20:00.041+00:00\",\n            \"twoFactorAuthMethod\": \"email\",\n            \"labelId\": 3,\n            \"label\": {\n                \"id\": 3,\n                \"name\": \"dormant\"\n            },\n            \"affiliateProfile\": {\n                \"id\": 5,\n                \"website\": \"https://front-butter.com\",\n                \"paymentType\": \"Other\",\n                \"expectedVolumes\": \"1-10 FTD's\",\n                \"businessModel\": \"Hybrid\",\n                \"agreedToTerms\": null,\n                \"receivePromotionalMaterials\": \"2023-04-12T06:32:36.608+00:00\",\n                \"receiveUpdates\": \"2023-04-12T06:32:36.608+00:00\",\n                \"affiliateId\": 11,\n                \"firstTimeActive\": null,\n                \"registeredAt\": \"2021-10-14T23:00:07.706+00:00\",\n                \"createdAt\": \"2023-04-12T06:32:36.609+00:00\",\n                \"updatedAt\": \"2023-04-12T06:32:36.609+00:00\",\n                \"address\": null,\n                \"city\": null,\n                \"zipCode\": null,\n                \"taxNumber\": null,\n                \"countryId\": null,\n                \"companyName\": null,\n                \"mainProduct\": null,\n                \"trafficSourceId\": 7\n            }\n        },\n        ...\n    ]\n}"}],"_postman_id":"5f230c83-44b3-4930-ac7c-7ee827bc0c70"},{"name":"Affiliate","event":[{"listen":"test","script":{"id":"72ad6de9-167f-479e-9250-a537b6682b28","exec":[""],"type":"text/javascript","packages":{},"requests":{}}}],"id":"98e42015-2d39-466b-9af4-5590eed37ac3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":false},"method":"GET","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":""},"url":"/workspaces/api/affiliates/1","description":"<p>This endpoint retrieves the details of a specific affiliate based on the provided <code>id</code> in the URL path. A request to <code>/workspaces/api/affiliates/1</code> would return information about the affiliate with id <code>1</code>.</p>\n<h4 id=\"request\">Request</h4>\n<p>No request body is required for this endpoint.</p>\n<h4 id=\"response\">Response</h4>\n<p>The response will be a JSON object containing information about the affiliate in question, their role, permissions and manager.</p>\n<p>If the provided <code>id</code> does not correspond to an affiliate user, the response will be the following:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">  {\n    \"error\": \"User is not an affiliate\",\n    \"debug\": \"ForbiddenException: User is not an affiliate\"\n  }\n\n</code></pre>\n","urlObject":{"path":["workspaces","api","affiliates","1"],"host":[""],"query":[],"variable":[]}},"response":[{"id":"50090870-0f7d-4e60-a7cc-d96ee528f66a","name":"Affiliate","originalRequest":{"method":"GET","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":""},"url":"/workspaces/api/affiliates/1"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 24 Sep 2024 10:20:17 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"x-ratelimit-limit","value":"600"},{"key":"x-ratelimit-remaining","value":"597"},{"key":"x-do-app-origin","value":"c3e1d531-2936-4810-8479-54fa5cf2030c"},{"key":"Cache-Control","value":"private"},{"key":"x-do-orig-status","value":"200"},{"key":"CF-Cache-Status","value":"MISS"},{"key":"Last-Modified","value":"Tue, 24 Sep 2024 10:20:17 GMT"},{"key":"Vary","value":"Accept-Encoding"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"8c820a7dea5a20ca-IAD"},{"key":"Content-Encoding","value":"br"}],"cookie":[],"responseTime":null,"body":"{\n    \"id\": 1,\n    \"email\": \"niki.smith@email.com\",\n    \"username\": \"niki\",\n    \"name\": \"Nicholas Smith\",\n    \"statusReason\": \"\",\n    \"masterAffiliateId\": null,\n    \"approved\": \"2023-05-19T08:07:38.840+00:00\",\n    \"rejected\": null,\n    \"suspended\": null,\n    \"createdAt\": \"2023-04-12T06:32:36.455+00:00\",\n    \"updatedAt\": \"2023-11-28T02:20:00.041+00:00\",\n    \"twoFactorAuthMethod\": \"email\",\n    \"labelId\": 3,\n    \"roles\": [\n        {\n            \"id\": 3,\n            \"slug\": \"affiliate\",\n            \"name\": \"Affiliate\",\n            \"description\": \"Affiliate Role\",\n            \"createdAt\": \"2023-04-12T06:32:27.011+00:00\",\n            \"updatedAt\": \"2023-04-12T06:32:27.011+00:00\"\n        }\n    ],\n    \"permissions\": [\n        {\n            \"id\": 11,\n            \"slug\": \"view-own-reports\",\n            \"name\": \"View Own Reports\",\n            \"description\": \"View own reports permission\",\n            \"parentPermissionId\": null,\n            \"createdAt\": \"2023-04-12T06:30:54.754+00:00\",\n            \"updatedAt\": \"2023-04-12T06:30:54.754+00:00\"\n        },\n        {\n            \"id\": 12,\n            \"slug\": \"view-own-tracking-links\",\n            \"name\": \"Affiliate View Tracking Links\",\n            \"description\": \"Affiliate View Tracking Links\",\n            \"parentPermissionId\": null,\n            \"createdAt\": \"2023-04-12T06:30:55.264+00:00\",\n            \"updatedAt\": \"2023-04-12T06:30:55.265+00:00\"\n        },\n        {\n            \"id\": 13,\n            \"slug\": \"view-own-dashboard\",\n            \"name\": \"View Own Dashboard\",\n            \"description\": \"View Own Dashboard relates to Affiliate View\",\n            \"parentPermissionId\": null,\n            \"createdAt\": \"2023-04-12T06:30:55.786+00:00\",\n            \"updatedAt\": \"2023-04-12T06:30:55.786+00:00\"\n        }\n    ],\n    \"affiliateResponsibleUsers\": [\n        {\n            \"id\": 1,\n            \"email\": \"virk@adonisjs.com\",\n            \"username\": \"virk@adonis\",\n            \"name\": \"Gwendolyn Padberg\",\n            \"statusReason\": \"\",\n            \"masterAffiliateId\": null,\n            \"approved\": \"2023-04-12T06:31:53.007+00:00\",\n            \"rejected\": null,\n            \"suspended\": null,\n            \"createdAt\": \"2023-04-12T06:31:53.188+00:00\",\n            \"updatedAt\": \"2023-04-12T06:31:53.188+00:00\",\n            \"twoFactorAuthMethod\": null,\n            \"labelId\": null\n        }\n    ],\n    \"affiliateProfile\": {\n        \"id\": 5,\n        \"website\": \"https://front-butter.com\",\n        \"paymentType\": \"Other\",\n        \"expectedVolumes\": \"1-10 FTD's\",\n        \"businessModel\": \"Hybrid\",\n        \"agreedToTerms\": null,\n        \"receivePromotionalMaterials\": \"2023-04-12T06:32:36.608+00:00\",\n        \"receiveUpdates\": \"2023-04-12T06:32:36.608+00:00\",\n        \"affiliateId\": 11,\n        \"firstTimeActive\": null,\n        \"registeredAt\": \"2021-10-14T23:00:07.706+00:00\",\n        \"createdAt\": \"2023-04-12T06:32:36.609+00:00\",\n        \"updatedAt\": \"2023-04-12T06:32:36.609+00:00\",\n        \"address\": null,\n        \"city\": null,\n        \"zipCode\": null,\n        \"taxNumber\": null,\n        \"countryId\": null,\n        \"companyName\": null,\n        \"mainProduct\": null,\n        \"trafficSourceId\": 7,\n        \"country\": null\n    },\n    \"userProfile\": null,\n    \"firstManager\": {\n        \"id\": 1,\n        \"email\": \"virk@adonisjs.com\",\n        \"username\": \"virk@adonis\",\n        \"name\": \"Gwendolyn Padberg\",\n        \"statusReason\": \"\",\n        \"masterAffiliateId\": null,\n        \"approved\": \"2023-04-12T06:31:53.007+00:00\",\n        \"rejected\": null,\n        \"suspended\": null,\n        \"createdAt\": \"2023-04-12T06:31:53.188+00:00\",\n        \"updatedAt\": \"2023-04-12T06:31:53.188+00:00\",\n        \"twoFactorAuthMethod\": null,\n        \"labelId\": null\n    }\n}"}],"_postman_id":"98e42015-2d39-466b-9af4-5590eed37ac3"}],"id":"bf6018e1-9352-4236-9990-05a4b22c0414","_postman_id":"bf6018e1-9352-4236-9990-05a4b22c0414","description":""},{"name":"CUSTOMER","item":[{"name":"Customer","id":"535b2c7d-902f-4d04-a465-962fcff27ec4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":false},"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"/workspaces/api/customers/1","description":"<p>This endpoint retrieves the details of a specific customer based on the provided <code>id</code> in the URL path. A request to <code>/workspaces/api/customers/1</code> would return information about the customer with id <code>1</code>.</p>\n<h4 id=\"request\">Request</h4>\n<p>No request body is required for this endpoint.</p>\n<h4 id=\"200-ok\">200 OK</h4>\n<p>The response will be a JSON object containing information about the customer and their activities.</p>\n","urlObject":{"path":["workspaces","api","customers","1"],"host":[""],"query":[],"variable":[]}},"response":[{"id":"5ffa736d-8498-4cc4-9b26-99749d236234","name":"Customer","originalRequest":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"/workspaces/api/customers/1"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"content-length","value":"3115"},{"key":"content-type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Wed, 21 Aug 2024 06:49:36 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"id\": 1,\n    \"externalCustomerId\": \"4e93dc11-da3f-4f14-8591-f200cca48a0e\",\n    \"token\": null,\n    \"externalCustomerStatus\": null,\n    \"qualifiedCpaAt\": null,\n    \"countryId\": 69,\n    \"affiliateId\": 11,\n    \"brandId\": 4,\n    \"dealId\": 50,\n    \"registrationTrackingLinkClickId\": null,\n    \"firstTimeActive\": \"2024-08-19T00:00:00.000+03:00\",\n    \"registeredAt\": \"2024-08-20T00:00:00.000+03:00\",\n    \"createdAt\": \"2024-08-20T09:15:00.376+03:00\",\n    \"updatedAt\": \"2024-08-20T09:15:04.565+03:00\",\n    \"activities\": [\n        {\n            \"id\": 1,\n            \"ftd\": true,\n            \"ftdAmount\": 500,\n            \"depositsAmount\": 500,\n            \"withdrawalsAmount\": 10,\n            \"betsAmount\": 500,\n            \"winsAmount\": 100,\n            \"bonusCost\": 100,\n            \"ggr\": 400,\n            \"adminFee\": 100,\n            \"ngr\": 296,\n            \"totalFees\": 4,\n            \"depositsCount\": 1,\n            \"createdAt\": \"2024-08-20T09:15:00.455+03:00\",\n            \"updatedAt\": \"2024-08-20T09:15:04.549+03:00\",\n            \"dealActionId\": 6,\n            \"meta\": {\n                \"through_customer_id\": 1\n            }\n        }\n    ],\n    \"meta\": {}\n}"}],"_postman_id":"535b2c7d-902f-4d04-a465-962fcff27ec4"},{"name":"Customers","id":"e770710d-8ce0-472f-a93d-839479b1e616","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":false},"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"/workspaces/api/customers","description":"<p>The endpoint retrieves a list of customers with pagination support. It accepts optional parameters for page number and items per page (refer to the <strong>Query Params</strong> section). If omitted, default pagination parameters will be used.</p>\n<h3 id=\"request\">Request</h3>\n<p>No request body is required for this endpoint.</p>\n<h3 id=\"200-ok\">200 OK</h3>\n<p>A successful response returns a JSON object with two main keys:</p>\n<ul>\n<li><p><code>meta</code>: This key contains pagination information, such as the total number of records, the number of records per page, the current page, etc.</p>\n</li>\n<li><p><code>data</code>: This key holds an array of objects containing data about customers, along with their respective activities.</p>\n</li>\n</ul>\n","urlObject":{"path":["workspaces","api","customers"],"host":[""],"query":[{"disabled":true,"description":{"content":"<p>Page number (&gt;= 1). Default: 1</p>\n","type":"text/plain"},"key":"page","value":"1"},{"disabled":true,"description":{"content":"<p>Results per page. Default: 15</p>\n","type":"text/plain"},"key":"perPage","value":"15"}],"variable":[]}},"response":[{"id":"74831515-9d2c-4680-993b-1cafd5d45b1b","name":"Customers","originalRequest":{"method":"GET","header":[{"key":"page","value":"2","type":"text","disabled":true},{"key":"perPage","value":"15","type":"text","disabled":true}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":{"raw":"/workspaces/api/customers?page=1&perPage=2","path":["workspaces","api","customers"],"query":[{"key":"page","value":"1"},{"key":"perPage","value":"2"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"content-length","value":"4201"},{"key":"content-type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Wed, 21 Aug 2024 06:51:23 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"meta\": {\n        \"total\": 25,\n        \"perPage\": 2,\n        \"currentPage\": 1,\n        \"lastPage\": 13,\n        \"firstPage\": 1,\n        \"firstPageUrl\": \"/?page=1\",\n        \"lastPageUrl\": \"/?page=13\",\n        \"nextPageUrl\": \"/?page=2\",\n        \"previousPageUrl\": null\n    },\n    \"data\": [\n        {\n            \"id\": 17,\n            \"externalCustomerId\": \"56789\",\n            \"token\": \"token12345\",\n            \"externalCustomerStatus\": \"Duplicate Account\",\n            \"qualifiedCpaAt\": null,\n            \"countryId\": 136,\n            \"affiliateId\": 16,\n            \"brandId\": 2,\n            \"dealId\": 50,\n            \"registrationTrackingLinkClickId\": null,\n            \"firstTimeActive\": \"2024-08-20T00:00:00.000+03:00\",\n            \"registeredAt\": \"2024-08-20T00:00:00.000+03:00\",\n            \"createdAt\": \"2024-08-20T09:15:02.447+03:00\",\n            \"updatedAt\": \"2024-08-20T14:43:41.544+03:00\",\n            \"activities\": [\n                {\n                    \"id\": 71,\n                    \"ftd\": true,\n                    \"ftdAmount\": 50,\n                    \"depositsAmount\": 30290,\n                    \"withdrawalsAmount\": 10520,\n                    \"betsAmount\": 70016,\n                    \"winsAmount\": 12004,\n                    \"bonusCost\": 37,\n                    \"ggr\": 58012,\n                    \"adminFee\": 14503,\n                    \"ngr\": 57394.88,\n                    \"totalFees\": 580.12,\n                    \"depositsCount\": 3,\n                    \"createdAt\": \"2024-08-20T09:15:02.501+03:00\",\n                    \"updatedAt\": \"2024-08-20T09:15:04.549+03:00\",\n                    \"dealActionId\": 86,\n                    \"meta\": {\n                        \"through_customer_id\": 17\n                    }\n                },\n                {\n                    \"id\": 74,\n                    \"ftd\": false,\n                    \"ftdAmount\": 0,\n                    \"depositsAmount\": 50,\n                    \"withdrawalsAmount\": 3500,\n                    \"betsAmount\": 70000,\n                    \"winsAmount\": 12000,\n                    \"bonusCost\": 150,\n                    \"ggr\": 58000,\n                    \"adminFee\": 14500,\n                    \"ngr\": 57270,\n                    \"totalFees\": 580,\n                    \"depositsCount\": 1,\n                    \"createdAt\": \"2024-08-20T09:15:02.560+03:00\",\n                    \"updatedAt\": \"2024-08-20T09:15:04.549+03:00\",\n                    \"dealActionId\": 91,\n                    \"meta\": {\n                        \"through_customer_id\": 17\n                    }\n                },\n                {\n                    \"id\": 75,\n                    \"ftd\": false,\n                    \"ftdAmount\": 0,\n                    \"depositsAmount\": 15120,\n                    \"withdrawalsAmount\": 3510,\n                    \"betsAmount\": 800,\n                    \"winsAmount\": 20,\n                    \"bonusCost\": 50,\n                    \"ggr\": 780,\n                    \"adminFee\": 195,\n                    \"ngr\": 722.2,\n                    \"totalFees\": 7.8,\n                    \"depositsCount\": 1,\n                    \"createdAt\": \"2024-08-20T09:15:02.580+03:00\",\n                    \"updatedAt\": \"2024-08-20T09:15:04.549+03:00\",\n                    \"dealActionId\": 92,\n                    \"meta\": {\n                        \"through_customer_id\": 17\n                    }\n                },\n                {\n                    \"id\": 76,\n                    \"ftd\": false,\n                    \"ftdAmount\": 0,\n                    \"depositsAmount\": 15920,\n                    \"withdrawalsAmount\": 3520,\n                    \"betsAmount\": 200,\n                    \"winsAmount\": 0,\n                    \"bonusCost\": 150,\n                    \"ggr\": 200,\n                    \"adminFee\": 50,\n                    \"ngr\": 48,\n                    \"totalFees\": 2,\n                    \"depositsCount\": 1,\n                    \"createdAt\": \"2024-08-20T09:15:02.599+03:00\",\n                    \"updatedAt\": \"2024-08-20T09:15:04.549+03:00\",\n                    \"dealActionId\": 93,\n                    \"meta\": {\n                        \"through_customer_id\": 17\n                    }\n                }\n            ],\n            \"meta\": {}\n        },\n        {\n            \"id\": 16,\n            \"externalCustomerId\": \"5678910\",\n            \"token\": \"token123456\",\n            \"externalCustomerStatus\": \"Confirmed Fraud\",\n            \"qualifiedCpaAt\": null,\n            \"countryId\": 23,\n            \"affiliateId\": 16,\n            \"brandId\": 2,\n            \"dealId\": 50,\n            \"registrationTrackingLinkClickId\": null,\n            \"firstTimeActive\": \"2024-08-20T00:00:00.000+03:00\",\n            \"registeredAt\": \"2024-08-20T00:00:00.000+03:00\",\n            \"createdAt\": \"2024-08-20T09:15:02.447+03:00\",\n            \"updatedAt\": \"2024-08-20T14:43:41.544+03:00\",\n            \"activities\": [\n                {\n                    \"id\": 87,\n                    \"ftd\": false,\n                    \"ftdAmount\": 0,\n                    \"depositsAmount\": 705,\n                    \"withdrawalsAmount\": 0,\n                    \"betsAmount\": 8916.27,\n                    \"winsAmount\": 8078.1,\n                    \"bonusCost\": 134.52,\n                    \"ggr\": 838.17,\n                    \"adminFee\": 209.54,\n                    \"ngr\": 703.65,\n                    \"totalFees\": 0,\n                    \"depositsCount\": 2,\n                    \"createdAt\": \"2024-08-20T13:22:24.734+03:00\",\n                    \"updatedAt\": \"2024-08-20T13:55:24.817+03:00\",\n                    \"dealActionId\": 123,\n                    \"meta\": {\n                        \"through_customer_id\": 16\n                    }\n                },\n                {\n                    \"id\": 77,\n                    \"ftd\": true,\n                    \"ftdAmount\": 50,\n                    \"depositsAmount\": 30290,\n                    \"withdrawalsAmount\": 10520,\n                    \"betsAmount\": 70016,\n                    \"winsAmount\": 12004,\n                    \"bonusCost\": 37,\n                    \"ggr\": 58012,\n                    \"adminFee\": 14503,\n                    \"ngr\": 55615.86,\n                    \"totalFees\": 2359.14,\n                    \"depositsCount\": 3,\n                    \"createdAt\": \"2024-08-20T09:15:02.619+03:00\",\n                    \"updatedAt\": \"2024-08-20T09:15:04.549+03:00\",\n                    \"dealActionId\": 87,\n                    \"meta\": {\n                        \"through_customer_id\": 16\n                    }\n                },\n                {\n                    \"id\": 80,\n                    \"ftd\": false,\n                    \"ftdAmount\": 0,\n                    \"depositsAmount\": 50,\n                    \"withdrawalsAmount\": 3500,\n                    \"betsAmount\": 70000,\n                    \"winsAmount\": 12000,\n                    \"bonusCost\": 150,\n                    \"ggr\": 58000,\n                    \"adminFee\": 14500,\n                    \"ngr\": 56792.5,\n                    \"totalFees\": 1057.5,\n                    \"depositsCount\": 1,\n                    \"createdAt\": \"2024-08-20T09:15:02.672+03:00\",\n                    \"updatedAt\": \"2024-08-20T09:15:04.549+03:00\",\n                    \"dealActionId\": 97,\n                    \"meta\": {\n                        \"through_customer_id\": 16\n                    }\n                },\n                {\n                    \"id\": 81,\n                    \"ftd\": false,\n                    \"ftdAmount\": 0,\n                    \"depositsAmount\": 15120,\n                    \"withdrawalsAmount\": 3510,\n                    \"betsAmount\": 800,\n                    \"winsAmount\": 20,\n                    \"bonusCost\": 50,\n                    \"ggr\": 780,\n                    \"adminFee\": 195,\n                    \"ngr\": 63.7,\n                    \"totalFees\": 666.3,\n                    \"depositsCount\": 1,\n                    \"createdAt\": \"2024-08-20T09:15:02.689+03:00\",\n                    \"updatedAt\": \"2024-08-20T09:15:04.549+03:00\",\n                    \"dealActionId\": 98,\n                    \"meta\": {\n                        \"through_customer_id\": 16\n                    }\n                },\n                {\n                    \"id\": 82,\n                    \"ftd\": false,\n                    \"ftdAmount\": 0,\n                    \"depositsAmount\": 15920,\n                    \"withdrawalsAmount\": 3520,\n                    \"betsAmount\": 200,\n                    \"winsAmount\": 0,\n                    \"bonusCost\": 150,\n                    \"ggr\": 200,\n                    \"adminFee\": 50,\n                    \"ngr\": -644.4,\n                    \"totalFees\": 694.4,\n                    \"depositsCount\": 1,\n                    \"createdAt\": \"2024-08-20T09:15:02.705+03:00\",\n                    \"updatedAt\": \"2024-08-20T09:15:04.549+03:00\",\n                    \"dealActionId\": 99,\n                    \"meta\": {\n                        \"through_customer_id\": 16\n                    }\n                }\n            ],\n            \"meta\": {}\n        }\n    ]\n}"}],"_postman_id":"e770710d-8ce0-472f-a93d-839479b1e616"},{"name":"Import Customers","event":[{"listen":"test","script":{"id":"e733c894-bff4-47b6-8803-448d10d7e73a","exec":[""],"type":"text/javascript","packages":{},"requests":{}}}],"id":"515b2251-88b6-4007-bd56-68044b9ccc54","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"value":"","key":"file","type":"file"},{"value":"<case_sensitive_platform_name>","uuid":"deef6df0-b7ba-4f50-9174-af860a24788e","description":"<p>(Optional) A specific Platform configuration to use for the imported data.</p>\n","key":"platform","type":"text","disabled":true}]},"url":"/workspaces/api/customers/import","description":"<p>This endpoint allows you to import customer data via <code>file</code> or <code>json body</code>.</p>\n<ul>\n<li><p><code>file</code> import</p>\n<ul>\n<li><p>The request body should be of type <code>form-data</code>, with a key \"file\" of type <code>File</code>.</p>\n</li>\n<li><p>The format of the file could be either <code>csv</code>, <code>xlsx</code> or <code>json</code></p>\n</li>\n<li><p>It is recommended that the <code>Content-Type</code> header is set to <code>multipart/form-data</code></p>\n</li>\n</ul>\n</li>\n<li><p><code>json body</code> import</p>\n<ul>\n<li><p>The request body should be a json object in the file information format described below</p>\n</li>\n<li><p>It is recommended that the <code>Content-Type</code> header is set to <code>application/json</code></p>\n</li>\n</ul>\n</li>\n</ul>\n<h3 id=\"file-information\">File information</h3>\n<p>Regardless of the format, the headers included in the file should be the following:</p>\n<ul>\n<li><p><code>Customer</code> - this field should contain the <code>id</code> of the customer.</p>\n</li>\n<li><p><code>Token (optional)</code> - this field should contain the <code>token</code> of the customer, if they have such.</p>\n</li>\n<li><p><code>Customer Join Date</code> - date on which the customer joined the platform in format - <code>DD/MM/YYYY</code>.</p>\n</li>\n<li><p><code>Customer Country</code> - this field should contain the country from which the customer registered. It can either be the full country name or the country code based on <strong>ISO 3166-1 alpha-2/3</strong></p>\n</li>\n<li><p><code>Brand</code> - this field should contain the brand under which the customer is.</p>\n</li>\n<li><p><code>Affiliate</code> - the <code>username</code> of the Affiliate under which the customer has been registered.</p>\n</li>\n<li><p><code>CPA Excluded</code> - whether the Customer should be permanently excluded from CPA generation.</p>\n</li>\n</ul>\n<blockquote>\n<p>These are the default headers. As per our Client Integration documentation, their names can be completely and freely customized by communicating this need with our administration team. </p>\n</blockquote>\n<h3 id=\"request-body\">Request Body</h3>\n<ul>\n<li><code>file</code> (file): The file containing the activities to be imported. It can either be <code>csv</code>, <code>xlsx</code> or <code>json</code></li>\n</ul>\n<p>OR</p>\n<ul>\n<li>JSON body with the imported data, describing the file information as explained below. This is an alternative to directly import JSON, without first writing it to a JSON file.</li>\n</ul>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">// An array of objects with imported data in described format\n[\n  {\n   \"Brand\": \"BrandName\",\n   \"Affiliate\": \"AffiliateUsername\",\n    // ...rest of the keys mentioned in File Information (or different, if configured otherwise)\n  }\n]\n\n</code></pre>\n<h3 id=\"response\">Response</h3>\n<h4 id=\"200-ok\">200 Ok</h4>\n<p>This response will be returned when the request was successfully, but we found no data to import. Either the file was empty, contained data that we could not recognize at all, or all of its contents are already present on our side.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-typescript\">{\n    message: string\n}\n\n</code></pre>\n<h4 id=\"201-created\">201 Created</h4>\n<p>This response will be returned when all of the rows were valid and successfully imported. Further processing will happen in the background, and their ultimate registration and display in the platform might lag behind this.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-typescript\">{\n    message: string\n}\n\n</code></pre>\n<h4 id=\"206-partial-content\">206 Partial Content</h4>\n<p>This response will be returned when some rows have been found to contain invalid data values, but not all. In this case we'll parse and import all valid rows and collect error information for the invalid ones with details as to why the data is considered to be invalid and we are not able to import these rows.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-typescript\">{\n  /**\n   * Response message\n   */\n  message: string,\n  /**\n   * Import details.\n   */\n  details: {\n    /**\n     * Number of rows which were found to be valid and successfully imported.\n     */\n    imported: number // number of imported rows\n    /**\n     * Number of rows which were found to have errors and were skipped from import.\n     */\n    skipped: number\n  }\n  /**\n   * An array of errors that were found in the imported data.\n   */\n  errors: Array&lt;{\n      /**\n       * The column that contains the invalid values.\n       */\n      column: string\n      /**\n       * Additional context and information as to why the data in the row is invalid.\n       */\n      message?: string\n      /**\n       * The row numbers that are invalid. They are indexed from 1.\n       * Header row will not be counted for CSV and XLSX files.\n       */\n      rows: number[]\n      /**\n       * String representation of the invalid values. They are ordered in their\n       * order of appearance, meaning that they match the rows at the same index.\n       */\n      values: string[]\n  }&gt;\n}\n\n</code></pre>\n<h4 id=\"400-bad-request\">400 Bad Request</h4>\n<p>This response will be returned upon receiving an invalid file or file that is missing information, such as a required column with data for the type of import.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-typescript\">{\n    /**\n     * Actual error message.\n     */\n    error: string,\n    /**\n     * Information for error debugging.\n     */\n    debug: {\n        /**\n         * Name of the column that lead to the error.\n         */\n        column: string,\n        /**\n         * The reason for the error.\n         */\n        reason: string,\n    }\n}\n\n</code></pre>\n<h4 id=\"429-too-many-requests\">429 Too Many Requests</h4>\n<p>This response will be returned when too many import requests have been sent in a short period of time among all import endpoints, including both customers and activities.</p>\n<p>Current rate allows for 10 requests per 1 minute.</p>\n","urlObject":{"path":["workspaces","api","customers","import"],"host":[""],"query":[],"variable":[]}},"response":[{"id":"1177fa2f-31c4-4a84-82f3-2b67f76202b8","name":"CSV Customers Import","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"multipart/form-data","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"platform","value":"<case_sensitive_platform_name>","description":"(Optional) A specific Platform configuration to use for the imported data.","type":"text","uuid":"da8e76b3-10cf-41cb-b56d-67190580657b","disabled":true},{"key":"file","type":"file","uuid":"39636a98-828d-43f3-a74c-1f70cc389de7","value":null}]},"url":"/workspaces/api/customers/import"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"content-length","value":"51"},{"key":"content-type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Wed, 21 Aug 2024 07:06:21 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Customers data imported successfully!\"\n}"},{"id":"0cfcfe47-dd26-41f6-ae5d-5660e01ce75a","name":"JSON Customers Import","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"raw","raw":" {\n      // \"platform\": \"<optional_case_sensitive_platform_name>\",\n\n      // This is the data that will be imported, and it is always REQUIRED.\n      \"data\": [\n          {\n              \"Customer\": \"12345\",\n              \"Token\": \"62caf7fd9d6a1ffa681e3a6c7dac165f\",\n              \"Customer Join Date\": \"DD/MM/YYYY\",\n              \"Customer Country\": \"Belgium\",\n              \"Brand\": \"brandName\",\n              \"Affiliate\": \"affiliateUsername\"\n          },\n          {\n              \"Customer\": \"123456\",\n              \"Token\": \"z62caf7fd9d6a1ffa681e3a6c7dac165\",\n              \"Customer Join Date\": \"DD/MM/YYYY\",\n              \"Customer Country\": \"ca\",\n              \"Brand\": \"brandName\",\n              \"Affiliate\": \"affiliateUsername\"\n          }\n      ]\n  }","options":{"raw":{"language":"json"}}},"url":"/workspaces/api/customers/import"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"content-length","value":"51"},{"key":"content-type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Wed, 21 Aug 2024 07:06:21 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Customers data imported successfully!\"\n}"}],"_postman_id":"515b2251-88b6-4007-bd56-68044b9ccc54"},{"name":"Import Customer Status Data","event":[{"listen":"test","script":{"id":"e733c894-bff4-47b6-8803-448d10d7e73a","exec":[""],"type":"text/javascript","packages":{},"requests":{}}}],"id":"1bfbf670-106f-4b49-9ef7-bd339e20c2d5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"value":"","key":"file","type":"file"},{"value":"<case_sensitive_platform_name>","uuid":"81cacfec-b851-4478-bb7c-d5f0010be408","description":"<p>(Optional) A specific Platform configuration to use for the imported data.</p>\n","key":"platform","type":"text","disabled":true}]},"url":"/workspaces/api/customers/status-import","description":"<p>This endpoint allows you to import customer status data via <code>file</code> or <code>json body</code>.</p>\n<ul>\n<li><p><code>file</code> import</p>\n<ul>\n<li><p>The request body should be of type <code>form-data</code>, with a key \"file\" of type <code>File</code>.</p>\n</li>\n<li><p>The format of the file could be either <code>csv</code>, <code>xlsx</code> or <code>json</code></p>\n</li>\n<li><p>It is recommended that the <code>Content-Type</code> header is set to <code>multipart/form-data</code></p>\n</li>\n</ul>\n</li>\n<li><p><code>json body</code> import</p>\n<ul>\n<li><p>The request body should be a json object in the file information format described below</p>\n<ul>\n<li>It is recommended that the <code>Content-Type</code> header is set to <code>application/json</code></li>\n</ul>\n</li>\n</ul>\n</li>\n</ul>\n<h3 id=\"file-information\">File information</h3>\n<p>Regardless of the format, the headers included in the file should be the following:</p>\n<ul>\n<li><p><code>Customer</code> - this field should contain the <code>id</code> of the customer</p>\n</li>\n<li><p><code>Status</code> - this field should contain the <code>status</code> of the customer.</p>\n</li>\n</ul>\n<blockquote>\n<p>These are the default headers. As per our Client Integration documentation, their names can be completely and freely customized by communicating this need with our administration team. </p>\n</blockquote>\n<blockquote>\n<p>We also support multiple Configurations per single Instance. This means that you can perform different imports with varying headers and other options. Configuration for the ongoing import request is selected by providing a valid <code>platform</code> parameter, associated with an additional configuration, along with the data to import. </p>\n</blockquote>\n<h3 id=\"request-body\">Request Body</h3>\n<ul>\n<li><code>file</code> (file): The file containing the data to be imported. It can either be <code>csv</code>, <code>xlsx</code> or <code>json</code>.<ul>\n<li><code>platform</code> (string, optional): A specific Platform configuration to use for the imported data. Only required if you have more than one brand and want to target a specific Platform configuration.</li>\n</ul>\n</li>\n</ul>\n<p>OR</p>\n<ul>\n<li>JSON body with the imported data, describing the file information as explained below. This is an alternative to directly import JSON, without first writing it to a JSON file.</li>\n</ul>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"platform\": \"BrandName\", // Can be omitted if you only have one brand\n  \"data\": [\n    // Array of objects with imported data in described format\n  ]\n}\n\n</code></pre>\n<h3 id=\"response\">Response</h3>\n<h4 id=\"200-ok\">200 Ok</h4>\n<p>This response will be returned when the request was successfully, but we found no data to import. Either the file was empty, contained data that we could not recognize at all, or all of its contents are already present on our side.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-typescript\">{\n    message: string\n}\n\n</code></pre>\n<h4 id=\"201-created\">201 Created</h4>\n<p>This response will be returned when all of the rows were valid and successfully imported. Further processing will happen in the background, and their ultimate registration and display in the platform might lag behind this.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-typescript\">{\n    message: string\n}\n\n</code></pre>\n<h4 id=\"400-bad-request\">400 Bad Request</h4>\n<p>This response will be returned upon receiving an invalid file or file that is missing information, such as a required column with data for the type of import. The example shows an attempt to import data for missing customer with id 1005.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"error\": \"Invalid Customer values: 1005\",\n    \"debug\": \"FileImportBatchValidationException: Invalid Customer values: 1005\",\n    \"column\": \"Customer\",\n    \"reason\": \"Invalid 'Customer' values 1005.\"\n}\n\n</code></pre>\n<h4 id=\"429-too-many-requests\">429 Too Many Requests</h4>\n<p>This response will be returned when too many import requests have been sent in a short period of time among all import endpoints, including both customers and activities.</p>\n<p>Current rate allows for 10 requests per 1 minute.</p>\n","urlObject":{"path":["workspaces","api","customers","status-import"],"host":[""],"query":[],"variable":[]}},"response":[{"id":"d9a3c95b-9254-4b7b-ad49-0f22541bee42","name":"CSV Customer Status Import","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"multipart/form-data","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"file","type":"file","value":null},{"key":"platform","value":"<optional_case_sensitive_platform_name>","description":"(Optional) A specific Platform configuration to use for the imported data.","type":"text","uuid":"fe12dad4-1555-4af6-aaa6-1cab98ba8344","disabled":true}]},"url":"/workspaces/api/customers/status-import"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"content-length","value":"57"},{"key":"content-type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Wed, 21 Aug 2024 06:59:17 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Customer status data imported successfully!\"\n}"},{"id":"1803166e-6ce7-48df-9c56-20aba5135147","name":"JSON Customer Status Import","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    // \"platform\": \"<optional_case_sensitive_platform_name>\",\n\n    // This is the data that will be imported, and it is always REQUIRED.\n    \"data\": [\n        {\n            \"Customer\": \"12345\",\n            \"Status\": \"Duplicate Account\"\n        },\n        {\n            \"Customer\": \"123456\",\n            \"Status\": \"Confirmed Fraud\"\n        }\n    ]\n}","options":{"raw":{"language":"json"}}},"url":"/workspaces/api/customers/status-import"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"content-length","value":"57"},{"key":"content-type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Wed, 21 Aug 2024 06:59:17 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Customer status data imported successfully!\"\n}"}],"_postman_id":"1bfbf670-106f-4b49-9ef7-bd339e20c2d5"}],"id":"529f3827-33c4-425a-8c37-fc842821f106","_postman_id":"529f3827-33c4-425a-8c37-fc842821f106","description":""},{"name":"ACTIVITY","item":[{"name":"Get Activity by Customer ID","id":"078ca278-afd6-48a4-83c6-137ce1bed93e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":false},"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"/workspaces/api/activities/1","description":"<p>This endpoint retrieves activity details for a specific customer based on the <code>id</code> provided in the URL path. A request to <code>/workspaces/api/activities/1</code> would return information about the activities of the customer with id <code>1</code>.</p>\n<h4 id=\"request-body\">Request Body</h4>\n<p>This endpoint does not require a request body.</p>\n<h4 id=\"200-ok\">200 OK</h4>\n<p>The response body returns an array of activity objects. An example response body can be seen below.</p>\n","urlObject":{"path":["workspaces","api","activities","1"],"host":[""],"query":[],"variable":[]}},"response":[{"id":"ee764380-b69b-4d82-8d36-69b6ffafa2d8","name":"Get Activity by Customer ID","originalRequest":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"/workspaces/api/activities/1"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"content-length","value":"315"},{"key":"content-type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Wed, 21 Aug 2024 06:56:46 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"id\": 70,\n        \"ftd\": true,\n        \"ftdAmount\": 500,\n        \"depositsAmount\": 500,\n        \"withdrawalsAmount\": 10,\n        \"betsAmount\": 500,\n        \"winsAmount\": 100,\n        \"bonusCost\": 100,\n        \"ggr\": 400,\n        \"adminFee\": 100,\n        \"ngr\": 296,\n        \"totalFees\": 4,\n        \"depositsCount\": 1,\n        \"createdAt\": \"2024-08-20T09:15:01.755+03:00\",\n        \"updatedAt\": \"2024-08-20T09:15:04.549+03:00\",\n        \"dealActionId\": 85,\n        \"meta\": {}\n    }\n]"}],"_postman_id":"078ca278-afd6-48a4-83c6-137ce1bed93e"},{"name":"Import Activity Data","event":[{"listen":"test","script":{"id":"5472aadf-7b50-4bb3-a498-ee1eb2f20e3a","exec":[""],"type":"text/javascript","packages":{},"requests":{}}}],"id":"799ceec7-e632-4e3b-a8e2-e733fbe2b9c1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"type":"file","key":"file","value":""},{"key":"platform","value":"<case_sensitive_platform_name>","uuid":"ec0112ee-22eb-45a1-aa30-48059202c39a","type":"text","description":"<p>(Optional) A specific Platform configuration to use for the imported data.</p>\n","disabled":true}]},"url":"/workspaces/api/activities/import","description":"<h3 id=\"import-activities\">Import Activities</h3>\n<p>This endpoint allows the user to import activities via <code>file</code> or <code>json body</code>.</p>\n<ul>\n<li><p><code>file</code> import</p>\n<ul>\n<li><p>The request body should be of type <code>form-data</code>, with a key \"file\" of type <code>File</code>.</p>\n</li>\n<li><p>The format of the file could be either <code>csv</code>, <code>xlsx</code> or <code>json</code></p>\n</li>\n<li><p>It is recommended that the <code>Content-Type</code> header is set to <code>multipart/form-data</code></p>\n</li>\n</ul>\n</li>\n<li><p><code>json body</code> import</p>\n<ul>\n<li><p>The request body should be a json object in the file information format described below</p>\n</li>\n<li><p>It is recommended that the <code>Content-Type</code> header is set to <code>application/json</code></p>\n</li>\n</ul>\n</li>\n</ul>\n<h3 id=\"hybrid-integration\"><strong>Hybrid integration</strong></h3>\n<p>You may want to integrate some of the activity data as soon as possible. For example, we might want to reflect the FTD status and amount of the customer as soon as it is available. This endpoint can receive data multiple times. It means that data can be sent partially or incrementally in pieces.</p>\n<p>For example, it can only receive FTD (or any other column) information, as soon as it is available, and then receive all other values later on. In order to do this, simply provide the values that are known at the time, and leave all other required values as 0 (optional values can be skipped, as always). As other values become available they can be sent via this endpoint in a similar manner.</p>\n<blockquote>\n<p>Depending on the import mode configured on integration, subsequent imports will either merge (incremental import) or overwrite (partial import) existing data. </p>\n</blockquote>\n<h4 id=\"request-body\">Request Body</h4>\n<ul>\n<li><code>file</code> (file): The file containing the activities to be imported. It can either be <code>csv</code>, <code>xlsx</code> or <code>json</code></li>\n</ul>\n<p>OR</p>\n<ul>\n<li>JSON body with the imported data, describing the file information as explained below. This is an alternative to directly import JSON, without first writing it to a JSON file.</li>\n</ul>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">// An array of objects with imported data in described format\n[\n  {\n   \"Customer\": \"CustomerId\",\n   \"Affiliate\": \"AffiliateUsername\",\n    // ...rest of the keys configured based on the File Information section below\n  }\n]\n\n</code></pre>\n<h3 id=\"file-information\">File information</h3>\n<p>Regardless of the format (<code>csv</code> or <code>xlsx</code>), the headers included in the file should be the following:</p>\n<ul>\n<li><p><code>Customer</code> - this field should contain the <code>id</code> of the customer. <strong>Required when country and affiliate are missing, optional otherwise.</strong></p>\n</li>\n<li><p><code>Affiliate</code> - the <code>username</code> of the Affiliate under which the customer has been registered. <strong>Required with Country when Customer value is missing, optional otherwise.</strong></p>\n</li>\n<li><p><code>Country</code> - the country of origin for the activity. When customer is present, it must match the country of the customer. <strong>Required with Affiliate when Customer value is missing, optional otherwise.</strong></p>\n</li>\n<li><p><code>Date</code> - date on which the activity occurred. Format - <code>DD/MM/YYYY</code>.</p>\n</li>\n<li><p><code>FTD</code> (number) - Whether or not this is a First Time Deposit. <code>1</code> should be passed for <code>true</code>, and <code>0</code> for <code>false</code>.</p>\n</li>\n<li><p><code>Ftd Amount</code> - Amount of the first time deposit. If the activity is not FTD related, the imported value will be 0.</p>\n</li>\n<li><p><code>Total Deposits</code> - Total amount of deposits during the given date.</p>\n</li>\n<li><p><code>Deposit Count (optional)</code> - The number of deposits made within the current activity batch. Default: <code>1</code>.</p>\n</li>\n<li><p><code>Withdrawals</code> - The withdrawal amount made by the customer during the given date.</p>\n</li>\n<li><p><code>Casino Bets</code> - The customer total bet amount placed during the given date on the Casino Product.</p>\n</li>\n<li><p><code>Casino Wins</code> - The customer total win amount settled during the given date on the Casino Product.</p>\n</li>\n<li><p><code>Bonus Cost</code> - This is the total Bonus Cost which the customer accumulated during the given date.</p>\n</li>\n<li><p><code>Brand</code> - The brand name on which the activity happened</p>\n</li>\n</ul>\n<blockquote>\n<p>These are the default headers. As per our Client Integration documentation, their names can be completely and freely customized by communicating this need with our administration team. </p>\n</blockquote>\n<h4 id=\"response\">Response</h4>\n<h4 id=\"200-ok\">200 Ok</h4>\n<p>This response will be returned when the request was successfully, but we found no data to import. Either the file was empty, contained data that we could not recognize at all, or all of its contents are already present on our side.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-typescript\">{\n    message: string\n}\n\n</code></pre>\n<h4 id=\"201-created\">201 Created</h4>\n<p>This response will be returned when all of the rows were valid and successfully imported. Further processing will happen in the background, and their ultimate registration and display in the platform might lag behind this.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-typescript\">{\n    message: string\n}\n\n</code></pre>\n<h4 id=\"206-partial-content\">206 Partial Content</h4>\n<p>This response will be returned when some rows have been found to contain invalid data values, but not all. In this case we'll parse and import all valid rows and collect error information for the invalid ones with details as to why the data is considered to be invalid and we are not able to import these rows.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-typescript\">{\n  /**\n   * Response message\n   */\n  message: string,\n  /**\n   * Import details.\n   */\n  details: {\n    /**\n     * Number of rows which were found to be valid and successfully imported.\n     */\n    imported: number // number of imported rows\n    /**\n     * Number of rows which were found to have errors and were skipped from import.\n     */\n    skipped: number\n  }\n  /**\n   * An array of errors that were found in the imported data.\n   */\n  errors: Array&lt;{\n      /**\n       * The column that contains the invalid values.\n       */\n      column: string\n      /**\n       * Additional context and information as to why the data in the row is invalid.\n       */\n      message?: string\n      /**\n       * The row numbers that are invalid. They are indexed from 1.\n       * Header row will not be counted for CSV and XLSX files.\n       */\n      rows: number[]\n      /**\n       * String representation of the invalid values. They are ordered in their\n       * order of appearance, meaning that they match the rows at the same index.\n       */\n      values: string[]\n  }&gt;\n}\n\n</code></pre>\n<h4 id=\"400-bad-request\">400 Bad Request</h4>\n<p>This response will be returned upon receiving an invalid file or file that is missing information, such as a required column with data for the type of import.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-typescript\">{\n    /**\n     * Actual error message.\n     */\n    error: string,\n    /**\n     * Information for error debugging.\n     */\n    debug: {\n        /**\n         * Name of the column that lead to the error.\n         */\n        column: string,\n        /**\n         * The reason for the error.\n         */\n        reason: string,\n    }\n}\n\n</code></pre>\n<h4 id=\"429-too-many-requests\">429 Too Many Requests</h4>\n<p>This response will be returned when too many import requests have been sent in a short period of time among all import endpoints, including both customers and activities.</p>\n<p>Current rate allows for 10 requests per 1 minute.</p>\n","urlObject":{"path":["workspaces","api","activities","import"],"host":[""],"query":[],"variable":[]}},"response":[{"id":"e6fa8737-0dd1-4775-9d81-c9ef97a931c3","name":"CSV Activity Import","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"multipart/form-data","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"file","type":"file","value":null},{"key":"platform","value":"<case_sensitive_platform_name>","description":"(Optional) A specific Platform configuration to use for the imported data.","type":"text","uuid":"89c8370c-7947-48a9-9c23-9d41ec937622","disabled":true}]},"url":"/workspaces/api/activities/import/"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"content-length","value":"49"},{"key":"content-type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Wed, 21 Aug 2024 07:09:00 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Activity data imported successfully\"\n}"},{"id":"9bc1665b-2fe7-402b-a1d6-f701d4f7d507","name":"JSON Activity Import","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"  {\n      // \"platform\": \"<optional_case_sensitive_platform_name>\",\n\n      // This is the data that will be imported, and it is always REQUIRED.\n      \"data\": [\n          {\n              \"Customer\": \"12345\",\n              \"Date\": \"DD/MM/YYYY\",\n              \"FTD\": 0,\n              \"Ftd Amount\": 0,\n              \"Total Deposits\": 750,\n              \"Withdrawals\": 300,\n              \"Casino Bets\": 1689,\n              \"Casino Wins\": 1240,\n              \"Bonus Cost\": 0,\n              \"Brand\": \"brand_name\"\n          },\n          {\n              \"Customer\": \"123456\",\n              \"Date\": \"DD/MM/YYYY\",\n              \"FTD\": 1,\n              \"Ftd Amount\": 25,\n              \"Total Deposits\": 235,\n              \"Withdrawals\": 0,\n              \"Casino Bets\": 2972,\n              \"Casino Wins\": 2692,\n              \"Bonus Cost\": 44,\n              \"Brand\": \"brand_name\"\n          }\n      ]\n  }","options":{"raw":{"language":"json"}}},"url":"/workspaces/api/activities/import/"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"content-length","value":"49"},{"key":"content-type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Wed, 21 Aug 2024 07:09:00 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Activity data imported successfully\"\n}"}],"_postman_id":"799ceec7-e632-4e3b-a8e2-e733fbe2b9c1"}],"id":"263487b4-5195-41b3-b57a-d0ef275ce809","_postman_id":"263487b4-5195-41b3-b57a-d0ef275ce809","description":""},{"name":"TRACKING","item":[{"name":"Decode Customer Token","id":"5ddce0c7-c486-4ebc-8fb5-8129ad6326d3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"/workspaces/api/tracking-links/decode-token?token=a3a785a961b603b03c738cb8136055bb","description":"<p>This endpoint retrieves information about a customer based on an encoded token associated with a tracking link click.</p>\n<h4 id=\"request\">Request</h4>\n<ul>\n<li><p>Query Parameters:</p>\n<ul>\n<li>token (string, required): The token used to retrieve customer information.</li>\n</ul>\n</li>\n</ul>\n<h4 id=\"200-ok\">200 OK</h4>\n<p>The response will be in JSON format and will represent the decoded information the token holds. See the example for reference.</p>\n<h4 id=\"422-unprocessable-entity\">422 Unprocessable Entity</h4>\n<p>Returned when the token query parameter is missing or does not match a recorded click.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"errors\": [\n        { \"field\": \"token\", \"message\": \"...\", \"rule\": \"...\" }\n    ]\n}\n\n</code></pre>\n","urlObject":{"path":["workspaces","api","tracking-links","decode-token"],"host":[""],"query":[{"key":"token","value":"a3a785a961b603b03c738cb8136055bb"}],"variable":[]}},"response":[{"id":"6219ee6e-df04-4d7e-8ef0-d582c55c0ad3","name":"Decode Customer Token","originalRequest":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":{"raw":"/workspaces/api/tracking-links/decode-token?token=a3a785a961b603b03c738cb8136055bb","path":["workspaces","api","tracking-links","decode-token"],"query":[{"key":"token","value":"a3a785a961b603b03c738cb8136055bb"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"content-length","value":"202"},{"key":"content-type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Tue, 24 Sep 2024 12:28:01 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"  {\n      \"affiliateId\": 1,\n      \"username\": \"niki\",\n      \"ipAddress\": \"123.45.67.89\",\n      \"referralLink\": null,\n      \"externalAffiliateClickId\": \"abc123def456\",\n      \"trafficSource\": \"SEO\",\n      \"trackingLinkId\": 1,\n      \"brandId\": 2,\n      \"brandName\": \"brandCool\",\n      \"campaignId\": 5,\n      \"campaignName\": \"Spring Promo\"\n  }"}],"_postman_id":"5ddce0c7-c486-4ebc-8fb5-8129ad6326d3"}],"id":"9cbdac48-55d0-44be-8d4f-f0c75af64b41","_postman_id":"9cbdac48-55d0-44be-8d4f-f0c75af64b41","description":""},{"name":"REPORTS","item":[{"name":"Traffic Report","event":[{"listen":"test","script":{"id":"634f8ec3-3ed7-48ab-a0d2-db21b4592cd0","exec":["var token = pm.response.json().token","pm.environment.set(\"token\", token)","postman.setEnvironmentVariable(\"token\", token);",""],"type":"text/javascript","packages":{},"requests":{}}}],"id":"1b69eeb1-8919-4018-bb92-ebe845f0d2cd","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":false},"method":"GET","header":[{"key":"Content-Type","value":"application/json"}],"url":"/workspaces/api/reports/traffic-report","description":"<p>This API endpoint is used to obtain traffic (tracking link) data.</p>\n<h3 id=\"request-query-params\">Request Query Params</h3>\n<ul>\n<li><p><code>page</code> (integer) - The page of results that is being requested. Can be any number &gt;= 1.</p>\n<ul>\n<li><code>Default: 1</code></li>\n</ul>\n</li>\n<li><p><code>perPage</code> (integer) - How many results to show per page. Can be any number &gt;= 1.</p>\n<ul>\n<li><code>Default: 15</code></li>\n</ul>\n</li>\n<li><p><code>start</code> (ISO Date) - The starting date to show results from. Can be any valid date in ISO Format e.g. <code>yyyy/mm/dd</code>.</p>\n<ul>\n<li><code>Default: start of current month</code></li>\n</ul>\n</li>\n<li><p><code>end</code> (ISO Date) - The ending date to show results until. Can be any valid date in ISO Format e.g. <code>yyyy/mm/dd</code>.</p>\n<ul>\n<li><code>Default: today's date</code></li>\n</ul>\n</li>\n<li><p><code>affiliateId</code> (number) - A valid ID of an affiliate user to filter for. Only the results of the given affiliate will be shown.</p>\n</li>\n<li><p><code>groupByCountry</code> (boolean) - When <code>true</code> the results will be grouped by their country of origin. When <code>false</code> the results will be combined totals from all countries of origin, and country information will not be included in the results.</p>\n<ul>\n<li><code>Default: false</code></li>\n</ul>\n</li>\n</ul>\n<h3 id=\"200-ok\">200 OK</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-typescript\">{\n    \"meta\": {\n        \"total\": Number,\n        \"perPage\": Number,\n        \"currentPage\": Number,\n        \"lastPage\": Number,\n        \"firstPage\": Number\n    },\n    \"data\": [\n        {\n            \"country\": String,\n            \"affiliateId\": Number,\n            \"affiliateUsername\": String,\n            \"affiliateLabel\": String,\n            \"referralLink\": String,\n            \"dynamicVariables\": Record&lt;String, String&gt; | null,\n            \"nrc\": Number,\n            \"ftd\": Number,\n            \"deposits\": Number,\n            \"withdrawals\": Number,\n            \"totalBonusCost\": Number,\n            \"totalGgr\": Number,\n            \"totalNgr\": Number,\n            \"clicks\": Number,\n            \"uniqueClicks\": Number,\n            \"campaign\": String,\n            \"trafficSource\": String,\n            // Only for Multi Product platforms\n            \"casinoBonusCost\": Number, \n            \"casinoGgr\": Number,\n            \"casinoNgr\": Number,\n            \"sportsBonusCost\": Number,\n            \"sportsGgr\": Number,\n            \"sportsNgr\": Number\n        }\n    ]\n}\n\n</code></pre>\n<h4 id=\"401-unauthorized\">401 Unauthorized</h4>\n<p>Returned when the request is missing or carries an invalid Bearer token.</p>\n<h4 id=\"403-forbidden\">403 Forbidden</h4>\n<p>Returned when the authenticated user lacks the <code>view-traffic-report</code> permission.</p>\n<h4 id=\"422-unprocessable-entity\">422 Unprocessable Entity</h4>\n<p>Returned when query parameters fail validation — invalid date, unknown country/brand, or invalid <code>period</code> value.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">  {\n      \"errors\": [\n          { \"field\": \"start\", \"message\": \"...\", \"rule\": \"...\" }\n      ]\n  }\n\n</code></pre>\n","urlObject":{"path":["workspaces","api","reports","traffic-report"],"host":[""],"query":[],"variable":[]}},"response":[{"id":"e7153da8-2e7a-445c-8978-c15aaff5ddf7","name":"Traffic","originalRequest":{"method":"GET","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"url":{"raw":"/workspaces/api/reports/traffic-report?groupByCountry=true&start=2025-01-01&end=2025-01-31&page=1&perPage=100","path":["workspaces","api","reports","traffic-report"],"query":[{"key":"groupByCountry","value":"true"},{"key":"start","value":"2025-01-01"},{"key":"end","value":"2025-01-31"},{"key":"page","value":"1"},{"key":"perPage","value":"100"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\r\n    \"meta\": {\r\n        \"total\": 1,\r\n        \"perPage\": 15,\r\n        \"currentPage\": 1,\r\n        \"lastPage\": 1,\r\n        \"firstPage\": 1\r\n    },\r\n    \"data\": [\r\n        {\r\n            \"affiliateId\": 11,\r\n            \"affiliateUsername\": \"john_doe\",\r\n            \"affiliateLabel\": \"new\",\r\n            \"trafficSource\": \"SEO\",\r\n            \"referralLink\": \"\",\r\n            \"dynamicVariables\": {},\r\n            \"campaign\": \"N/A\",\r\n            \"nrc\": 0,\r\n            \"ftd\": 0,\r\n            \"deposits\": 0,\r\n            \"withdrawals\": 0,\r\n            \"totalBonusCost\": 0,\r\n            \"totalGgr\": 0,\r\n            \"totalNgr\": 0,\r\n            \"clicks\": 13,\r\n            \"uniqueClicks\": 12,\r\n            \"country\": \"All Countries\"\r\n        }\r\n    ]\r\n}"}],"_postman_id":"1b69eeb1-8919-4018-bb92-ebe845f0d2cd"},{"name":"Customer Report","event":[{"listen":"test","script":{"id":"634f8ec3-3ed7-48ab-a0d2-db21b4592cd0","exec":["var token = pm.response.json().token","pm.environment.set(\"token\", token)","postman.setEnvironmentVariable(\"token\", token);",""],"type":"text/javascript","packages":{},"requests":{}}}],"id":"f9fe56e4-17dc-4ea6-8223-1d69acb7e33c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":false},"method":"GET","header":[{"key":"Content-Type","value":"application/json"}],"url":"/workspaces/api/reports/customer-report","description":"<p>This API endpoint is used to obtain customer data.</p>\n<h3 id=\"request-query-params\">Request Query Params</h3>\n<ul>\n<li><p><code>page</code> (integer) - The page of results that is being requested. Can be any number &gt;= 1.</p>\n<ul>\n<li><code>Default: 1</code></li>\n</ul>\n</li>\n<li><p><code>perPage</code> (integer) - How many results to show per page. Can be any number &gt;= 1.</p>\n<ul>\n<li><code>Default: 15</code></li>\n</ul>\n</li>\n<li><p><code>start</code> (ISO Date) - The starting date to show results from. Can be any valid date in ISO Format e.g. <code>yyyy/mm/dd</code>.</p>\n<ul>\n<li><code>Default: start of current month</code></li>\n</ul>\n</li>\n<li><p><code>end</code> (ISO Date) - The ending date to show results until. Can be any valid date in ISO Format e.g. <code>yyyy/mm/dd</code>.</p>\n<ul>\n<li><code>Default: today's date</code></li>\n</ul>\n</li>\n<li><p><code>affiliateId</code> (number) - A valid ID of an affiliate user to filter for. Only the results of the given affiliate will be shown.</p>\n</li>\n</ul>\n<h3 id=\"200-ok\">200 OK</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-typescript\">{\n    \"meta\": {\n        \"total\": Number,\n        \"perPage\": Number,\n        \"currentPage\": Number,\n        \"lastPage\": Number,\n        \"firstPage\": Number\n    },\n    \"data\": [\n        {\n            \"id\": Number,\n            \"ftdDate\": String,\n            \"externalCustomerId\": String,\n            \"externalCustomerStatus\": String,\n            \"registeredAt\": String,\n            \"externalAffiliateClickId\": String,\n            \"dynamicVariables\": Record&lt;string, string&gt; | null,\n            \"affiliateId\": Number,\n            \"affiliateUsername\": String,\n            \"affiliateEmail\": String,\n            \"affiliateName\": String,\n            \"affiliateLabel\": String,\n            \"companyWebsite\": String,\n            \"expectedVolumes\": String,\n            \"trafficSource\": String,\n            \"businessModel\": String,\n            \"paymentType\": String,\n            \"brandName\": String,\n            \"country\": String,\n            \"campaign\": String,\n            \"dealName\": String,\n            \"ttlCost\": Number,\n            \"activeCustomers\": Number,\n            \"qualifiedFtds\": Number,\n            \"nrc\": Number,\n            \"ftd\": Number,\n            \"ftdAmount\": Number,\n            \"cpaAmount\": Number,\n            \"deposits\": Number,\n            \"withdrawals\": Number,\n            \"totalBets\": Number,\n            \"totalWins\": Number,\n            \"totalBonusCost\": Number,\n            \"totalFees\": Number,\n            \"totalGgr\": Number,\n            \"totalNgr\": Number,\n            \"totalRsCost\": Number,\n            \"uniqueClicks\": Number\n        }\n    ]\n}\n\n</code></pre>\n<h4 id=\"401-unauthorized\">401 Unauthorized</h4>\n<p>Returned when the request is missing or carries an invalid Bearer token.</p>\n<h4 id=\"403-forbidden\">403 Forbidden</h4>\n<p>Returned when the authenticated user lacks the <code>view-customer-report</code> permission.</p>\n<h4 id=\"422-unprocessable-entity\">422 Unprocessable Entity</h4>\n<p>Returned when query parameters fail validation — invalid date, unknown country/brand, or invalid <code>period</code> value.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">  {\n      \"errors\": [\n          { \"field\": \"start\", \"message\": \"...\", \"rule\": \"...\" }\n      ]\n  }\n\n</code></pre>\n","urlObject":{"path":["workspaces","api","reports","customer-report"],"host":[""],"query":[],"variable":[]}},"response":[{"id":"8d81cfc1-4629-447b-86ee-39ef616fe913","name":"Customers","originalRequest":{"method":"GET","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"url":{"raw":"/workspaces/api/reports/traffic-report?start=2025-01-01&end=2025-01-31&page=1&perPage=100","path":["workspaces","api","reports","traffic-report"],"query":[{"key":"start","value":"2025-01-01"},{"key":"end","value":"2025-01-31"},{"key":"page","value":"1"},{"key":"perPage","value":"100"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\r\n    \"meta\": {\r\n        \"total\": 1,\r\n        \"perPage\": 15,\r\n        \"currentPage\": 1,\r\n        \"lastPage\": 1,\r\n        \"firstPage\": 1\r\n    },\r\n    \"data\": [\r\n        {\r\n            \"id\": 1,\r\n            \"ftdDate\": \"2023-02-22\",\r\n            \"externalCustomerId\": \"c1fb24f0-b994-444b-9344-228726d8551a\",\r\n            \"externalCustomerStatus\": \"Active\",\r\n            \"registeredAt\": \"2016-05-25\",\r\n            \"externalAffiliateClickId\": \"null\",\r\n            \"dynamicVariables\": {},\r\n            \"affiliateId\": 11,\r\n            \"affiliateUsername\": \"john_doe\",\r\n            \"affiliateEmail\": \"john.doe@example.mail\",\r\n            \"affiliateName\": \"John Doe\",\r\n            \"affiliateRejected\": null,\r\n            \"affiliateLabel\": \"new\",\r\n            \"companyWebsite\": \"https://localhost.dev\",\r\n            \"expectedVolumes\": \"11-50 FTD's\",\r\n            \"trafficSource\": \"SEO\",\r\n            \"businessModel\": \"CPA\",\r\n            \"paymentType\": \"Wire Transfer\",\r\n            \"brandId\": 4,\r\n            \"brandName\": \"John Doe Inc.\",\r\n            \"country\": \"Malta\",\r\n            \"campaign\": \"N/A\",\r\n            \"dealName\": \"RS: 20% RS\",\r\n            \"ttlCost\": 0,\r\n            \"activeCustomers\": 0,\r\n            \"qualifiedFtds\": 0,\r\n            \"nrc\": 0,\r\n            \"ftd\": 0,\r\n            \"sameMonthFtd\": 0,\r\n            \"ftdAmount\": 0,\r\n            \"cpaAmount\": 0,\r\n            \"deposits\": 0,\r\n            \"multipleDepositsCustomers\": 0,\r\n            \"withdrawals\": 0,\r\n            \"totalBets\": 0,\r\n            \"totalWins\": 0,\r\n            \"totalBonusCost\": 0,\r\n            \"totalFees\": 0,\r\n            \"totalGgr\": 0,\r\n            \"totalNgr\": 0,\r\n            \"totalRsCost\": 0,\r\n            \"uniqueClicks\": 0\r\n        }\r\n    ]\r\n}"}],"_postman_id":"f9fe56e4-17dc-4ea6-8223-1d69acb7e33c"}],"id":"4f084fc0-8cf4-4e5f-876c-9793889b183c","description":"<h2 id=\"ℹ️-introduction\"><strong>ℹ️ Introduction</strong></h2>\n<p>This document will guide you through the integration of both the <strong>Newton Documentation</strong> of <strong>iGsuite</strong>.</p>\n<p>In order to use any of the endpoints, first refer to the <a href=\"https://api-docs.igsuite.com/#59a78ccd-bc5b-484d-927b-3bd86b1b2494\">AUTH </a> documentation to understand how to obtain an API key. The key will then have to be passed with an <code>Authorization: Bearer</code> header.</p>\n","_postman_id":"4f084fc0-8cf4-4e5f-876c-9793889b183c"}],"event":[{"listen":"prerequest","script":{"id":"316db919-6cd1-40b8-a1b9-f0dcda29e55d","type":"text/javascript","packages":{},"requests":{},"exec":[""]}},{"listen":"test","script":{"id":"de58fcd6-941b-4f80-987e-4118ba0f3f0c","type":"text/javascript","packages":{},"requests":{},"exec":[""]}}],"variable":[{"key":"baseUrl","value":"","type":"default"}]}