Skip to main content
The builders make the events of Sending events for you. Each one checks what it builds, the same way the API does, so a mistake fails in your code before any request is sent:
  1. The format. Required fields, no unknown fields, types, limits, times with an offset and the side rules of Observations.
  2. The quantity list. A listed quantity must use a unit it takes, a measure it lists, and a body location when it needs one.
A quantity that is not on the list is not an error: the API keeps it as not_interpreted, and the check reports it as unknown. A failed check throws (TypeScript) or raises (Python) ObservationValidationError, whose issues list each problem with its path. You never set kind or status: the API decides them. confidence may be lowered for an estimate; the API never stores it above your route’s default.

Logged sets and self-reports first

Most organizations send what a teammate did and how they feel. No device is needed.
A self-report is pain or soreness on the 0 to 10 scale, from the route teammate unless you name another. Leave side out for both sides of a joint that has two, or for a midline joint.

Record ids

An observation and a logged set are stored once per source.route and source.record_id. Give each one the id your own system already has for it, so the same reading sent again answers duplicate. When you leave a reading’s record id out, the builder makes one; then build each reading once and keep the result.

Other readings

observation.measurement (TypeScript) and measurement (Python) build any reading.
The second example fails before anything is sent: set_load takes kg and lb, not lbs.

Protocol results

Pass a registered protocol (such as sprint_40yd, sprint_60yd, vertical_jump or lift_max) and optional instrument to observation.measurement (TypeScript) or measurement (Python). For a single-quantity registered protocol, the builder fills quantity, measure and unit for you and refuses a wrong unit or incompatible instrument kind before anything is sent.
For an owner-defined test, pass protocol in owner:<name>:v<n> format together with your quantity and unit.

Other events

event.constraint, event.equipmentChange and event.scheduleChange (in Python, event.constraint, event.equipment_change and event.schedule_change) build the other event types and give each one an idempotency key when it is built. Keep the event you built and send that same event again on a retry, so the key stays the same.