Consultar a coorte por origem
GET
/api/seller/external/v1/marketing/attribution/cohort
curl --request GET \ --get "https://api.spelt.com.br/api/seller/external/v1/marketing/attribution/cohort" \ --header "Authorization: Bearer splt_live_SUA_CHAVE" \ --header "Content-Type: application/json" \ --header "Accept: application/json"const url = new URL( "https://api.spelt.com.br/api/seller/external/v1/marketing/attribution/cohort");
const headers = { "Authorization": "Bearer splt_live_SUA_CHAVE", "Content-Type": "application/json", "Accept": "application/json",};
fetch(url, { method: "GET", headers,}).then(response => response.json());$client = new \GuzzleHttp\Client();$url = 'https://api.spelt.com.br/api/seller/external/v1/marketing/attribution/cohort';$response = $client->get( $url, [ 'headers' => [ 'Authorization' => 'Bearer splt_live_SUA_CHAVE', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], ]);$body = $response->getBody();print_r(json_decode((string) $body));import requestsimport json
url = 'https://api.spelt.com.br/api/seller/external/v1/marketing/attribution/cohort'headers = { 'Authorization': 'Bearer splt_live_SUA_CHAVE', 'Content-Type': 'application/json', 'Accept': 'application/json'}
response = requests.request('GET', url, headers=headers)response.json()Coorte por origem: dos clientes que chegaram em cada mês por cada origem, quantos seguiam ativos (gerando MRR) e
quanto tinham pago em 7, 30, 90 e 180 dias. Mesmos filtros da listagem (from, to, all, group_by).
Cada marco traz reached (clientes que já chegaram a ele), active, revenue (pago até o marco, líquido de
estornos) e revenue_per_customer (null quando ninguém chegou ao marco).
Authorizations
Seção intitulada “Authorizations”Responses
Seção intitulada “Responses”Media typeapplication/json
object
data
object
group_by
string
period
object
from
string
to
string | null
cohorts
Array<object>
object
month
string
campaign
string
source
string
channel
string
content
string | null
term
string | null
customers
integer
trial_customers
integer
milestones
object
7
object
reached
integer
active
integer
revenue
number
revenue_per_customer
number
30
object
reached
integer
active
integer
revenue
number
revenue_per_customer
number
90
object
reached
integer
active
integer
revenue
integer
revenue_per_customer
string | null
180
object
reached
integer
active
integer
revenue
integer
revenue_per_customer
string | null
Example
{ "data": { "group_by": "campaign", "period": { "from": "2026-08-05", "to": null }, "cohorts": [ { "month": "2026-10", "campaign": "439583769", "source": "google_ads", "channel": "ads", "content": null, "term": null, "customers": 13, "trial_customers": 7, "milestones": { "7": { "reached": 13, "active": 6, "revenue": 3104.95, "revenue_per_customer": 238.84 }, "30": { "reached": 9, "active": 5, "revenue": 7300.79, "revenue_per_customer": 811.2 }, "90": { "reached": 0, "active": 0, "revenue": 0, "revenue_per_customer": null }, "180": { "reached": 0, "active": 0, "revenue": 0, "revenue_per_customer": null } } } ] }}