# Update SubEnrollmentPlan

Updates a specific SubEnrollmentPlan. By default the Plan ID and Plan Start in the body must match the route. Set allowPlanKeyChange=true to move the plan identified by the route (planID/planStart) to the Plan_ID/Plan_Start carried in the body; the plan's riders move with it in the same transaction. The new plan must be offered on the group contract, its dates must fall within the enrollment, a tier is required when the plan type requires one, and the target Plan ID/Plan Start must not already exist on the enrollment.

Endpoint: PUT /subscribers/{subscriberID}/enrollments/{groupID}/{divisionID}/{groupCoverageStart}/{startDate}/plans/{planID}/{planStart}
Version: v1
Security: apiKeyAuth, bearerAuth

## Security:

  - `apiKeyAuth` (unknown)
    apiKey in header x-api-key

  - `bearerAuth` (unknown)
    http bearer JWT

## Path parameters:

  - `subscriberID` (string, required)
    Subscriber ID

  - `groupID` (string, required)
    Group ID

  - `divisionID` (string, required)
    Division ID

  - `groupCoverageStart` (string, required)
    Group Coverage Start

  - `startDate` (string, required)
    Start Date

  - `planID` (string, required)
    Plan ID

  - `planStart` (string, required)
    Plan Start

## Query parameters:

  - `allowPlanKeyChange` (boolean)
    When true, the route planID/planStart identify the existing plan and the body Plan_ID/Plan_Start become its new key (riders move with the plan). Defaults to false.

## Header parameters:

  - `vbasoftware-database` (string, required)
    Target database

## Request fields (application/json):

  - `subscriber_ID` (string, required)
    References the Subenrollment.Subscriber_ID value in the parent table.

  - `group_ID` (string, required)
    References the Subenrollment.Group_ID value in the parent table.

  - `division_ID` (string, required)
    References the Subenrollment.Division_ID value in the parent table.

  - `group_Coverage_Start` (string, required)
    References the Subenrollment.Group_Coverage_Start value in the parent table. Note: This field is marked as NOT NULL in the database and therefore required by the API.

  - `start_Date` (string, required)
    References the Subenrollment.Start_Date value in the parent table. Note: This field is marked as NOT NULL in the database and therefore required by the API.

  - `plan_ID` (string, required)
    References the GroupContractPlan.Plan_ID value indicating which Plan this member is enrolling that is being offered.

  - `plan_Start` (string, required)
    Start date of Plan coverage. Note: This field is marked as NOT NULL in the database and therefore required by the API.

  - `application_Received_Date` (string)
    Holds the date for the subscriber's application to disclose pre-existing conditions.

  - `dollar_Amount` (number)
    The Subscriber's 'Volume' within the selected plan on the enrollment. This will impact invoicing.

  - `entry_Date` (string)
    Date when the record was first added to the system.

  - `entry_User` (string)
    User that first added the record to the system

  - `ltC_Daily_Benefit_Amount` (number)
    Member elected Daily Benefit Amount

  - `ltC_Lifetime_Max_Amount` (number)
    Lifetime Max Amount elected

  - `ltC_Lifetime_Max_Days` (integer)
    Lifetime Max Days elected

  - `ltC_Lifetime_Max_Years` (integer)
    Lifetime Max Years elected

  - `ltC_Monthly_Benefit_Amount` (number)
    Member elected Monthly Benefit Amount

  - `paid_Through` (string)
    Date that the premiums have been paid through for this plan. The 'Paid Thru Exceeded' Ex Code will be applied to Claims adjudicated with a service date beyond this date.

  - `plan_End` (string)
    End date of Plan coverage.

  - `reason_ID` (integer)
    This identifier the reason the plan was termed.

  - `tier` (string)
    The Subscriber's 'Tier' within the selected plan on the enrollment. This will impact adjudication and invoicing.

  - `update_Date` (string)
    Date when the record was last updated in the system

  - `update_User` (string)
    User that last updated the record in the system

  - `use_Volume_Scale` (boolean, required)
    This option tells the system to calculate the 'Volume' using the Group volume rules. Checking this box will display an elipsis that when clicked will explain the volume calculation. Note: This field is marked as NOT NULL in the database and therefore required by the API.

  - `writing_CommissionAgencyRep_Key` (integer)
    Unique identifier for the CommissionAgencyRep table

## Response 200:

  - `200` (unknown)
    Success

## Response 200 fields (application/json):

  - `data` (object)

  - `data.subscriber_ID` (string, required)
    References the Subenrollment.Subscriber_ID value in the parent table.

  - `data.group_ID` (string, required)
    References the Subenrollment.Group_ID value in the parent table.

  - `data.division_ID` (string, required)
    References the Subenrollment.Division_ID value in the parent table.

  - `data.group_Coverage_Start` (string, required)
    References the Subenrollment.Group_Coverage_Start value in the parent table. Note: This field is marked as NOT NULL in the database and therefore required by the API.

  - `data.start_Date` (string, required)
    References the Subenrollment.Start_Date value in the parent table. Note: This field is marked as NOT NULL in the database and therefore required by the API.

  - `data.plan_ID` (string, required)
    References the GroupContractPlan.Plan_ID value indicating which Plan this member is enrolling that is being offered.

  - `data.plan_Start` (string, required)
    Start date of Plan coverage. Note: This field is marked as NOT NULL in the database and therefore required by the API.

  - `data.application_Received_Date` (string)
    Holds the date for the subscriber's application to disclose pre-existing conditions.

  - `data.dollar_Amount` (number)
    The Subscriber's 'Volume' within the selected plan on the enrollment. This will impact invoicing.

  - `data.entry_Date` (string)
    Date when the record was first added to the system.

  - `data.entry_User` (string)
    User that first added the record to the system

  - `data.ltC_Daily_Benefit_Amount` (number)
    Member elected Daily Benefit Amount

  - `data.ltC_Lifetime_Max_Amount` (number)
    Lifetime Max Amount elected

  - `data.ltC_Lifetime_Max_Days` (integer)
    Lifetime Max Days elected

  - `data.ltC_Lifetime_Max_Years` (integer)
    Lifetime Max Years elected

  - `data.ltC_Monthly_Benefit_Amount` (number)
    Member elected Monthly Benefit Amount

  - `data.paid_Through` (string)
    Date that the premiums have been paid through for this plan. The 'Paid Thru Exceeded' Ex Code will be applied to Claims adjudicated with a service date beyond this date.

  - `data.plan_End` (string)
    End date of Plan coverage.

  - `data.reason_ID` (integer)
    This identifier the reason the plan was termed.

  - `data.tier` (string)
    The Subscriber's 'Tier' within the selected plan on the enrollment. This will impact adjudication and invoicing.

  - `data.update_Date` (string)
    Date when the record was last updated in the system

  - `data.update_User` (string)
    User that last updated the record in the system

  - `data.use_Volume_Scale` (boolean, required)
    This option tells the system to calculate the 'Volume' using the Group volume rules. Checking this box will display an elipsis that when clicked will explain the volume calculation. Note: This field is marked as NOT NULL in the database and therefore required by the API.

  - `data.writing_CommissionAgencyRep_Key` (integer)
    Unique identifier for the CommissionAgencyRep table

  - `error` (object)

  - `error.detail` (string)
    A human-readable explanation specific to this occurrence of the problem.

  - `error.instance` (string)
    A URI reference that identifies the specific occurrence of the problem.It may
or may not yield further information if dereferenced.

  - `error.status` (integer)
    The HTTP status code([RFC7231], Section 6) generated by the origin server for
this occurrence of the problem.

  - `error.title` (string)
    A short, human-readable summary of the problem type.It SHOULD NOT change from
occurrence to occurrence of the problem, except for purposes of localization(e.g.,
using proactive content negotiation; see[RFC7231], Section 3.4).

  - `error.type` (string)
    A URI reference [RFC3986] that identifies the problem type. This specification
encourages that, when dereferenced, it provide human-readable documentation for
the problem type (e.g., using HTML [W3C.REC-html5-20141028]). When this member
is not present, its value is assumed to be "about:blank".

  - `debug` (object)

  - `debug.activityID` (string, required)

## Response 400:

  - `400` (unknown)
    Validation failed (route/body key mismatch, plan not on contract, plan dates outside enrollment, tier required, or target plan key already exists)

## Response 401:

  - `401` (unknown)
    Unauthorized

## Response 403:

  - `403` (unknown)
    Forbidden. The x-api-key header is missing or not valid. The API gateway sends this response, not VBAPI, so the body is not the VBAPI envelope; see Errors and troubleshooting.

## Response 404:

  - `404` (unknown)
    The SubEnrollmentPlan identified by the route does not exist

## Response 429:

  - `429` (unknown)
    Too many requests. The limit is 25 requests per second sustained, with bursts up to 50, per API key. Wait and retry with exponential backoff and jitter.

