SATUSEHAT Clinical
POST /satusehat/medication-request
SATUSEHAT proxy route (apps/server/src/satusehat/routes-clinical.ts). Requires a verified session cookie or OAuth Bearer; OAuth callers need simrs:write. Tenant + roles come from the credential — never from the request. Access tokens for the national SATUSEHAT platform stay server-side.
AuthorizationBearer <token>
OAuth 2.0 / OIDC issued by the API itself (better-auth oidcProvider). Dynamic client registration per RFC 7591 at /api/auth/oauth2/register.
In: header
Scope: simrs:write
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
encounterId*string
Match
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Format
uuidmedicationItemId*string
Match
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Format
uuidnoResep?string
Length
length <= 64dosageText?string
Length
length <= 512category?string
Value in
- "outpatient"
- "inpatient"
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/satusehat/medication-request" \ -H "Content-Type: application/json" \ -d '{ "encounterId": "7a1ef47b-5125-4616-9a14-787cda6ee2a7", "medicationItemId": "b393f493-af19-4d5e-a7bc-7b4d204cff8d" }'{}{ "error": "string", "issues": []}{ "error": "string", "code": "string", "upstreamStatus": 0}{ "error": "string", "code": "string", "upstreamStatus": 0}{ "error": "string", "code": "string", "upstreamStatus": 0}Is this page helpful?