Get a partner's referrer summary

Embed
Preview of the card
<a href="https://referalli.com/docs/ref-getv1partnersidsummary"><img src="https://referalli.com/docs/_api/public/orgs/07f432f4-34b9-46a7-aaad-c0e395d2e4f9/spaces/2bf4f614-3630-4fbf-85f9-5ecafa6b7d97/pages/f77baa4f-736e-49d8-b744-066f8dcf67f5/social-card.svg?v=3e7ae33eec8b" alt="Get a partner's referrer summary" width="600" height="315"></a>
GET https://referalli.com/v1/partners/{id}/summaryScope commissions:read

Everything a referrer panel shows, in one call: the stats for one program (programId is required) plus the partner's current code there (the newest coupon, else the newest link's code), linkUrl (null when they have only a coupon) and the program's terms (as GET /v1/programs/{id}/terms; null when it has no rule yet).

Auth: an API key with commissions:read, or a session of any role.

Scopes: commissions:read, commissions:write, read, full, admin.

Parameters

id
string
path
required
programId
string
query
required
x-org-id
string
header
With a session: the org to act in (the user must be a member). Not used with API keys, which belong to one org.
referalli-mode
string
header
test runs a session request against the org's test data. With an API key it must match the key's mode (400 mode_mismatch otherwise). The header name from before the rename is still accepted.
live | test

Code samples

cURL
curl -X GET "https://referalli.com/v1/partners/{id}/summary?programId=<programId>" \
  -H "Authorization: Bearer $REFERALLI_API_KEY" \
  -H "x-org-id: <value>" \
  -H "referalli-mode: <value>"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 OK
Example
{
  "partnerId": "string",
  "programId": "string",
  "clicks": 0,
  "referrals": {
    "total": 0,
    "active": 0,
    "pendingReview": 0,
    "paused": 0,
    "void": 0
  },
  "convertedCustomers": 0,
  "balances": [
    {
      "currency": "string",
      "pending": 0,
      "approved": 0,
      "paid": 0,
      "reversed": 0
    }
  ],
  "code": "string",
  "linkUrl": "string",
  "terms": {
    "programId": "string",
    "ruleVersion": 0,
    "base": {
      "kind": "string",
      "percentBps": 0
    },
    "recurring": {
      "type": "string"
    },
    "upcoming": {},
    "holdDays": 0,
    "capPerReferral": {
      "amountMinor": 0,
      "currency": "string"
    },
    "signupWindowDays": 0,
    "trafficSources": [
      "string"
    ],
    "countries": {
      "allow": [
        "string"
      ],
      "block": [
        "string"
      ]
    },
    "caps": {
      "conversionsPerDay": 0,
      "conversionsPerMonth": 0,
      "commissionPerMonthMinor": 0,
      "currency": "string"
    },
    "ratesVary": true,
    "summary": {
      "en": "string",
      "es": "string",
      "de": "string",
      "fr": "string",
      "pt": "string",
      "it": "string",
      "nl": "string",
      "sv": "string",
      "ja": "string",
      "zh": "string"
    },
    "locale": "string",
    "text": "string"
  }
}
Schema
partnerId
string
required
programId
string
required
clicks
integer
required
Eligible clicks on their links.
referrals
object
required
Show child parameters
total
integer
required
active
integer
required
pendingReview
integer
required
paused
integer
required
void
integer
required
convertedCustomers
integer
required
Referred customers (not void) with at least one payment.
balances
Balance[]
required
Show child parameters
currency
string
required
pending
integer
required
Integer minor units (cents).
approved
integer
required
Integer minor units (cents).
paid
integer
required
Integer minor units (cents).
reversed
integer
required
Integer minor units (cents).
code
string
required
Their current code in the program (coupon, else link).
linkUrl
string
required
Their newest link in the program; null when they have only a coupon.
terms
ProgramTerms
required
The program's terms (as GET /v1/programs/{id}/terms); null when it has no rule yet.
Show child parameters
programId
string
required
ruleVersion
integer
required
The commission rule version these terms come from (the latest).
base
object
required
recurring
object
required
upcoming
object
A later rule version published with an effectiveAt still in the future: its full terms plus effectiveAt. Absent when none.
holdDays
integer
required
capPerReferral
object
required
The rule's cap per referred customer: the most one referral earns its partner, over every payment.
Show child parameters
amountMinor
integer
required
Integer minor units (cents).
currency
string
required
signupWindowDays
integer
required
The program's signupToConversionDays when set (null at the 365-day default): a payment more than this many days after sign-up earns nothing.
trafficSources
string[]
required
The traffic sources the program allows; null when it does not restrict them.
countries
object
required
The program's country targeting; null when none is set.
Show child parameters
allow
string[]
block
string[]
caps
object
required
The program's conversion caps; null when none are set.
Show child parameters
conversionsPerDay
integer
conversionsPerMonth
integer
commissionPerMonthMinor
integer
currency
string
ratesVary
boolean
required
Overrides, tiers or new-vs-expansion rates can change the rate a partner earns.
summary
object
required
The same sentence in each partner-portal locale.
Show child parameters
en
string
required
es
string
required
de
string
required
fr
string
required
pt
string
required
it
string
required
nl
string
required
sv
string
required
ja
string
required
zh
string
required
locale
string
With ?locale= or Accept-Language: the locale chosen (en when the one asked for is not supported).
text
string
With ?locale= or Accept-Language: the summary in locale.
400 The request is invalid. error.code is one of:
Example
{
  "error": {
    "code": "validation_error",
    "message": "the body or query failed validation, an unknown field was sent, the body is not valid json, or a session call has no `x-org-id`",
    "details": [
      {
        "code": "invalid_format",
        "path": [
          "destinationUrl"
        ],
        "message": "Invalid URL"
      }
    ],
    "docs_url": "https://referalli.com/docs/errors-and-limits#validation_error"
  }
}
Schema
error
object
required
Show child parameters
code
string
required
message
string
required
details
requestId
string
docs_url
string
required
The docs entry for this error code: what it means and how to fix it.
Headers
x-request-id
string
This request's id (req_…), matching the server logs. On every response.
401 Missing or invalid credentials. error.code is one of:
Example
{
  "error": {
    "code": "unauthorized",
    "message": "no credentials, an unknown, revoked or expired api key or session, or a signature that did not verify",
    "docs_url": "https://referalli.com/docs/errors-and-limits#unauthorized"
  }
}
Schema
error
object
required
Show child parameters
code
string
required
message
string
required
details
requestId
string
docs_url
string
required
The docs entry for this error code: what it means and how to fix it.
Headers
x-request-id
string
This request's id (req_…), matching the server logs. On every response.
403 Authenticated, but not allowed. error.code is one of:
Example
{
  "error": {
    "code": "forbidden",
    "message": "the wrong role, a key without the needed scope (the message names it",
    "docs_url": "https://referalli.com/docs/errors-and-limits#forbidden"
  }
}
Schema
error
object
required
Show child parameters
code
string
required
message
string
required
details
requestId
string
docs_url
string
required
The docs entry for this error code: what it means and how to fix it.
Headers
x-request-id
string
This request's id (req_…), matching the server logs. On every response.
404 No such resource. error.code is one of:
Example
{
  "error": {
    "code": "not_found",
    "message": "the resource does not exist in this org (ids from other orgs look the same), a referenced id does not exist, a list cursor is not in the list, or the endpoint does not exist",
    "docs_url": "https://referalli.com/docs/errors-and-limits#not_found"
  }
}
Schema
error
object
required
Show child parameters
code
string
required
message
string
required
details
requestId
string
docs_url
string
required
The docs entry for this error code: what it means and how to fix it.
Headers
x-request-id
string
This request's id (req_…), matching the server logs. On every response.
429 Rate limited. error.code is one of:
Example
{
  "error": {
    "code": "rate_limited",
    "message": "an endpoint limit or the per-key quota was exceeded",
    "docs_url": "https://referalli.com/docs/errors-and-limits#rate_limited"
  }
}
Schema
error
object
required
Show child parameters
code
string
required
message
string
required
details
requestId
string
docs_url
string
required
The docs entry for this error code: what it means and how to fix it.
Headers
x-request-id
string
This request's id (req_…), matching the server logs. On every response.
Retry-After
integer
Seconds until a retry can succeed.
RateLimit-Limit
integer
The quota bucket's size (the burst).
RateLimit-Remaining
integer
Requests that can be made right now.
RateLimit-Reset
integer
Seconds until the bucket is full again.
500 Unexpected server error. error.code is one of:
Example
{
  "error": {
    "code": "internal_error",
    "message": "retry with backoff",
    "requestId": "req_8f2c1d4e5a6b7c8d",
    "docs_url": "https://referalli.com/docs/errors-and-limits#internal_error"
  }
}
Schema
error
object
required
Show child parameters
code
string
required
message
string
required
details
requestId
string
docs_url
string
required
The docs entry for this error code: what it means and how to fix it.
Headers
x-request-id
string
This request's id (req_…), matching the server logs. On every response.
default Any other error, in the same envelope.
Example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {},
    "requestId": "string",
    "docs_url": "string"
  }
}
Schema
error
object
required
Show child parameters
code
string
required
message
string
required
details
requestId
string
docs_url
string
required
The docs entry for this error code: what it means and how to fix it.
Updated