Missions API
Examples below show the wire-format
Authorization: P2S-SIGN-V1 API_KEY:TIMESTAMP:SIGNATURE header. To compute the signature in your code, use the signedRequest helper in Authentication.How It Works
- You get an API Key with the
missions:readscope (Admin > Integrations > API Keys) - Your backend asks for the mission state of one or many collaborators (by CPF or email)
- SalesOS answers with today’s missions per collaborator — progress counters, the full list, and the next active mission
Missions are advanced by activity inside SalesOS: the engine listens to events (a visit scheduled, a sale closed) and increments the matching mission. This API is for reading that state — pair it with a deep link into the SalesOS module for the action itself.
Authentication
All requests require an API Key in theAuthorization header:
Environments
- Production
- Staging
Base URL:
https://api.play2sell.comEndpoint Reference
action field: missions_status and missions_summary.
Each collaborator is identified by CPF (any format — digits are normalized) or email. When both are sent, CPF wins.
Action: missions_status
The missions whose period window contains today, per collaborator. “Today” is computed in your company’s timezone (returned astimezone / reference_date in the response) — never UTC.
Request Schema
string
required
Must be
"missions_status"array
required
Array of collaborator references (max 500 — 100 when
include_missions is on)boolean
default:"false"
Return the full
missions[] array. Off by default: missions fan out per collaborator, so a large batch with the list on becomes a multi-megabyte response. progress and next_mission always come back.string
CPF, any format (
52998224725 or 529.982.247-25). Must contain exactly 11 digits.string
Email — used only when
cpf is absentExample
Response fields explained
Rewards are paid in installments, so “earned” and “still to win” are different numbers. A mission worth 100 points with a target of 5 credits 20 on every step. After one step the collaborator has earned 20 and still has 80 to win —
points_earned counts the 20, points_available counts the 80. Adding the full 100 to both would count the same points twice.Action: missions_summary
Everythingmissions_status returns, plus week/month completion counters. Useful for a “your month so far” strip.
Missions are counted in the period they belong to (their own window), not the date they were approved — so a mission approved late still counts in the week it was earned.
Example
missions_summary scans a month of mission rows per collaborator, so its batch limit is 100 instead of 500.Self mode (federated session)
When your app already holds a federated SalesOS user token, send it asAuthorization: Bearer <jwt> and omit collaborators. The answer covers only the token’s own user.
Error Handling
All errors follow the shared structure:400 — VALIDATION_ERROR
400 — VALIDATION_ERROR
Invalid body, batch over the limit, CPF without 11 digits, or an item with neither
cpf nor email. The details array points to the item index.400 — SELF_MODE_NO_COLLABORATORS
400 — SELF_MODE_NO_COLLABORATORS
A
collaborators list was sent with a user token. Omit it, or use a partner API key.403 — FORBIDDEN
403 — FORBIDDEN
API key is valid but lacks the
missions:read scope.405 — METHOD_NOT_ALLOWED
405 — METHOD_NOT_ALLOWED
Only
POST is accepted.429 — RATE_LIMITED
429 — RATE_LIMITED
Too many requests this hour. Wait
retry_after seconds, then retry.500 — SERVER_ERROR
500 — SERVER_ERROR
Internal server error. Retry with exponential backoff (2s, 4s, 8s).
Rate Limits
Security
- Read-only: this API never creates, advances or provisions missions
- Each key is scoped to a single company — a CPF from another company answers
found: false - Requests are HMAC-signed (P2S-SIGN-V1) and logged for audit; documents are never written to logs
Next Steps
Check-in API
Read duty presence to complete the same home screen
Authentication
Learn how to create and manage API Keys

