---
title: "Fetch Billing Plan versions by ids"
method: POST
path: "/v1/billing_plans/version/batch"
tags: ["BillingPlanDefinitionVersions"]
---

# Fetch Billing Plan versions by ids

`POST /v1/billing_plans/version/batch`

Fetch Billing Plan versions by ids

## Request body

- RecordIdentityBatchRequest
  - `ids` RecordIdentity[]
    - `sysId` string — Unique Identifier of the tracked item
    - `lastUpdate` string, date-time — Last update of the tracked item
    - `table` string — Context of the tracked item

## Response `201`

Successful operation

- BillingPlanDefinitionVersion[] — List of billing plan versions
  - `sysId` string — Identifier of the version
  - `createdOn` string, date-time — Version created on
  - `updatedOn` string, date-time — Version updated on
  - `version` integer
  - `definition` RecordIdentity
    - `sysId` string — Unique Identifier of the tracked item
    - `lastUpdate` string, date-time — Last update of the tracked item
    - `table` string — Context of the tracked item
  - `predecessor` RecordIdentity
    - `sysId` string — Unique Identifier of the tracked item
    - `lastUpdate` string, date-time — Last update of the tracked item
    - `table` string — Context of the tracked item
  - `details` BillingPlanConfiguration
    - `rules` BillingRuleRoot[], required — Root rule of the billing plan. This rule is used to evaluate the billing plan.
      - `name` string — Name of the billing rule
      - `description` string — Description of the billing rule
      - `is_active` boolean — True if the billing plan is active
      - `scope` QueryOperator
        - `__type` string, required — Concrete type used for polymorphic deserialization (discriminator)
      - `start_date` string, date-time — Start date of the billing rule
      - `end_date` string, date-time — End date of the billing rule
      - `note` string — Note for the billing rule
      - `attachment_ids` string[] — List of attachment IDs
      - `__type` string, required — Concrete type used for polymorphic deserialization (discriminator)
      - `rules` BillingRule[] — List of rules
        - `name` string — Name of the billing rule
        - `description` string — Description of the billing rule
        - `is_active` boolean — True if the billing plan is active
        - `scope` QueryOperator
          - `__type` string, required — Concrete type used for polymorphic deserialization (discriminator)
        - `start_date` string, date-time — Start date of the billing rule
        - `end_date` string, date-time — End date of the billing rule
        - `note` string — Note for the billing rule
        - `attachment_ids` string[] — List of attachment IDs
        - `__type` string, required — Concrete type used for polymorphic deserialization (discriminator)
      - `parent_plan_id` string — Parent plan ID
      - `destination_metric` string — Describes the destination metrics of the billing plan.
      - `source_metric` string — Describes the source metric of the billing plan.
      - `source_metric_overrides` BillingMetricSourceOverride[] — List of source metric overrides by native details
        - `native_details` ServiceAccountNativeDetailsBase[]
          - `type` string, required — Concrete type used for polymorphic deserialization (discriminator)
        - `source_metric_id` string — ID of the metric to override
      - `match_service_account_ancestors` boolean — True if the rules contained by the group should match service account ancestors
  - `status` 'completed' | 'failed' | 'in_progress' | 'pending' | 'na' — Billing Plan Execution Status. This field is used to indicate the completion status of the billing plan execution.
  - `statuses` BillingPlanSyncStatus[] — Status by service account
    - `sys_id` string, required — Service account ID
    - `status` 'completed' | 'failed' | 'in_progress' | 'pending' | 'na', required — Status of the billing plan execution
    - `message` string — Message related to the billing plan status
  - `created_by` string — Created by
  - `updated_by` string — Updated by

## Other responses

- `400` — Invalid input
- `401` — Unauthorized
- `500` — Internal server error

---

[API](https://skmtc.dev/corestack/apis/corestack-external-api.md) · [All operations](https://skmtc.dev/corestack/apis/corestack-external-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/corestack/corestack-external-api/revisions/bf2cdf20826d/schema)
