Internal Services

Validate subscription type and meter to Lago

Internal endpoint for subscription validation and metering.

Flow:
1. Get subscription_type from tenant config (defaults to "all")
2. Validate jenis_perawatan against subscription_type
3. If valid, send metering event to Lago

Error statuses:
- missing_jenis_perawatan: JENIS_PERAWATAN is null/missing
- forbidden_rawat_jalan: subscription_type=rawat_inap but claim is rawat_jalan
- forbidden_rawat_inap: subscription_type=rawat_jalan but claim is rawat_inap
post/internal/subscriptions/validate-and-meter

Request

  • Base URL
    https://developer.claimmind.life (the document declares no server; this is the origin it was published from)
  • Auth
    none declared. Required headers: X-API-Key

Headers

X-API-Keystring required

Request body

tenant_idstring uuid required

Tenant UUID

claim_idstring uuid required

Claim UUID

jenis_perawatanstring nullable

Type of care: 'Rawat Jalan' or 'Rawat Inap'. None if unknown.

Response

Successful Response

validboolean required

Whether the claim passed validation

meteredboolean required

Whether a metering event was sent to Lago

error_statusstring nullable

Error status code if validation failed. Values: missing_jenis_perawatan, forbidden_rawat_jalan, forbidden_rawat_inap

reasonstring nullable

Human-readable reason for the result

Changes

No recorded changes to this operation across all 1 revision of this API.