Current user
Read the user and memberships for the bearer token.
GET /me uses the token only. It does not take X-Organization-Id. The user object here uses userId. The login response uses id for the same person.
1. Request URL
GET https://api.medicaltrace.net/v1/me
2. Request parameters
| Parameter | In | Required | Type | Description |
|---|---|---|---|---|
Authorization | header | Yes | string | Bearer token from POST /auth/login. The sample value demo.local.jwt is a placeholder. |
3. Request example
curl -s -X GET 'https://api.medicaltrace.net/v1/me' \
-H 'authorization: Bearer demo.local.jwt'4. Response data
HTTP 200. The body below uses the fictional DEMO-BED-001 fixtures.
{
"user": {
"userId": "aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa",
"email": "[email protected]",
"name": "Demo Manufacturer Admin"
},
"memberships": [
{
"orgId": "11111111-1111-4111-8111-111111111111",
"role": "admin",
"permissions": [
"asset:read",
"*"
],
"organization": {
"id": "11111111-1111-4111-8111-111111111111",
"legalName": "Demo Manufacturer LLC",
"displayName": "Demo Manufacturer",
"capabilities": [
"manufacturer"
],
"status": "APPROVED"
}
}
]
}5. Response fields
| Field | Type | Description | Example |
|---|---|---|---|
user.userId | string | User id from the token subject. | aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa |
user.email | string | Email from the token. | [email protected] |
memberships | array | Active memberships only. Other tenants’ equipment is not included. | 1 row |
memberships[].organization.capabilities | string[] | Declared capabilities. A capability is not a permission and not an issuer grant. | manufacturer |