> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hi-doctor.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get renewal options for a category

> Tells the renewal UI what a patient may do for one treatment category. Requires the `category` query parameter and an authenticated patient.

`mode` is `pending_choice` (a renewal is awaiting the patient's decision; `pending_consultation_id` identifies it), `early_order` (pull the renewal forward), `express_reorder` (rebook from past history) or `blocked` (with a `blocked_code` explaining why). The current treatment, dose ladder, price, and the steps the renewal screen must collect are returned for the patient's client.

`price` is present whenever the patient has a prior treatment in the category: the live plan's price, or otherwise the category's default checkout price (the plan for weight loss and hair loss, the one-off elsewhere). It carries `plan` and `supply_days` so the client can say what the amount buys.

An unknown category is a `400` (`invalid_category`).



## OpenAPI

````yaml /api-reference/openapi.json get /v1/users/subscriptions/renewal-options/
openapi: 3.0.3
info:
  title: Hi-Doctor API
  version: 1.0.0
  description: >-
    Patient-facing REST API for Hi-Doctor.


    Authenticate with email and password to get an `access` token, then send it
    as `Authorization: Bearer <token>` on every request that needs one.
    Registering, verifying the code, signing in and refreshing the token all
    work without a bearer token.


    Every account-scoped endpoint returns only the authenticated patient's own
    records. A resource you cannot see is indistinguishable from one that does
    not exist.
  contact:
    name: Hi-Doctor
    email: hello@hi-doctor.ai
    url: https://hi-doctor.ai
servers:
  - url: https://api.hi-doctor.ai
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Account
    description: Registration, email verification, sign-in and profile.
  - name: Questionnaires
    description: Complete a consultation questionnaire and submit it for medical review.
  - name: Consultations
    description: Consultations a doctor has reviewed or is reviewing.
  - name: Prescriptions
    description: Prescriptions and reissue requests.
  - name: Billing
    description: Checkout, subscription management and the Stripe billing portal.
  - name: Records
    description: Orders, invoices and side-effect reports.
  - name: Messages
    description: The patient's private thread with their medical team.
  - name: Progress
    description: Weight, injection and note tracking. Requires an active treatment plan.
  - name: Referrals
    description: Referral summary and transactions.
  - name: Attribution
    description: Lead and attribution events from the landing funnel.
paths:
  /v1/users/subscriptions/renewal-options/:
    get:
      tags:
        - Billing
      summary: Get renewal options for a category
      description: >-
        Tells the renewal UI what a patient may do for one treatment category.
        Requires the `category` query parameter and an authenticated patient.


        `mode` is `pending_choice` (a renewal is awaiting the patient's
        decision; `pending_consultation_id` identifies it), `early_order` (pull
        the renewal forward), `express_reorder` (rebook from past history) or
        `blocked` (with a `blocked_code` explaining why). The current treatment,
        dose ladder, price, and the steps the renewal screen must collect are
        returned for the patient's client.


        `price` is present whenever the patient has a prior treatment in the
        category: the live plan's price, or otherwise the category's default
        checkout price (the plan for weight loss and hair loss, the one-off
        elsewhere). It carries `plan` and `supply_days` so the client can say
        what the amount buys.


        An unknown category is a `400` (`invalid_category`).
      operationId: users_subscriptions_renewal_options_retrieve
      parameters:
        - in: query
          name: category
          schema:
            type: string
          required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PatientRenewalOptionsResponse'
              example:
                category: weight_loss
                mode: early_order
                blocked_code: null
                subscription:
                  id: 0a1b2c3d-4e5f-4a6b-8c9d-000000000006
                  status: active
                  price_cents: 2500
                  currency: EUR
                  started_at: '2026-05-25T08:00:00Z'
                  current_period_start: '2026-07-27T08:00:00Z'
                  current_period_end: '2026-08-24T08:00:00Z'
                  cancel_at_period_end: false
                  canceled_at: null
                  treatment_id: wegovy
                  category: weight_loss
                  interval: week
                  interval_count: 4
                  cycle_days: 28
                  payment_method_brand: null
                  payment_method_last4: null
                  early_order_locked_until: null
                  early_order_locked: false
                pending_consultation_id: null
                current:
                  treatment_id: wegovy
                  dosage: 0.5 mg
                  source: subscription
                ladder:
                  dosages:
                    - 0.25 mg
                    - 0.5 mg
                    - 1 mg
                    - 1.7 mg
                    - 2.4 mg
                  current: 0.5 mg
                  next: 1 mg
                  held_at_max: false
                alternatives: []
                required_steps: []
                review_steps: []
                reusable_prefill: []
                baseline_bmi: 31.4
                baseline_unknown: false
                plan: subscription
                price:
                  amount_cents: 2500
                  currency: EUR
                  interval: week
                  interval_count: 4
                  cycle_days: 28
                  plan: subscription
                  supply_days: 28
                period:
                  current_period_end: '2026-08-24T08:00:00Z'
                  early_order_locked_until: null
                express: null
          description: ''
        '400':
          description: The `category` is not a known treatment category.
          content:
            application/json:
              example:
                code: invalid_category
        '401':
          description: >-
            No bearer token, or a token that is expired or malformed.
            Re-authenticate; do not retry the same token.
          content:
            application/json:
              example:
                detail: Given token not valid for any token type
                code: token_not_valid
                messages:
                  - token_class: AccessToken
                    token_type: access
                    message: Token is invalid
      security:
        - jwtAuth: []
components:
  schemas:
    PatientRenewalOptionsResponse:
      type: object
      properties:
        category:
          type: string
        mode:
          $ref: '#/components/schemas/ModeEnum'
        blocked_code:
          nullable: true
          oneOf:
            - $ref: '#/components/schemas/BlockedCodeEnum'
            - $ref: '#/components/schemas/NullEnum'
        subscription:
          allOf:
            - $ref: '#/components/schemas/PatientSubscription'
          nullable: true
        pending_consultation_id:
          type: string
          format: uuid
          nullable: true
        current:
          type: object
          additionalProperties: {}
          nullable: true
        ladder:
          type: object
          additionalProperties: {}
          nullable: true
        alternatives:
          type: array
          items:
            type: object
            additionalProperties: {}
        required_steps:
          type: array
          items:
            type: object
            additionalProperties: {}
        review_steps:
          type: array
          items:
            type: object
            additionalProperties: {}
        reusable_prefill:
          type: array
          items:
            type: object
            additionalProperties: {}
        baseline_bmi:
          type: number
          format: double
          nullable: true
        baseline_unknown:
          type: boolean
        plan:
          nullable: true
          oneOf:
            - $ref: '#/components/schemas/PatientRenewalOptionsResponsePlanEnum'
            - $ref: '#/components/schemas/NullEnum'
        price:
          allOf:
            - $ref: '#/components/schemas/RenewalPrice'
          nullable: true
        period:
          type: object
          additionalProperties: {}
        express:
          type: object
          additionalProperties: {}
          nullable: true
      required:
        - alternatives
        - baseline_bmi
        - baseline_unknown
        - blocked_code
        - category
        - current
        - express
        - ladder
        - mode
        - pending_consultation_id
        - period
        - plan
        - price
        - required_steps
        - reusable_prefill
        - review_steps
        - subscription
    ModeEnum:
      enum:
        - pending_choice
        - early_order
        - express_reorder
        - blocked
      type: string
    BlockedCodeEnum:
      enum:
        - early_order_subscription_ending
        - early_order_period_unavailable
        - early_order_period_already_advanced
        - early_order_pending_review
        - no_prior_treatment
        - subscription_payment_required
      type: string
    NullEnum:
      enum:
        - null
    PatientSubscription:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        status:
          $ref: '#/components/schemas/Status237Enum'
        price_cents:
          type: integer
          readOnly: true
        currency:
          type: string
          readOnly: true
        started_at:
          type: string
          format: date-time
          nullable: true
        current_period_start:
          type: string
          format: date-time
          nullable: true
        current_period_end:
          type: string
          format: date-time
          nullable: true
        cancel_at_period_end:
          type: boolean
        canceled_at:
          type: string
          format: date-time
          nullable: true
        treatment_id:
          type: string
          maxLength: 255
        category:
          type: string
          maxLength: 50
        interval:
          type: string
          maxLength: 20
        interval_count:
          type: integer
        cycle_days:
          type: integer
          nullable: true
        payment_method_brand:
          type: string
          readOnly: true
          nullable: true
        payment_method_last4:
          type: string
          readOnly: true
          nullable: true
        early_order_locked_until:
          type: string
          format: date-time
          nullable: true
        early_order_locked:
          type: boolean
          readOnly: true
      required:
        - currency
        - early_order_locked
        - id
        - payment_method_brand
        - payment_method_last4
        - price_cents
    PatientRenewalOptionsResponsePlanEnum:
      enum:
        - subscription
        - one_off
      type: string
    RenewalPrice:
      type: object
      properties:
        amount_cents:
          type: integer
        currency:
          type: string
        interval:
          type: string
          nullable: true
        interval_count:
          type: integer
          nullable: true
        cycle_days:
          type: integer
          nullable: true
        plan:
          $ref: '#/components/schemas/PlanBb6Enum'
        supply_days:
          type: integer
          nullable: true
      required:
        - amount_cents
        - currency
        - cycle_days
        - interval
        - interval_count
      description: >-
        What the next order costs. `plan` says whether the amount is the
        category's subscription or its one-off consultation; `supply_days` is
        how many days of treatment that amount covers — 30 for a one-off
        hair-loss consultation, 28 for a one-off weight-loss one, the billing
        cycle on a plan.
    Status237Enum:
      enum:
        - incomplete
        - active
        - past_due
        - unpaid
        - paused
        - canceled
        - trialing
      type: string
    PlanBb6Enum:
      enum:
        - one_off
        - subscription
      type: string
      description: >-
        `one_off` is a single paid consultation with no renewal; `subscription`
        is an ongoing plan billed every cycle. Weight loss and hair loss accept
        either at checkout; every other category is `one_off` only.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Access token from POST /v1/users/token/
    jwtAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````