# Generate GroupDivisionCaptive Invoice

Creates a new Premium Billing Invoice for the selected GroupDivisionCaptive.

Endpoint: POST /generate-group-division-captive-invoice
Version: v1
Security: apiKeyAuth, bearerAuth

## Security:

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

  - `bearerAuth` (unknown)
    http bearer JWT

## Header parameters:

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

## Request fields (application/json):

  - `invoice_Key` (integer)

  - `group_ID` (string)

  - `division_ID` (string)

  - `subscriber_ID` (string)

  - `groupDivisionCaptive` (string)

  - `bill_From` (string)

  - `bill_Thru` (string)

  - `invoice_Date` (string)

  - `due_Date` (string)

  - `user_ID` (string)

  - `regenerate` (boolean)

  - `input_Date` (string)

  - `activity_ID` (string)

  - `client_ID` (string)

## Response 200:

  - `200` (unknown)
    Success

## Response 200 fields (application/json):

  - `data` (object)

  - `data.invoice_Key` (integer, required)
    Unique identifier for the Invoice Note: This field is marked as NOT NULL in the database and therefore required by the API.

  - `data.additional_Invoice_Level` (string)
    Specifies invoice level of additional invoices defined on the prem rate.

  - `data.bill_Address` (string)
    Address of the group or individual the Invoice is for

  - `data.bill_Address2` (string)
    Second line for the Address of the group or individual the Invoice is for

  - `data.bill_City` (string)
    City of the group or individual the Invoice is for

  - `data.bill_County_Code` (string)
    County of the group or individual the Invoice is for.

  - `data.bill_Name` (string)
    Name of the group or individual the Invoice is for

  - `data.bill_State` (string)
    State of the group or individual the Invoice is for

  - `data.bill_Zip_Code` (string)
    Zip Code of the group or individual the Invoice is for

  - `data.billing_Cycle_ID` (string)
    This is the Billing Cycle the invoice was gerenated for.

  - `data.billing_From` (string)
    First day of the Invoice period

  - `data.billing_Thru` (string)
    Last day of the Invoice period

  - `data.due_Date` (string)
    Due Date of the Invoice

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

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

  - `data.finalized` (boolean, required)
    Finalized invoices cannot be changed Note: This field is marked as NOT NULL in the database and therefore required by the API.

  - `data.finalized_Date` (string)
    Date the Invoice was Finalized

  - `data.finalized_User` (string)
    User that Finalized the Invoice

  - `data.invoice_Date` (string)
    Date of the Invoice

  - `data.invoice_Level` (string)
    Level of the Invoice: Group, Division, or Subscriber

  - `data.invoice_Number` (string)
    Number assigned to this Invoice

  - `data.invoice_Status` (string)
    Status of the Invoice: Open or Closed

  - `data.original_Invoice_Key` (integer)
    Identifies the Invoice that this Invoice was created from

  - `data.pay_Period` (integer)
    This number represents sequence of the payroll from the beginning of the payroll year.

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

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

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

