Farmasi
farmasi.createResep
Tenant-scoped tRPC mutation farmasi.createResep. Requires a verified session cookie or an OAuth Bearer token; OAuth callers additionally need the simrs:write scope. Mutations are RBAC-gated server-side (requireRoles) — a broad scope never widens the user's roles.
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.
pasien*string
Length
1 <= lengthdokter*string
Length
1 <= lengthdepo*string
Length
1 <= lengthobat*string
Length
1 <= lengthjumlah*integer
Range
0 < value <= 9007199254740991aturanPakai*string
Length
1 <= lengthResponse Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/trpc/farmasi.createResep" \ -H "Content-Type: application/json" \ -d '{ "pasien": "string", "dokter": "string", "depo": "string", "obat": "string", "jumlah": 1, "aturanPakai": "string" }'{ "result": { "data": null }}{ "error": { "message": "string", "code": 0, "data": { "code": "string", "httpStatus": 0, "path": "string" } }}{ "error": { "message": "string", "code": 0, "data": { "code": "string", "httpStatus": 0, "path": "string" } }}{ "error": { "message": "string", "code": 0, "data": { "code": "string", "httpStatus": 0, "path": "string" } }}{ "error": { "message": "string", "code": 0, "data": { "code": "string", "httpStatus": 0, "path": "string" } }}Is this page helpful?