Skip to main content

Check-in 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.
The Check-in API lets your backend read the duty presence state of your salespeople in SalesOS — did they check in today, where, on which shift, and until when it is valid. It was built for composing your own app screens (for example, a super-app home widget) before the user ever opens the SalesOS module. It is a read-only, server-to-server API: you look collaborators up by CPF or email, in batch, and SalesOS answers with today’s state computed in your company’s timezone.

How It Works

  1. You get an API Key with the checkin:read scope (Admin > Integrations > API Keys)
  2. Your backend asks for the check-in state of one or many collaborators (by CPF or email)
  3. SalesOS answers with today’s latest check-in per collaborator — plus optional week/month engagement counts
Check-ins are still performed inside the SalesOS app (GPS validation happens in the user’s context). This API is for reading presence state — pair it with a deep link into the SalesOS module for the “Check in now” action.

Authentication

All requests require an API Key in the Authorization header:
See the Authentication page for details on creating and managing API Keys.

Environments

Base URL: https://api.play2sell.com

Endpoint Reference

The endpoint accepts two actions via the action field: checkin_status and checkin_engagement. Each collaborator is identified by CPF (any format — digits are normalized) or email. When both are sent, CPF wins.

Action: checkin_status

Today’s latest check-in per collaborator. “Today” is computed in your company’s timezone (returned as timezone / reference_date in the response) — never UTC.

Request Schema

string
required
Must be "checkin_status"
array
required
Array of collaborator references (max 500)
string
CPF, any format (52998224725 or 529.982.247-25). Must contain exactly 11 digits.
string
Email — used only when cpf is absent

Example

Response (200):

Response fields explained

boolean
Whether the CPF/email matched a collaborator in your company. An unknown collaborator is found: false — it is not an error, and the array keeps the same order as your request.
boolean
Whether the collaborator has at least one non-rejected check-in today (company timezone).
boolean
true when the latest check-in is active/approved and its shift has not expired — i.e. the collaborator is on duty right now.
object
Today’s most recent check-in. Omitted when there is none. mode is geo (in-person with GPS), home (home office) or offline. status may be active, approved, pending (awaiting leader approval), expired (shift ended normally) or checkout.
string
The collaborator’s membership in your company (active, inactive, …). A collaborator can be found and inactive.

Action: checkin_engagement

Everything checkin_status returns, plus week/month engagement counts per collaborator. Batches are capped at 100.
string
required
Must be "checkin_engagement"
array
required
Array of collaborator references (max 100)

Example

Each found collaborator gains an engagement object:
  • checkins — check-ins in the current week/month (company timezone; expired counts — it is the normal end of a shift)
  • presence_days — distinct days with at least one check-in

Self mode (federated session)

If your app already holds a federated SalesOS session — the JWT returned by a custom login such as the Superapp federation — the same endpoint answers for the token’s own user, with no API key:
  • Identity comes only from the verified token — do not send collaborators. A request with that field is rejected with SELF_MODE_NO_COLLABORATORS: user-level tokens can never look other people up.
  • The company scope comes from the session; the response has the exact same shape, with a single item in collaborators.
  • checkin_engagement works the same way ({ "action": "checkin_engagement" }).
Use self mode for screens rendered inside the authenticated app; use the API key (S2S) when your backend composes screens before the user has a SalesOS session — like a super-app home widget.

Error Handling

All errors follow the shared structure:
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.
API key is missing, invalid, or expired, or the signature does not match.
API key is valid but lacks the checkin:read scope.
Only POST is accepted.
Too many requests this hour. Wait retry_after seconds, then retry.
Internal server error. Retry with exponential backoff (2s, 4s, 8s).
An unknown collaborator is not an error. The request succeeds with found: false for that item, so one bad CPF never breaks a whole home-screen render.

Rate Limits


Security

  • Read-only: this API never creates or changes check-ins
  • 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
Never expose your API key in client-side code. This API must only be called from your backend server.

Next Steps

Authentication

Learn how to create and manage API Keys

Support

Need help? Contact our support team