IDs and relations

How resources reference each other by id, which endpoint resolves each id field, and the role ids.

Every resource has a UUID id, and resources point at each other with id fields. The API returns ids rather than embedding every related object, so a workout stays small and you resolve names only when you need them.

Resolving id fields

FieldAppears onResolve with
userIdworkouts, metric valuesGET /athletes/{id}
exerciseIdprescriptions, metric valuesGET /exercises/{id}
metricIdmetric valuesGET /metrics/{id}
prescriptionTypeIdseriePrescriptionsGET /prescription-types/{id}
unitId, baseUnitId, pairUnitIdmetrics, units, series parametersGET /units/{id}
teams[].idathletesGET /teams/{id}
# A workout carries ids, not names. Resolve the athlete and the exercise:
curl "https://api-integrations-next.vitruve.fit/v1/athletes/ATHLETE_ID" -H "X-API-Key: CUSTOMER_INTEGRATION_KEY" -H "X-Partner-Secret: YOUR_PARTNER_SECRET"
curl "https://api-integrations-next.vitruve.fit/v1/exercises/EXERCISE_ID" -H "X-API-Key: CUSTOMER_INTEGRATION_KEY" -H "X-Partner-Secret: YOUR_PARTNER_SECRET"

Role ids

roleId identifies a membership role. These three values are fixed:

RoleroleId
Owner4aa018e6-8b22-40b1-8d07-ab4f1af51330
Coachef736bad-c98e-410e-bf26-af834332153b
Athletedc82d01f-1136-4fcb-97dc-11a8b2203d98

Use them to filter GET /coaches?roleId=….

Global and organization data

Most data belongs to the customer's organization. Reference data is shared by every customer:

  • Units, metrics, prescription types and muscles are global and identical for everyone.
  • Exercises include Vitruve's global library (organizationId: null) and each organization's own. Filter with source=global|organization|all.

An id that is not found

Ids from another customer, deleted rows, and ids of a different resource type all answer 404. Ids are unique across Vitruve, so you can store them without prefixing them per customer.

On this page