Skip to main content
This page assumes the shared rules in API Conventions — authentication, the two error shapes, batching and identity resolution. It only covers what is specific to progress.
The Player Progress API lets your backend read where each collaborator stands in your company’s gamification: which level they are on, how much XP they have, how many coins they can spend, their position in the ranking, and how many days in a row they have been scoring. It was built for the band at the top of a home screen — the one that greets the person and shows how they are doing.
The level ladder is configured by your company: how many levels, their names, what each one requires, and how each one looks. This API returns whatever is configured — it knows no specific ladder.

How It Works

  1. You get an API Key with the progress:read scope
  2. Your backend asks for one or many collaborators (by CPF or email)
  3. SalesOS answers with the ladder once at the top, then each person’s state

Authentication


Endpoint Reference

One action: progress_status.

Request Schema

string
required
Must be "progress_status"
array
required
Array of collaborator references (max 500)
string
Period for XP and ranking: daily, weekly, monthly or all_time. Absent = all_time.
string
Ranking universe: tenant (everyone in the company) or org_unit (the person’s own unit). Absent = tenant.

Example

Response (200):

Fields

The ladder (top level)

The number of levels is your company’s, not a constant. Build the screen from the array. A ladder can have nine rungs where another has ten, and both are correct.

Per collaborator


How far to the next level

Each requirement in next_level.requirements carries the rule and the person’s progress. That is what lets you write “20 sales, 10 to go” without doing the math on your side:
  • The number is the same one SalesOS uses to promote the person: your screen never disagrees with the level.
  • A level can have more than one requirement. The person moves up when all of them are met: true.
  • Requirements are configured per company. Build the screen from type and event_types, and never hardcode “sales” in your client.
  • A requirement type the API does not measure yet comes with the rule only, without current. Treat it as “not measured”, not as zero.
  • level.requirements carries the same measure for the current level. Someone at the top has no next_level, and that is where the total keeps showing.
  • The level is the person’s current rung on the ladder, the same one the app shows, and does not depend on period. The counts are always all-time. period only changes XP and ranking.
  • The level is re-evaluated when the person’s next activity arrives. So, for a brief moment, next_level may show met: true on everything before the person moves up.
  • A requirement configured in a way that cannot be measured also comes with the rule only, without current.

Level appearance

The level’s visual identity — its color, and anything else your company configures — comes back in appearance. appearance.image_url is the level badge, with the full address of the environment that answered (https://api.play2sell.com/storage/... in production, https://api-staging.play2sell.com/storage/... in staging). Use the URL as is.
A missing appearance does not mean “no color”. In levels[] it comes as null; in level and next_level the field is absent. Either way, nobody has configured one yet. Render your own fallback in that case, but do not hardcode a palette keyed by level name: the day your company renames a level or changes its colors, a hardcoded screen keeps showing the old one, with no error anywhere.
Read the color from the response even when it looks constant today. That is the whole reason it travels in the payload instead of living in your app.

Periods

XP is stored in four periods, and the screen usually shows one of them. Because “200 XP” on a design does not say which, this API returns all four plus the one you asked for.
An unknown period is rejected with 400, not answered with zeros. A response full of zeros would make your screen state that the person has no XP — an absence that is not true.
A period that was never measured comes back absent, not as 0. In the example above weekly is missing: that person has no weekly score row. daily: 0 is different — it was measured, and the result was zero.Treat the two apart. Writing “0 XP this week” for an absent period tells the person they scored nothing, when the truth is nobody computed that period for them.

Ranking

A position only means something alongside its universe, so scope, period and total always travel with it.
total is how many people the position was measured against. “#12 of 240” reads very differently from “#12 of 13” — show it.

Day streak

streak tells how many consecutive days the person has been scoring — the ”🔥 10 days” on a home screen. It is the same number as the app’s Consistency card: both reads come from the same rule. A day counts when the person ends it with a positive points balance. Any credited point counts (mission, quiz, extra points). A reversed point undoes the day; a day with only penalties does not count. The day is in the company’s time zone (timezone, at the top of the response): a point at 9 PM on Sunday in Brasília counts for Sunday, even though it is already Monday in UTC.
With at_risk: true, nudge the person to act: “score today to keep your 10 days”. expires_at gives the exact deadline — count hours from it, no time-zone math.
No points today does not reset the streak. It only drops to 0 after a full day without points. Showing “streak lost” at noon would tell the person they lost something they can still save.
Here zero is a measurement: someone who never scored has current: 0 and longest: 0. A person not found (found: false) has no streak.

Self mode (SSO user token)

With the token of a user who signed in through SSO, send Authorization: Bearer <jwt> and omit collaborators. The answer covers only the token’s own user.
Sending collaborators with a user token is rejected with SELF_MODE_NO_COLLABORATORS. Batch lookups (collaborators) are partner-only: they require a partner API key (P2S-SIGN-V1).
If the user belongs to more than one company, send X-Tenant-Id with the company’s ID; without it, the token’s default company is used. Other self-mode errors: 400 SELF_MODE_USER_ONLY (the token is not a user’s) and 400 TENANT_REQUIRED (the account is not linked to any company).

Error Handling

See API Conventions for the two shapes and the status code table.
Invalid body, batch over 500, CPF without 11 digits, an item with neither cpf nor email, or an unknown period / ranking_scope.
API key missing, unknown, revoked or expired, a timestamp outside the 30-second window (any second in the future included), or a signature that does not match. The body is { "error": "<message>", "code": "<code>" }, with code such as header_missing, api_key_not_found, key_revoked, key_expired, timestamp_too_old, timestamp_in_future or signature_invalid. In self mode, an invalid or expired user token answers { "error": { "code": "UNAUTHORIZED", … } }.
The key is valid but lacks the progress:read scope: { "error": "…", "code": "scope_insufficient", "missing_scopes": ["progress:read"] }. In self mode, FORBIDDEN means the account has no access to the company sent in X-Tenant-Id.
The key reached its hourly limit: { "error": "…", "code": "rate_limited" }. Wait the seconds in the Retry-After header, then retry.
A company with no ladder configured is not an error. The response comes back with levels: [], a level without key, name and order on each collaborator, and status 200.

Rate Limits


Next Steps

Missions API

The progress that earns the XP shown here

Campaigns API

Where the coins get spent