Rekamedika Docs
Kasir

kasir.create

POST
/trpc/kasir.create

Tenant-scoped tRPC mutation kasir.create. 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.

Authorization

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.

patientId*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)$
Formatuuid
kasir*string
Length1 <= length
penjamin*string

Value in

  • "Umum"
  • "JKN"
  • "Asuransi"
tindakan*string
Length1 <= length
totalTagihan*integer
Range0 < value <= 9007199254740991

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/trpc/kasir.create" \  -H "Content-Type: application/json" \  -d '{    "patientId": "460a6d87-689c-4661-a526-a52450bbe2d7",    "kasir": "string",    "penjamin": "Umum",    "tindakan": "string",    "totalTagihan": 1  }'
{  "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?