# Generates a billing run from a template

Endpoint: GET /billingRuns/{tenantId}/fromTemplate/{templateId}/{referenceDate}
Version: v1-2025-04-18
Security: knox-authorizer

## Security:

  - `knox-authorizer` (unknown)
    http bearer JWT

## Path parameters:

  - `tenantId` (string, required)
    The tenant

  - `templateId` (string, required)
    The template

  - `referenceDate` (string, required)
    The reference date

## Response 200:

  - `200` (unknown)
    The records were retrieved successfully

## Response 200 fields (application/json):

  - `auto_renewal_options` (object, required)

  - `auto_renewal_options.auto_renewal_failure_notice_id` (string)
    The notice to send when a membership is NOT successfully renewed

  - `auto_renewal_options.auto_renewal_success_notice_id` (string)
    The notice to send when a membership is successfully renewed

  - `auto_renewal_options.expiration_date_range_end` (string, required)
    The date to use to filter out which memberships are candidate

  - `auto_renewal_options.expiration_date_range_start` (string, required)
    The date to use to filter out which memberships are candidate

  - `auto_renewal_options.include_only_certain_membership_packages` (boolean)
    Whether the process should apply only to certain member packages

  - `auto_renewal_options.include_only_certain_membership_types` (boolean)
    Whether the process should apply only to certain member types

  - `auto_renewal_options.include_only_certain_status_reasons` (boolean)
    Whether the process should apply only to certain member status reasons

  - `auto_renewal_options.membership_package_ids` (array)

  - `auto_renewal_options.membership_type_ids` (array)

  - `auto_renewal_options.new_status_reason_id` (string)
    Change the status reason

  - `auto_renewal_options.status_reason_ids` (array)

  - `auto_renewal_reminder_options` (object, required)

  - `auto_renewal_reminder_options.include_only_certain_membership_packages` (boolean)
    Whether the process should apply only to certain member packages

  - `auto_renewal_reminder_options.include_only_certain_membership_types` (boolean)
    Whether the process should apply only to certain member types

  - `auto_renewal_reminder_options.include_only_certain_status_reasons` (boolean)
    Whether the process should apply only to certain member status reasons

  - `auto_renewal_reminder_options.membership_package_ids` (array)

  - `auto_renewal_reminder_options.membership_type_ids` (array)

  - `auto_renewal_reminder_options.new_status_reason_id` (string)
    Change the status reason

  - `auto_renewal_reminder_options.reminders` (array, required)

  - `auto_renewal_reminder_options.reminders.expiration_date_range_end` (string, required)
    The date to use to filter out which memberships are candidate

  - `auto_renewal_reminder_options.reminders.expiration_date_range_start` (string, required)
    The date to use to filter out which memberships are candidate

  - `auto_renewal_reminder_options.reminders.id` (number)
    A unique, unchangeable reminder id

  - `auto_renewal_reminder_options.reminders.name` (string)
    Optional name

  - `auto_renewal_reminder_options.reminders.reminder_notice_id` (string, required)
    The reminder notice

  - `auto_renewal_reminder_options.status_reason_ids` (array)

  - `batch_id` (string)
    The batch to use

  - `drop_options` (object, required)

  - `drop_options.deactivate_certifications` (boolean)
    If true, any active certifications held by this member are rendered inactive

  - `drop_options.drop_notice_id` (string)
    The notice to send when the drop occurs

  - `drop_options.expiration_date_range_end` (string, required)
    The date to use to filter out which memberships are candidate

  - `drop_options.expiration_date_range_start` (string, required)
    The date to use to filter out which memberships are candidate

  - `drop_options.expire_committee_memberships` (boolean)
    If true, dropped members are renewed from any committees, including any inherited memberships

  - `drop_options.include_only_certain_membership_packages` (boolean)
    Whether the process should apply only to certain member packages

  - `drop_options.include_only_certain_membership_types` (boolean)
    Whether the process should apply only to certain member types

  - `drop_options.include_only_certain_status_reasons` (boolean)
    Whether the process should apply only to certain member status reasons

  - `drop_options.membership_package_ids` (array)

  - `drop_options.membership_type_ids` (array)

  - `drop_options.new_status_reason_id` (string)
    Change the status reason

  - `drop_options.status_reason_ids` (array)

  - `error` (string)
    The error message

  - `error_stack` (string)
    The error stack

  - `expiring_credit_card_reminders_options` (object, required)

  - `expiring_credit_card_reminders_options.include_only_certain_membership_packages` (boolean)
    Whether the process should apply only to certain member packages

  - `expiring_credit_card_reminders_options.include_only_certain_membership_types` (boolean)
    Whether the process should apply only to certain member types

  - `expiring_credit_card_reminders_options.include_only_certain_status_reasons` (boolean)
    Whether the process should apply only to certain member status reasons

  - `expiring_credit_card_reminders_options.membership_package_ids` (array)

  - `expiring_credit_card_reminders_options.membership_type_ids` (array)

  - `expiring_credit_card_reminders_options.new_status_reason_id` (string)
    Change the status reason

  - `expiring_credit_card_reminders_options.reminders` (array, required)

  - `expiring_credit_card_reminders_options.reminders.expiration_date_range_end` (string, required)
    The date to use to filter out which memberships are candidate

  - `expiring_credit_card_reminders_options.reminders.expiration_date_range_start` (string, required)
    The date to use to filter out which memberships are candidate

  - `expiring_credit_card_reminders_options.reminders.id` (number)
    A unique, unchangeable reminder id

  - `expiring_credit_card_reminders_options.reminders.name` (string)
    Optional name

  - `expiring_credit_card_reminders_options.reminders.reminder_notice_id` (string, required)
    The reminder notice

  - `expiring_credit_card_reminders_options.status_reason_ids` (array)

  - `generate_renewal_notices` (boolean)
    Whether this template should be generating renewal notices

  - `generate_renewal_orders` (boolean)
    Whether this template should be generating renewal orders

  - `id` (string, required)
    The unique, string identifier of this billing run

  - `last_refresh_date` (string)
    The last time the billing run was refreshed

  - `name` (string, required)
    The name of the billing run

  - `notification_email` (string)
    Te address to send notifications

  - `perform_auto_renewals` (boolean)
    Whether this template should be performing auto renewals

  - `perform_drops` (boolean)
    Whether this template should be dropping expired members

  - `preprocessing_date` (string)
    The date this billing run was actually processed

  - `recurring_billing_run_id` (string)
    If this was part of a recurring billing run, the ID

  - `renewal_notice_options` (object, required)

  - `renewal_notice_options.expiration_date_range_end` (string, required)
    The date to use to filter out which memberships are candidate

  - `renewal_notice_options.expiration_date_range_start` (string, required)
    The date to use to filter out which memberships are candidate

  - `renewal_notice_options.include_only_certain_membership_packages` (boolean)
    Whether the process should apply only to certain member packages

  - `renewal_notice_options.include_only_certain_membership_types` (boolean)
    Whether the process should apply only to certain member types

  - `renewal_notice_options.include_only_certain_status_reasons` (boolean)
    Whether the process should apply only to certain member status reasons

  - `renewal_notice_options.membership_package_ids` (array)

  - `renewal_notice_options.membership_type_ids` (array)

  - `renewal_notice_options.new_status_reason_id` (string)
    Change the status reason

  - `renewal_notice_options.renewal_notice_id` (string)
    The notice to send when a renewal order is created

  - `renewal_notice_options.status_reason_ids` (array)

  - `renewal_order_options` (object, required)

  - `renewal_order_options.expiration_date_range_end` (string, required)
    The date to use to filter out which memberships are candidate

  - `renewal_order_options.expiration_date_range_start` (string, required)
    The date to use to filter out which memberships are candidate

  - `renewal_order_options.include_only_certain_membership_packages` (boolean)
    Whether the process should apply only to certain member packages

  - `renewal_order_options.include_only_certain_membership_types` (boolean)
    Whether the process should apply only to certain member types

  - `renewal_order_options.include_only_certain_status_reasons` (boolean)
    Whether the process should apply only to certain member status reasons

  - `renewal_order_options.membership_package_ids` (array)

  - `renewal_order_options.membership_type_ids` (array)

  - `renewal_order_options.new_status_reason_id` (string)
    Change the status reason

  - `renewal_order_options.pro_forma` (boolean)
    Whether or not this should generate pro forma orders/invoices

  - `renewal_order_options.renewal_order_notice_id` (string)
    The notice to send when a renewal order is created

  - `renewal_order_options.status_reason_ids` (array)

  - `renewal_reminder_options` (object, required)

  - `renewal_reminder_options.include_only_certain_membership_packages` (boolean)
    Whether the process should apply only to certain member packages

  - `renewal_reminder_options.include_only_certain_membership_types` (boolean)
    Whether the process should apply only to certain member types

  - `renewal_reminder_options.include_only_certain_status_reasons` (boolean)
    Whether the process should apply only to certain member status reasons

  - `renewal_reminder_options.membership_package_ids` (array)

  - `renewal_reminder_options.membership_type_ids` (array)

  - `renewal_reminder_options.new_status_reason_id` (string)
    Change the status reason

  - `renewal_reminder_options.reminders` (array, required)

  - `renewal_reminder_options.reminders.expiration_date_range_end` (string, required)
    The date to use to filter out which memberships are candidate

  - `renewal_reminder_options.reminders.expiration_date_range_start` (string, required)
    The date to use to filter out which memberships are candidate

  - `renewal_reminder_options.reminders.id` (number)
    A unique, unchangeable reminder id

  - `renewal_reminder_options.reminders.name` (string)
    Optional name

  - `renewal_reminder_options.reminders.reminder_notice_id` (string, required)
    The reminder notice

  - `renewal_reminder_options.status_reason_ids` (array)

  - `run_date` (string)
    The date of the billing run

  - `scheduled_preprocessing_date` (string)
    The date which this billing run should be preprocessed

  - `scheduled_run_date` (string)
    The date the billing run is scheduled for execution

  - `send_auto_renewal_reminders` (boolean)
    Whether this template should be generating reminders

  - `send_expiring_credit_card_reminders` (boolean)
    Whether to warn  that someone's card is going to expire

  - `send_renewal_reminders` (boolean)
    Whether this template should be generating reminders

  - `statistics` (object)

  - `statistics.all_actions` (object)

  - `statistics.all_actions.error` (number)

  - `statistics.all_actions.excluded` (number)

  - `statistics.all_actions.pending` (number)

  - `statistics.all_actions.processing` (number)

  - `statistics.all_actions.successful` (number)

  - `statistics.all_actions.total` (number)

  - `statistics.auto_renewal_reminders` (object)

  - `statistics.auto_renewal_reminders.error` (number)

  - `statistics.auto_renewal_reminders.excluded` (number)

  - `statistics.auto_renewal_reminders.pending` (number)

  - `statistics.auto_renewal_reminders.processing` (number)

  - `statistics.auto_renewal_reminders.successful` (number)

  - `statistics.auto_renewal_reminders.total` (number)

  - `statistics.auto_renewals` (object)

  - `statistics.auto_renewals.error` (number)

  - `statistics.auto_renewals.excluded` (number)

  - `statistics.auto_renewals.pending` (number)

  - `statistics.auto_renewals.processing` (number)

  - `statistics.auto_renewals.successful` (number)

  - `statistics.auto_renewals.total` (number)

  - `statistics.drops` (object)

  - `statistics.drops.error` (number)

  - `statistics.drops.excluded` (number)

  - `statistics.drops.pending` (number)

  - `statistics.drops.processing` (number)

  - `statistics.drops.successful` (number)

  - `statistics.drops.total` (number)

  - `statistics.expiring_credit_card_reminders` (object)

  - `statistics.expiring_credit_card_reminders.error` (number)

  - `statistics.expiring_credit_card_reminders.excluded` (number)

  - `statistics.expiring_credit_card_reminders.pending` (number)

  - `statistics.expiring_credit_card_reminders.processing` (number)

  - `statistics.expiring_credit_card_reminders.successful` (number)

  - `statistics.expiring_credit_card_reminders.total` (number)

  - `statistics.renewal_notices` (object)

  - `statistics.renewal_notices.error` (number)

  - `statistics.renewal_notices.excluded` (number)

  - `statistics.renewal_notices.pending` (number)

  - `statistics.renewal_notices.processing` (number)

  - `statistics.renewal_notices.successful` (number)

  - `statistics.renewal_notices.total` (number)

  - `statistics.renewal_orders` (object)

  - `statistics.renewal_orders.error` (number)

  - `statistics.renewal_orders.excluded` (number)

  - `statistics.renewal_orders.pending` (number)

  - `statistics.renewal_orders.processing` (number)

  - `statistics.renewal_orders.successful` (number)

  - `statistics.renewal_orders.total` (number)

  - `statistics.renewal_reminders` (object)

  - `statistics.renewal_reminders.error` (number)

  - `statistics.renewal_reminders.excluded` (number)

  - `statistics.renewal_reminders.pending` (number)

  - `statistics.renewal_reminders.processing` (number)

  - `statistics.renewal_reminders.successful` (number)

  - `statistics.renewal_reminders.total` (number)

  - `status` (string, required)
    Enum: "cancelled", "completed", "draft", "error", "preprocessing", "ready for execution", "running", "scheduled", "scheduled for execution", "timed out"

  - `sys_bulk_load_at` (string)
    If this record was loaded via bulk, the timestamp when the record was processed

  - `sys_bulk_load_id` (string)
    If this record was loaded via bulk, the ID of the bulk load process

  - `sys_bulk_load_pk` (string)
    If this record was loaded via bulk, the tenant and key of the bulk load process used as a partition key

  - `sys_bulk_load_record_no` (number)
    If this record was loaded via bulk, the record number in the source file

  - `sys_bulk_load_source_file` (string)
    If this record was loaded via bulk, the source file

  - `sys_calculated_field_error` (string)
    The error associated with the calculated field

  - `sys_calculated_field_errors` (array)

  - `sys_calculated_field_errors.error` (string)

  - `sys_calculated_field_errors.field` (string)

  - `sys_configuration_snapshot_id` (string)
    If a snapshot was restored/applies to this record, the ID of the snapshot

  - `sys_created_at` (string, required)
    The date/time that this record was created, expressed in ISO-8601 date format

  - `sys_created_by_id` (string, required)
    The ID of the user that created this record

  - `sys_deleted_by_id` (string)
    The ID of the user that deleted (or last tried to delete) this object

  - `sys_directive` (string)
    Means for passing directive information into an object processing logic

  - `sys_external_id` (string)
    The ID that a record has from an external system or data import

  - `sys_has_files_in_s3` (boolean)
    If true, this record has files in S3. If false, it doesnt, so no need to hit S3 upon deletion

  - `sys_last_bulk_data_operation_id` (string)
    If this record was last touched by a bulk data operation, the ID of that operation

  - `sys_last_bulk_data_operation_sys_version` (string)
    If this record was last touched by a bulk data operation, the sys_version at the time of that operation

  - `sys_last_modified_at` (string, required)
    The date/time that this record record was last modified, expressed in ISO-8601 date format

  - `sys_last_modified_by_id` (string, required)
    The ID of the user that last modified this record

  - `sys_last_security_context` (object)
    The security context of the last insert, modify, or delete performed on this item

  - `sys_locked` (boolean)
    If set, this record is locked and cannot be changed via the API

  - `sys_snapshot_base_version` (number)
    The version to use as a base when creating a configuration snapshot; if not set, 1 is used. Helpful when creating a sandbox

  - `sys_version` (number)
    A number representing the version of this record in the database

  - `template_id` (string)
    The id of the template that generated this billing run

## Response 200 headers (application/json):

  - `Access-Control-Allow-Headers` (string)

  - `Access-Control-Allow-Methods` (string)

  - `Access-Control-Allow-Origin` (string)

## Response 400:

  - `400` (unknown)
    The request was not valid.

## Response 400 headers:

  - `Access-Control-Allow-Headers` (string)

  - `Access-Control-Allow-Methods` (string)

  - `Access-Control-Allow-Origin` (string)

## Response 401:

  - `401` (unknown)
    Unauthorized.

## Response 401 headers:

  - `Access-Control-Allow-Headers` (string)

  - `Access-Control-Allow-Methods` (string)

  - `Access-Control-Allow-Origin` (string)

## Response 403:

  - `403` (unknown)
    Forbidden

## Response 403 headers:

  - `Access-Control-Allow-Headers` (string)

  - `Access-Control-Allow-Methods` (string)

  - `Access-Control-Allow-Origin` (string)

## Response 404:

  - `404` (unknown)
    Unable to locate records

## Response 404 headers:

  - `Access-Control-Allow-Headers` (string)

  - `Access-Control-Allow-Methods` (string)

  - `Access-Control-Allow-Origin` (string)

## Response 429:

  - `429` (unknown)
    Limit exceeded... unable to retrieve records based on tenant limits.

## Response 429 headers:

  - `Access-Control-Allow-Headers` (string)

  - `Access-Control-Allow-Methods` (string)

  - `Access-Control-Allow-Origin` (string)

## Response 500:

  - `500` (unknown)
    General server error

## Response 500 headers:

  - `Access-Control-Allow-Headers` (string)

  - `Access-Control-Allow-Methods` (string)

  - `Access-Control-Allow-Origin` (string)

