GET
/
benefits
cURL
curl --request GET \
  --url http://localhost:8080/benefits \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "benefit_details": {
        "benefit_type": "consultation",
        "description": "<string>"
      },
      "benefit_type": "consultation",
      "created_at": "<string>",
      "id": "<string>",
      "last_modified_at": "<string>",
      "name": "<string>",
      "provider_id": "<string>",
      "provider_name": "<string>",
      "status": "active"
    }
  ],
  "limit": 123,
  "offset": 123,
  "total": 123
}

Authorizations

Authorization
string
header
required

JWT access token. Obtain from /auth/otp/verify endpoint.

Query Parameters

status
null | enum<string>

Benefit lifecycle status.

Available options:
active,
inactive
benefit_type
null | enum<string>

Kind of benefit offered by a provider.

Available options:
consultation,
insurance_policy
provider_id
string | null
time_range
object

A half-open time range, with a mandatory start and an optional end. Designed to be embedded in list/filter query params via #[serde(flatten)].

Deserialize runs [TimeRange::validate] as part of deserialization, so callers never receive a [TimeRange] that violates start_time <= end_time.

limit
integer<int32> | null
offset
integer<int32> | null

Response

List of benefits

data
object[]
required
limit
integer<int32>
required
offset
integer<int32>
required
total
integer<int64>
required