POST
Admit a benefit instance to the clinic queue.

Authorizations

Authorization
string
header
required

JWT bearer token. App-user tokens are issued by POST /auth/token (the partner backend calls it as its platform service account); admin and dashboard tokens are issued via OIDC login.

Path Parameters

benefit_entity_id
string
required

The benefit instance to queue

Response

The instance is queued — newly admitted, or already there and returned unchanged

phone_number
string
required
Example:

"9876543210"

benefit_entity_id
string
required
benefit_id
string
required
benefit_provider_id
string
required
created_at
string
required
entity_type
enum<string>
required

Kind of benefit offered by a provider. Stored as TEXT — deliberately not a PostgreSQL enum, so adding a kind needs no migration.

Available options:
CONSULTATION,
INSURANCE_POLICY,
HEALTH_CHECKUP
last_modified_at
string
required
status
enum<string>
required

Where a member sits in the clinic front-desk workflow, for any benefit type. CREATED = admitted to the queue, not yet arrived. IN_PROGRESS = arrived at the clinic and being seen. COMPLETED = terminal. Deliberately not insurance vocabulary — the queue spans every benefit type, so it does not borrow PolicyStatus's verification. Distinct from BenefitEntityStatus, which tracks the entitlement rather than the visit: one is written by the clinic operator, the other by the benefit pipeline.

Available options:
CREATED,
IN_PROGRESS,
COMPLETED
user_id
string
required

A validated 12-digit numeric user identifier.

Every external entry point validates:

  • JSON Deserialize runs [UserId::parse] (outer whitespace trimmed, length and digit-only enforced) via #[serde(try_from = "String")].
  • DB FromSql runs [UserId::parse] on every row read.

Display / Deref<Target = str> / AsRef<str> / Into<String> are derived via derive_more — the inner String is pass-through for every read-only borrow, display, and move-out.

Example:

"012345678901"

user_name
string
required
phone_country_code
string
Example:

"+91"

mrn
string | null