Profitability

Get Channels That Bring Customers Back

GET
/v1/profitability/return-channels

Ranks the acquisition channels by the repurchase customers they brought in the period. A repurchase is an order placed on a day after the customer's first purchase (the same rule as the daily new-vs-recurring). Each repurchase customer is counted once, under the last-click channel of their most recent repurchase order in the period (analytics.fct_order_acquisition_channel), so the shares add up to 100. Channels follow the warehouse taxonomy (Meta Ads, Google Ads, LinkedIn Ads, TikTok Ads, Pinterest Ads, Microsoft Ads, OpenAI Ads, Orgânico); Orgânico is every order with a resolved attribution and no paid signal (e-mail, WhatsApp and direct visits are not told apart). A customer whose order has no resolved channel is in the explicit Sem atribuição row (isUnattributed: true), never filed under a real channel. Aggregates only: no customer identifier or personal data is returned. Both dates are required; the period spans at most 366 days.

Authorization

ClientIdAuthClientSecretAuth
headerx-client-id<token>

Client ID

headerx-client-secret<token>

Client secret

Query Parameters

organizationId*string

Organization identifier (required)

startDate*string

First day of the period, inclusive (YYYY-MM-DD, UTC). Required.

Formatdate
endDate*string

Last day of the period, inclusive (YYYY-MM-DD, UTC). Required. At most 366 days from startDate.

Formatdate
gtmMotionId?string

GTM motion of the organization (UUID), as listed by GET /v1/gtm-motions. Optional: without it, the response covers the organization's default GTM motion. This endpoint is not split by GTM motion yet: the default motion is answered with the organization's data, the same numbers as when the parameter is omitted, and any other GTM motion of the organization returns 422 GTM_MOTION_DATA_NOT_AVAILABLE. Not a UUID: 400. Not a live GTM motion of the organization: 403 GTM_MOTION_NOT_IN_ORGANIZATION.

Formatuuid

Response Body

Return channels retrieved successfully

application/json
  1. response
period*
returningCustomers*integer

Repurchase customers of the period; the sum of channels[].customers

channels*array<>

Most customers first, Sem atribuição last; empty when the period has no repurchase

curl -X GET "https://example.com/v1/profitability/return-channels?organizationId=c0ad4763-173e-4a05-9cff-5208c8ea5f6a&startDate=2026-10-12&endDate=2026-11-10&gtmMotionId=019a5b2e-7c4d-7abc-8def-0123456789ab"
{  "period": {    "startDate": "2026-10-12",    "endDate": "2026-11-10"  },  "returningCustomers": 1000,  "channels": [    {      "channel": "Orgânico",      "customers": 300,      "share": 30,      "isUnattributed": false    },    {      "channel": "Meta Ads",      "customers": 150,      "share": 15,      "isUnattributed": false    },    {      "channel": "Google Ads",      "customers": 50,      "share": 5,      "isUnattributed": false    },    {      "channel": "Sem atribuição",      "customers": 500,      "share": 50,      "isUnattributed": true    }  ]}