> ## 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.

# Confirm a pending renewal choice

> Records the patient's decision for one pending renewal. `treatment_id` and `dosage` carry the chosen treatment (they may differ from the current one, in which case the doctor reviews the change). `changed` does not gate the dose/treatment choice: it declares that something in the patient's clinical situation changed, which requires the broader questionnaire-review answers (`answers`) in addition to the renewal safety screen; an optional `change_note` explains it. Clinical eligibility is enforced and the renewal proceeds toward the doctor's review.

`404` if the consultation is not the caller's; `409` (`patient_choice_not_pending`) if it was already decided; `400` for a missing or ineligible answer, or a treatment variant that is not in the catalogue.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/users/subscriptions/pending-choice/confirm/
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/pending-choice/confirm/:
    post:
      tags:
        - Billing
      summary: Confirm a pending renewal choice
      description: >-
        Records the patient's decision for one pending renewal. `treatment_id`
        and `dosage` carry the chosen treatment (they may differ from the
        current one, in which case the doctor reviews the change). `changed`
        does not gate the dose/treatment choice: it declares that something in
        the patient's clinical situation changed, which requires the broader
        questionnaire-review answers (`answers`) in addition to the renewal
        safety screen; an optional `change_note` explains it. Clinical
        eligibility is enforced and the renewal proceeds toward the doctor's
        review.


        `404` if the consultation is not the caller's; `409`
        (`patient_choice_not_pending`) if it was already decided; `400` for a
        missing or ineligible answer, or a treatment variant that is not in the
        catalogue.
      operationId: users_subscriptions_pending_choice_confirm_create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RenewalChoiceConfirmRequest'
            example:
              consultation_id: 0a1b2c3d-4e5f-4a6b-8c9d-000000000002
              changed: false
              answers:
                - question_key: glp1RenewalAdverseEffects
                  values:
                    pancreatitis: 0
                    severeGi: 0
                    hydration: 0
                    gallbladder: 0
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PatientRenewalChoiceConfirmResponse'
              example:
                consultation_id: 0a1b2c3d-4e5f-4a6b-8c9d-000000000002
                patient_choice_status: confirmed
                treatment_id: wegovy
                dosage: 0.5 mg
                dose_change: null
                treatment_change: null
                renewal_screen_completed: true
          description: ''
        '400':
          description: A required answer is missing for the current treatment.
          content:
            application/json:
              example:
                code: renewal_answers_required
                missing_keys:
                  - glp1RenewalAdverseEffects
        '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
        '404':
          description: The consultation is not the caller's. The response body is empty.
          content:
            application/json:
              example: {}
        '409':
          description: The renewal was already decided, so nothing changed.
          content:
            application/json:
              example:
                code: patient_choice_not_pending
                patient_choice_status: confirmed
      security:
        - jwtAuth: []
components:
  schemas:
    RenewalChoiceConfirmRequest:
      type: object
      properties:
        consultation_id:
          type: string
          format: uuid
        treatment_id:
          type: string
          maxLength: 255
        dosage:
          type: string
          maxLength: 255
        changed:
          type: boolean
          default: false
        answers:
          type: array
          items:
            type: object
            additionalProperties: {}
        change_note:
          type: string
          default: ''
          maxLength: 1000
      required:
        - consultation_id
    PatientRenewalChoiceConfirmResponse:
      type: object
      properties:
        consultation_id:
          type: string
          format: uuid
        patient_choice_status:
          type: string
        treatment_id:
          type: string
        dosage:
          type: string
        dose_change:
          type: object
          additionalProperties: {}
          nullable: true
        treatment_change:
          type: object
          additionalProperties: {}
          nullable: true
        renewal_screen_completed:
          type: boolean
      required:
        - consultation_id
        - dosage
        - dose_change
        - patient_choice_status
        - renewal_screen_completed
        - treatment_change
        - treatment_id
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Access token from POST /v1/users/token/
    jwtAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````