Thales Adaptive Connect Documentation Portal

Billing Analytics APIs

The Billing Analytics APIs allow you to define pricing rules and generate billing reports for your eUICC operations.

These APIs cover:

  • Billing Models — Define how eUICC activities are priced, including per-event charges and optional discount rules such as vertical (global) and horizontal (per-device) slicing.

  • Billing Reports — Generate and retrieve billing outputs based on processed eUICC operations(e.g. Orders, Events) and your chosen billing model.

1. Billable Event Type

The BillableEventType section defines all possible usage event types that can be tracked and billed by the TAC Billing Analytics service. When creating a billing model, you select which of these types to charge for and at what price. This reference is used in the usage_type field of ChargeableUsageType (see ChargeableUsageType fields) and may be referenced by other billing-related sections in future API versions.

Not all event types are meaningful as billing targets for every tenant configuration. The types listed are the complete set supported by the platform — operators configure which subset to bill in each BillingModel.
Profile Management Orders
Value Description Billing Notes

DOWNLOAD_PROFILE_ORDER

Profile download order — triggers a new profile installation on the eUICC.

Supports optional dpp_price_list for per-SM-DP+ pricing.

DOWNLOAD_PROFILE_WITH_IMMEDIATE_ENABLE_ORDER

Combined download-and-enable order — downloads and immediately activates a new profile.

Supports optional dpp_price_list for per-SM-DP+ pricing.

ENABLE_PROFILE_ORDER

Enables (activates) an installed profile on the eUICC.

CONFIGURE_IMMEDIATE_ENABLE_ORDER

Set the default SM-DP+ address on the eUICC.

DISABLE_PROFILE_ORDER

Disables (deactivates) a currently active profile on the eUICC (SGP.32 only).

DELETE_PROFILE_ORDER

Deletes an installed profile from the eUICC.

GET_PROFILE_INFO_ORDER

Retrieves metadata for a specific installed profile.

LIST_PROFILE_ORDER

Lists all installed profiles on the eUICC (SGP.32).

UPDATE_PROFILE_CONFIGURATION_ORDER

Updates profile configuration including fallback settings, connection parameters, and polling.

UPDATE_PROFILE_FALLBACK_ATTRIBUTE_ORDER

Updates the fallback attribute flag for a specific profile (SGP.32).

SET_DEFAULT_DP_ADDRESS_ORDER

Configures the default SM-DP+ address in the eUICC (SGP.32).

GET_RAT_ORDER

Retrieves the Rules Authorisation Table from the eUICC (SGP.32).

Applet Management Orders
Value Description Billing Notes

UPDATE_APPLET_V3_CONFIGURATION_ORDER

Updates IPAe v3 default polling and fallback configuration (SGP.32 TAC Applet v3).

READ_APPLET_V3_CONFIGURATION_ORDER

Reads the IPAe v3 default polling and fallback configuration (SGP.32 TAC Applet v3).

UPDATE_PROFILE_V3_CONFIGURATION_ORDER

Updates IPAe v3 profile-specific polling and fallback configuration (SGP.32 TAC Applet v3).

READ_PROFILE_V3_CONFIGURATION_ORDER

Reads the IPAe v3 profile-specific polling and fallback configuration (SGP.32 TAC Applet v3).

DELETE_PROFILE_V3_CONFIGURATION_ORDER

Deletes the IPAe v3 profile-specific configuration, reverting to the applet-level defaults (SGP.32 TAC Applet v3).

eIM Management Orders
Value Description Billing Notes

CREATE_EIM_ORDER

Registers a new eIM configuration in the eUICC (SGP.32 eCO).

UPDATE_EIM_ORDER

Updates an existing eIM configuration in the eUICC (SGP.32 eCO).

DELETE_EIM_ORDER

Unregisters an eIM configuration from the eUICC (SGP.32 eCO).

LIST_EIM_ORDER

Lists all registered eIM identifiers in the eUICC (SGP.32 eCO).

eUICC Management Orders
Value Description Billing Notes

GET_EUICC_INFO_ORDER

Retrieves eUICC information including device info, IPA capabilities, and eUICC data (SGP.32).

Profile Events
Value Description Billing Notes

PROFILE_INSTALLATION_EVENT

Event raised after a new profile is downloaded and installed on the eUICC.

PROFILE_ACTIVATION_EVENT

Event raised when a profile is enabled on the eUICC.

PROFILE_DELETION_EVENT

Event raised when a profile is deleted from the eUICC.

PROFILE_FALLBACK_EVENT

Event raised when the eUICC triggers a local profile fallback due to connectivity loss.

PROFILE_ROLLBACK_EVENT

Event raised when the eUICC triggers a local profile rollback following a profile switch.

Device & Network Events
Value Description Billing Notes

EUICC_INITIALIZATION_EVENT

Event raised when a new eUICC is first seen and registered by the TAC solution.

IMEI_CHANGE_EVENT

Event raised when the eUICC is moved to a new IoT device (IMEI change detected).

RPLMN_CHANGE_EVENT

Event raised when the device registers on a new network (roaming change).

Polling Types
Value Description Billing Notes

ON_EVENT

Polling initiated by a local event on the device/eUICC.

DEVICE_SWITCH_ON

Polling initiated when the device is powered on (if enabled).

REGULAR_POLLING

Regular periodic polling based on the configured polling interval.

TRIG

Forced polling triggered remotely by the TAC server.

Shoulder Tap Message

TRIG_BY_DEVICE

Forced polling triggered by a device application.

Local Polling

2. Billing Models

A billing model defines how usage events are priced during billing, including per-unit charges, applicable event types, and optional discount rules such as global (vertical) and per-device (horizontal) slicing. These models are used during bill run processing to calculate charges for eUICC activity.

  • Applicability - Defines which usage event types are billable and at what per-unit price.

  • Vertical Slicing (optional) — Applies global volume-based discount slabs applied across the entire billing entity.

  • Horizontal Slicing (optional) — Applied per-EID discount slabs applied independently per device.

2.1. Create Billing Model

This POST API creates and persists a new billing model for the configured tenant.

Billing model names must be unique within the tenant’s billing entity.

An optional query parameter is_draft can be used to control the initial state of the billing model:

  • If is_draft=true, the billing model is saved with state DRAFT.

  • If is_draft=false (or the parameter is not provided), the billing model is saved with state CREATED.

Http request
POST /billing-analytics-service/billing/v1/billing-models?is_draft={true|false}
Content-Type: application/json

2.1.1. Query Parameters

Parameter Name Data Type Presence Description

is_draft

Boolean

O

When true, the billing model is saved with state DRAFT. When false or not provided, the billing model is saved with state CREATED. Default: false.

2.1.2. Request Body

Name Type Presence Description

billing_entity_id

String (UUID)

O

Optional billing entity identifier. If not provided, the system automatically uses your tenant identifier as the default.

model_name

String

M

A unique, human-readable name for this billing model. Must be between 1 and 128 characters. This name is how you reference the model in bill reports.

currency

String

M

The currency for all prices in this model. Use a standard 3-letter currency code (e.g. EUR, USD).

applicability

Applicability

M

Defines which usage event types are billable and at what per-unit price. Must contain at least one chargeable usage type.
See Applicability fields.

vertical_slicing

VerticalSlicing

O

Global volume-based discount slabs. Optional — a model may have neither, one, or both slicing types.
See VerticalSlicing fields.

horizontal_slicing

HorizontalSlicing

O

Per-EID discount slabs. Optional — a model may have neither, one, or both slicing types.
See HorizontalSlicing fields.

Applicability fields
Name Type Presence Description

chargeable_usage_types

List<ChargeableUsageType>

M

List of billable usage types to bill and their prices. Each type must appear only once. See ChargeableUsageType fields.

ChargeableUsageType fields
Name Type Presence Description

usage_type

BillableEventType

M

Must be unique within the parent chargeable_usage_types list.
See Billable Event Type for the complete list of all supported values.

unit_price

Decimal

M

Default per-unit charge for this usage type. Must be 0.00 or higher.
For DOWNLOAD_PROFILE_ORDER, this is the fallback price when no matching dpp_price_list entry is found.

dpp_price_list

List<DppPrice>

O

Optional list of prices per SM-DP+ server address.

Only applicable for DOWNLOAD_PROFILE_ORDER and DOWNLOAD_PROFILE_WITH_IMMEDIATE_ENABLE_ORDER. When provided, events matching a listed SM-DP+ address use that price instead of the default unit_price. See DppPrice fields.

DppPrice fields
Name Type Presence Description

smdp_address

String

M

The SM-DP+ server FQDN this price applies to. Must be unique within the parent dpp_price_list
and must be a valid FQDN , e.g., icedemo-testlab.stg.ondemandconnectivity.com

unit_price

Decimal

M

Per-download unit price for events originating from this SM-DP+ address. Must be 0.00 or higher. A value of 0.00 means downloads from this address are free.

VerticalSlicing fields
Name Type Presence Description

enabled

Boolean

M

Set to true to apply global volume discounts (Vertical Slicing). When false, slabs are ignored.

slabs

List<Slab>

C

List of discount tiers applied globally across all activity. Required when enabled = true. Tiers must cover a continuous range and must not overlap. Only the last tier may have no upper limit (to = -1).
See Slab fields (shared by VerticalSlicing and HorizontalSlicing).

HorizontalSlicing fields
Name Type Presence Description

enabled

Boolean

M

Set to true to apply per-device volume discounts(Horizontal Slicing). When false, slabs are ignored.

per_eid_slabs

List<Slab>

C

List of discount tiers applied per device. Required when enabled = true. Tiers must cover a continuous range and must not overlap. Only the last tier may have no upper limit (to = -1).
See Slab fields (shared by VerticalSlicing and HorizontalSlicing).

Slab fields (shared by VerticalSlicing and HorizontalSlicing)
Name Type Presence Description

name

String

M

Human-readable label for this slab (e.g., Free Tier, Standard Rate, Volume Discount). Must be non-blank and unique within the same slicing list (case-sensitive).

from

Integer

M

The starting transaction count for this tier (inclusive). Must be 1 or higher.

to

Integer

M

The ending transaction count for this tier (inclusive). Use -1 for an open-ended tier (no upper limit). Only the last tier may use -1.

discount_percent

Decimal

M

Discount percentage to apply for events in this slab range. Decimal in [0.00, 100.00].
100.00 = fully free 0.00 = no discount 10.50 = 10.5% off.

2.1.3. Request Examples

Minimal request — single usage type, no slicing
{
  "model_name": "Basic EUICC Init Billing",
  "currency": "EUR",
  "applicability": {
    "chargeable_usage_types": [
      {
        "usage_type": "EUICC_INITIALIZATION_EVENT",
        "unit_price": 0.05
      }
    ]
  }
}
Download profile order — unit_price only, no dpp_price_list (optional)
{
  "model_name": "Simple DPO Billing",
  "currency": "EUR",
  "applicability": {
    "chargeable_usage_types": [
      {
        "usage_type": "DOWNLOAD_PROFILE_ORDER",
        "unit_price": 0.08
      }
    ]
  }
}
Full request — DPP price list with both vertical and horizontal slicing
{
  "model_name": "Standard Download Billing Rule",
  "currency": "EUR",
  "applicability": {
    "chargeable_usage_types": [
      {
        "usage_type": "DOWNLOAD_PROFILE_ORDER",
        "unit_price": 0.08,
        "dpp_price_list": [
          {
            "smdp_address": "smdp.primaryoperator.com",
            "unit_price": 0.05
          },
          {
            "smdp_address": "smdp.secondaryoperator.com",
            "unit_price": 0.07
          }
        ]
      },
      {
        "usage_type": "ENABLE_PROFILE_ORDER",
        "unit_price": 0.01
      }
    ]
  },
  "vertical_slicing": {
    "enabled": true,
    "slabs": [
      { "name": "Free Tier",        "from": 1,      "to": 50000,  "discount_percent": 100.00 },
      { "name": "Standard Rate",    "from": 50001,  "to": 500000, "discount_percent": 0.00   },
      { "name": "Volume Discount",  "from": 500001, "to": -1,     "discount_percent": 10.00  }
    ]
  },
  "horizontal_slicing": {
    "enabled": true,
    "per_eid_slabs": [
      { "name": "First Event",  "from": 1, "to": 1,  "discount_percent": 0.00  },
      { "name": "Low Volume",   "from": 2, "to": 5,  "discount_percent": 5.00  },
      { "name": "High Volume",  "from": 6, "to": -1, "discount_percent": 75.00 }
    ]
  }
}

2.1.4. Response Body

Name Type Description

model_id

String (UUID)

Unique identifier for the billing model. Automatically generated by the system.

model_name

String

Human-readable name of this billing model.

billing_entity_id

String (UUID)

Billing entity identifier. Defaults to tenant_id when not explicitly configured. Read-only.

currency

String

The currency used for all prices in this model.

applicability

Applicability

The pricing rules defined for this model. See Applicability fields.

vertical_slicing

VerticalSlicing

Vertical slicing configuration (omitted if not provided in request). See VerticalSlicing fields.

horizontal_slicing

HorizontalSlicing

Horizontal slicing configuration (omitted if not provided in request). See HorizontalSlicing fields.

status

BillingModelStatus

The lifecycle status of the billing model. Determined by the is_draft query parameter at creation time.
See BillingModelStatus.

created_at

String (ISO-8601)

Timestamp when this billing model was first persisted. Read-only.
Example: 2026-03-17T10:00:00Z

updated_at

String (ISO-8601)

Timestamp of the last update to this billing model. Read-only.
Example: 2026-03-17T10:00:00Z

Example success response (201 Created) — with is_draft=false (default)
{
  "model_id": "fb1c1a0e-ee9e-3750-8a24-6bab9053f344",
  "model_name": "Standard Download Billing Rule",
  "billing_entity_id": "3a8aa14b-09c0-3760-bf0c-88888888b014",
  "currency": "EUR",
  "status": "CREATED",
  "applicability": {
    "chargeable_usage_types": [
      {
        "usage_type": "DOWNLOAD_PROFILE_ORDER",
        "unit_price": 0.08,
        "dpp_price_list": [
          { "smdp_address": "smdp.primaryoperator.com",   "unit_price": 0.05 },
          { "smdp_address": "smdp.secondaryoperator.com", "unit_price": 0.07 }
        ]
      },
      {
        "usage_type": "ENABLE_PROFILE_ORDER",
        "unit_price": 0.01
      }
    ]
  },
  "vertical_slicing": {
    "enabled": true,
    "slabs": [
      { "name": "Free Tier",        "from": 1,      "to": 50000,  "discount_percent": 100.00 },
      { "name": "Standard Rate",    "from": 50001,  "to": 500000, "discount_percent": 0.00   },
      { "name": "Volume Discount",  "from": 500001, "to": -1,     "discount_percent": 10.00  }
    ]
  },
  "horizontal_slicing": {
    "enabled": true,
    "per_eid_slabs": [
      { "name": "First Event",   "from": 1, "to": 1,  "discount_percent": 0.00  },
      { "name": "Low Volume",    "from": 2, "to": 5,  "discount_percent": 5.00  },
      { "name": "High Volume",   "from": 6, "to": -1, "discount_percent": 75.00 }
    ]
  },
  "created_at": "2026-03-17T10:00:00Z",
  "updated_at": "2026-03-17T10:00:00Z"
}
Example success response (201 Created) — with is_draft=true
{
  "model_id": "fb1c1a0e-ee9e-3750-8a24-6bab9053f344",
  "model_name": "Standard Download Billing Rule",
  "billing_entity_id": "3a8aa14b-09c0-3760-bf0c-88888888b014",
  "currency": "EUR",
  "state": "DRAFT",
  "applicability": {
    "chargeable_usage_types": [
      {
        "usage_type": "DOWNLOAD_PROFILE_ORDER",
        "unit_price": 0.08
      }
    ]
  },
  "created_at": "2026-03-17T10:00:00Z",
  "updated_at": "2026-03-17T10:00:00Z"
}

2.1.5. HTTP Response Codes

Table 1. Success Response
Code Description

201

Billing model created successfully.

Table 2. Error Responses
Code Description

400

VALIDATION_FAILED — One or more request fields are invalid. The response includes field-level validation errors.

400

BILLING_MODEL_INVALID — Business rule violation in the request (for example: invalid slab configuration, duplicate usage types, or incorrect price list usage).

406

Not acceptable — The requested response format is not supported.

409

A billing model with the given model_name already exists for this tenant.

415

Unsupported media type.

500

Internal server error.

Validation error response body (400)
{
  "title": "Validation Failed",
  "status": 400,
  "detail": "Request body failed validation.",
  "timestamp": "2026-03-17T10:00:00Z",
  "error_code": "VALIDATION_FAILED",
  "violations": [
    {
      "field": "modelName",
      "message": "Billing model name must not be blank."
    }
  ]
}
Conflict error response body (409)
{
  "title": "Billing Model Already Exists",
  "status": 409,
  "detail": "A billing model with name 'Standard Download Billing Rule' already exists.",
  "timestamp": "2026-03-17T10:00:00Z",
  "error_code": "BILLING_MODEL_ALREADY_EXISTS"
}
Business rule error response body (400 — BILLING_MODEL_INVALID)
{
  "title": "Invalid Billing Model",
  "status": 400,
  "detail": "Duplicate usageType in chargeableUsageTypes: DOWNLOAD_PROFILE_ORDER",
  "timestamp": "2026-03-17T10:00:00Z",
  "error_code": "BILLING_MODEL_INVALID"
}

2.1.6. Cross-Field Business Rules

The following invariants are enforced by the application service after Bean Validation:

Rule Description

BR-01

usage_type values in chargeable_usage_types must be unique within the applicability object.

BR-02

For DOWNLOAD_PROFILE_ORDER and DOWNLOAD_PROFILE_WITH_IMMEDIATE_ENABLE_ORDER, dpp_price_list is optional. When provided and non-empty, each entry must have a unique, non-blank smdp_address and a non-negative unit_price. For all other usage types, dpp_price_list MUST NOT be provided.

BR-03

smdp_address values within a dpp_price_list must be unique.

BR-04

When vertical_slicing.enabled is equal to true, slabs must be non-empty, ordered, contiguous, non-overlapping, and all from values must be 1 or greater.

BR-05

When horizontal_slicing.enabled is equal to true, per_eid_slabs must be non-empty, ordered, contiguous, non-overlapping, and all from values must be 1 or greater.

BR-06

In any slab list, only the last slab may have to = -1 (open-ended). All other slabs must have to greater from.

BR-07

Within the same slicing list (slabs or per_eid_slabs), all slab name values must be unique (case-sensitive). The same name may be reused across different slicing types (e.g., verticalSlicing.slabs and horizontalSlicing.perEidSlabs).

2.2. List All Billing Models

This GET API retrieves all billing models for the configured tenant’s billing entity as a paginated list. The results are sorted by model_name, then model_id. Use page_number and page_size to move through the list. If no billing models exist, it returns an empty list.

Http request
GET /billing-analytics-service/billing/v1/billing-models
Content-Type: application/json

2.2.1. Query Parameters

Parameter Name Data Type Presence Description

billing_entity_id

String

O

Optional billing entity identifier. If not provided, the system automatically uses your tenant identifier as the default.

page_number

Integer

O

The page you want to view. Starts from 1. If not provided, the first page is returned.

page_size

Integer

O

The number of results to return per page. If not specified, a default of 20 results is used.

2.2.2. Request Body

None

2.2.3. HTTP Response

2.2.3.1. Success Response
Code Description

200

Paginated list of billing models. May be empty if no models have been created.

2.2.3.2. Response Body

Returns a paginated response with a list of billing models in billing_models, along with pagination details in page_info.

Name Type Description

billing_models

List<BillingModelResponse>

The billing models on this page. May be empty. Each item has the same structure as the 201 response of the Create Billing Model endpoint — see Response Body.

page_info

PageInfo

Pagination information. See PageInfo fields.

Pagination guidelines for API consumers:

  • Start with page_number equal to 1 and increment sequentially to fetch subsequent pages.

  • Continue fetching until last equal to true (or until page_number greater than total_pages).

  • Do not assume all results fit in a single response — always handle pagination.

  • Use page_size to control batch size based on client processing capacity (max: 100).

  • Avoid parallel page fetching unless result consistency is not required.

PageInfo fields
Name Type Description

page_number

Integer

The page you want to view. Starts from 1. If not provided, the first page is returned.

page_size

Integer

The number of results to return per page. If not specified, a default of 20 results is used.

total_elements

Long

Total number of billing models across all pages.

total_pages

Integer

Total number of pages for the result set.

first

Boolean

true if this is the first page.

last

Boolean

true if there are no more pages after this one.

Example success response (200 OK) — page 1 of 2
{
  "billing_models": [
    {
      "model_id": "a3f2b1c0-1234-5678-90ab-cdef01234567",
      "model_name": "Basic EUICC Init Billing",
      "billing_entity_id": "3a8aa14b-09c0-3760-bf0c-88888888b014",
      "currency": "EUR",
      "status": "CREATED",
      "applicability": {
        "chargeable_usage_types": [
          {
            "usage_type": "EUICC_INITIALIZATION_EVENT",
            "unit_price": 0.10
          }
        ]
      },
      "created_at": "2026-03-10T09:00:00Z",
      "updated_at": "2026-03-10T09:00:00Z"
    },
    {
      "model_id": "b4e3c2d1-5678-1234-cdef-abcdef012345",
      "model_name": "Standard Download Billing Rule",
      "billing_entity_id": "3a8aa14b-09c0-3760-bf0c-88888888b014",
      "currency": "EUR",
      "status": "CREATED",
      "applicability": {
        "chargeable_usage_types": [
          {
            "usage_type": "DOWNLOAD_PROFILE_ORDER",
            "unit_price": 0.50
          }
        ]
      },
      "vertical_slicing": {
        "enabled": true,
        "slabs": [
          { "name": "Standard Rate",   "from": 1,    "to": 1000, "discount_percent": 0.0  },
          { "name": "Volume Discount", "from": 1001, "to": -1,   "discount_percent": 10.0 }
        ]
      },
      "created_at": "2026-03-17T10:00:00Z",
      "updated_at": "2026-03-17T10:00:00Z"
    }
  ],
  "page_info": {
    "page_number": 1,
    "page_size": 20,
    "total_elements": 2,
    "total_pages": 1,
    "first": true,
    "last": true
  }
}
2.2.3.3. Error Responses
Code Description

400

VALIDATION_FAILED — Invalid query parameters (e.g. page number less than 1 or page size out of range).

406

Not acceptable — requested media type is not supported.

500

Internal server error.

2.3. Get Billing Model by Name

This GET API retrieves a single, existing billing model by its unique model_name within the configured tenant’s billing entity.

Http request
GET /billing-analytics-service/billing/v1/billing-models/{model_name}
Content-Type: application/json

2.3.1. Path Parameters

Parameter Name Data Type Presence Description

model_name

String

M

The unique billing model name within the tenant’s billing entity. Must be 1–128 characters.

2.3.2. Query Parameters

Parameter Name Data Type Presence Description

billing_entity_id

String

O

Optional billing entity identifier. If not provided, the system automatically uses your tenant identifier as the default..

2.3.3. Request Body

None

2.3.4. HTTP Response

2.3.4.1. Success Response
Code Description

200

The requested billing model found and returned.

2.3.4.2. Response Body

Returns the full BillingModelResponse object — identical structure to the 201 response of the Create Billing Model endpoint.

Name Type Description

model_id

String (UUID)

Unique identifier for this billing model.

model_name

String

Human-readable name of this billing model.

billing_entity_id

String (UUID)

Billing entity identifier resolved at creation time. Read-only.

currency

String

The currency used for all prices in this model. (e.g., EUR, USD).

applicability

Applicability

Chargeable usage types and their per-unit prices. See Applicability fields.

vertical_slicing

VerticalSlicing

Vertical slicing configuration (omitted if not configured). See VerticalSlicing fields.

horizontal_slicing

HorizontalSlicing

Horizontal slicing configuration (omitted if not configured). See HorizontalSlicing fields.

status

BillingModelStatus

The lifecycle status of the billing model (CREATED, DRAFT, or DELETED). See BillingModelStatus.

created_at

String (ISO-8601)

Timestamp when this billing model was first persisted. Read-only.

updated_at

String (ISO-8601)

Timestamp of the last update to this billing model. Read-only.

Example success response (200 OK)
{
  "model_id": "fb1c1a0e-ee9e-3750-8a24-6bab9053f344",
  "model_name": "Standard Download Billing Rule",
  "billing_entity_id": "3a8aa14b-09c0-3760-bf0c-88888888b014",
  "currency": "EUR",
  "status": "CREATED",
  "applicability": {
    "chargeable_usage_types": [
      {
        "usage_type": "DOWNLOAD_PROFILE_ORDER",
        "unit_price": 0.50,
        "dpp_price_list": [
          {
            "smdp_address": "smdp.operator.com",
            "unit_price": 0.45
          }
        ]
      }
    ]
  },
  "vertical_slicing": {
    "enabled": true,
    "slabs": [
      { "name": "Standard Rate",   "from": 1,    "to": 1000, "discount_percent": 0.0  },
      { "name": "Volume Discount", "from": 1001, "to": -1,   "discount_percent": 10.0 }
    ]
  },
  "horizontal_slicing": {
    "enabled": false,
    "per_eid_slabs": [
        { "name": "First Event",  "from": 1, "to": 1,  "discount_percent": 0.00  },
        { "name": "Low Volume",   "from": 2, "to": 5,  "discount_percent": 5.00  },
        { "name": "High Volume",  "from": 6, "to": -1, "discount_percent": 75.00 }
    ]
  },
  "created_at": "2026-03-17T10:00:00Z",
  "updated_at": "2026-03-17T10:00:00Z"
}
2.3.4.3. Error Responses
Code Description

404

BILLING_MODEL_NOT_FOUND — No billing model found with the given name in the tenant’s billing entity.

406

Not acceptable — requested media type is not supported.

500

Internal server error.

Not Found error response body (404)
{
  "title": "Billing Model Not Found",
  "status": 404,
  "detail": "No billing model found with name 'Standard Download Billing Rule'.",
  "timestamp": "2026-03-17T10:00:00Z",
  "error_code": "BILLING_MODEL_NOT_FOUND"
}

2.4. BillingModelStatus

The BillingModelStatus enumeration defines the lifecycle status of a billing model. The status is set at creation time via the is_draft query parameter of the Create Billing Model endpoint, and may be updated by the Delete endpoint.

Value Description

CREATED

The billing model is active and available for use in bill runs. This is the default status when the is_draft query parameter is false or not provided during creation. Models in this status may be referenced by bill runs and billing reports. When deleted, a CREATED model is soft-deleted (state changes to DELETED) to preserve audit history and reporting consistency.

DRAFT

The billing model has been saved but is not yet active. Set when the is_draft query parameter is true during creation. Draft models are typically used during configuration or editing before activation. Since a DRAFT model is not used in billing operations, business-level validations related to bill runs do not apply, and the model can be permanently deleted at any time.

DELETED

The billing model has been soft-deleted. Only models in CREATED status can transition to DELETED status via the Delete endpoint. The record is retained for audit and billing run integrity — it is not physically removed from the database.

2.5. Delete Billing Model by Name

This DELETE API deletes a billing model identified by its unique name within the configured tenant’s billing entity.

The deletion behavior depends on the current state of the billing model:
  • If the model’s status is DRAFT — the model is permanently deleted (hard delete). The record is physically removed.

  • If the model’s status is CREATED — the model undergoes a soft delete: its state transitions to DELETED. The record is retained to preserve audit and billing run integrity.

  • Models already in DELETED state cannot be deleted again.

  • A model that is referenced by existing bill reports cannot be deleted.

Http request
DELETE /billing-analytics-service/billing/v1/billing-models/{model_name}
Content-Type: application/json

2.5.1. Path Parameters

Parameter Name Data Type Presence Description

model_name

String

M

The unique billing model name within the tenant’s billing entity. Must be 1–128 characters.

2.5.2. Query Parameters

Parameter Name Data Type Presence Description

delete_mode

String

O

Deletion behaviour. soft (default): respects model state — draft models are permanently removed, active models are soft-deleted. hard: permanently removes the model regardless of state. Allowed values: soft, hard.

billing_entity_id

String

O

Optional billing entity identifier. If not provided, the system automatically uses your tenant identifier as the default.

2.5.3. Request Body

None

2.5.4. HTTP Response

2.5.4.1. Success Response
Code Description

204

Billing model successfully deleted. No response body.

2.5.4.2. Error Responses
Code Description

400

VALIDATION_FAILED — The model name failed validation.

404

BILLING_MODEL_NOT_FOUND — No billing model found with the given name in the tenant’s billing entity.

406

Not acceptable — requested media type is not supported.

409

BILLING_MODEL_IN_USE — The billing model is referenced by one or more bill reports and cannot be deleted.

500

Internal server error.

Not Found error response body (404)
{
  "title": "Billing Model Not Found",
  "status": 404,
  "detail": "No billing model found with name 'Standard Download Billing Rule'.",
  "timestamp": "2026-03-17T10:00:00Z",
  "error_code": "BILLING_MODEL_NOT_FOUND"
}
Conflict error response body (409 — BILLING_MODEL_IN_USE)
{
  "title": "Billing Model In Use",
  "status": 409,
  "detail": "Billing model 'Standard Download Billing Rule' cannot be deleted because it is referenced by one or more bill runs.",
  "timestamp": "2026-03-17T10:00:00Z",
  "error_code": "BILLING_MODEL_IN_USE"
}

3. Billing Report

Billing Reports allow you to calculate and retrieve charges for a defined billing period using a specific billing model.

You submit a bill report request, the system processes it in the background, and you can then check its status and retrieve the results.

These APIs allow you to:

  • Submit a new bill report

  • Check the current status of a bill report

  • Retrieve the detailed billing results of a completed report

  • List all bill reports for your account

  • Cancel a report that is still running

  • Delete a completed or failed report

These endpoints are Admin APIs intended for internal administrative use. They may also be used in the future for load testing and system validation.

3.1. Submit Bill Report

This POST API submits a new bill report request. The system processes the report in the background and calculates charges based on your chosen billing model and billing period.

Http request
POST /billing-analytics-service/billing/v1/billing-reports
Content-Type: application/json

3.1.1. Request Body

Table 3. Top-level CreateBillReportRequest fields
Field Type Required Description

report_name

String

Yes

A name for this report. Must be unique among active reports for your account. Up to 128 characters.

model_name

String

Yes

The name of an active billing model to use for this report. The model must exist and be in CREATED state.

billing_period

BillingPeriodDto

Yes

The date range to include in this report.. See BillingPeriodDto fields.

billing_entity_id

String

No

Billing entity identifier. Defaults to tenant_id when absent.

card_groups

List<String>

No

Optional list of card group identifiers. When provided, billing is restricted to these groups.

Table 4. BillingPeriodDto fields
Field Type Required Description

from

String (ISO-8601)

Yes

Start of the billing period (inclusive). Must be in the past and before to. Example: 2025-01-01T00:00:00Z.

to

String (ISO-8601)

Yes

End of the billing period (exclusive). Must be after from. Maximum period: 731 days. Example: 2025-02-01T00:00:00Z.

3.1.2. Response Body

tenant_id is intentionally excluded from the response.
Table 5. BillReportResponse fields
Field Type Included When Description

report_id

String

Always

Server-generated identifier. Format: BR-{yyyyMMddTHHmmssSSS}-{modelPrefix}.

status

String

Always

Submission status. Always "SUBMITTED" for accepted requests.

3.1.3. HTTP Status Codes

Code Error Code When Triggered

202

—

Bill report successfully registered. Processing starts asynchronously.

400

VALIDATION_FAILED

A required field is missing or invalid.

400

INVALID_BILLING_PERIOD

The from value is greater than or equal to the to value, or the from value is set in the future.

400

BILLING_PERIOD_TOO_LONG

Billing period exceeds 731 days.

400

INVALID_CARD_GROUP

One or more card_groups entries are blank.

404

BILLING_MODEL_NOT_FOUND

Referenced model_name does not exist or is not in CREATED state.

406

—

Unsupported Accept header.

415

—

Content-Type is not application/json.

500

INTERNAL_ERROR

Unexpected server error.

3.1.4. Example Request

POST — Submit bill report (minimal)
{
  "report_name": "January_2025_Billing",
  "model_name": "Standard Download Billing Rule",
  "billing_period": {
    "from": "2025-01-01T00:00:00Z",
    "to": "2025-02-01T00:00:00Z"
  }
}
POST — Submit bill report (full payload)
{
  "report_name": "Full Payload BillReport Q3",
  "model_name": "Xyz Billing Model",
  "billing_entity_id": "C-XYZ",
  "billing_period": {
    "from": "2025-07-01T00:00:00Z",
    "to": "2025-08-01T00:00:00Z"
  },
  "card_groups": [
    "group-gamma",
    "group-delta"
  ]
}

3.1.5. Example Response

202 Accepted — bill report registered
{
  "report_id": "BR-20250101T063045123-rule-202",
  "status": "SUBMITTED"
}

3.1.6. Example Error Responses

400 — VALIDATION_FAILED
{
  "title": "Validation Failed",
  "status": 400,
  "detail": "Request body failed validation.",
  "timestamp": "2025-01-01T10:00:00Z",
  "error_code": "VALIDATION_FAILED",
  "violations": [
    {
      "field": "request.reportName",
      "message": "Report name must not be blank."
    }
  ]
}
400 — INVALID_BILLING_PERIOD
{
  "title": "Invalid Billing Period",
  "status": 400,
  "detail": "billing_period.from must be before billing_period.to.",
  "timestamp": "2025-01-01T10:00:00Z",
  "error_code": "INVALID_BILLING_PERIOD"
}
404 — BILLING_MODEL_NOT_FOUND
{
  "title": "Billing Model Not Found",
  "status": 404,
  "detail": "No billing model found with name 'Standard Download Billing Rule'.",
  "timestamp": "2025-01-01T10:00:00Z",
  "error_code": "BILLING_MODEL_NOT_FOUND"
}

3.2. Retrieve Bill Report running Status

This GET API retrieves the current processing status of a bill report.

The response includes overall report status, current pipeline phase, shard progress counters, and execution state of all billing and reporting sub-phases.

Http request
GET /billing-analytics-service/billing/v1/billing-reports/{report_id}
Content-Type: application/json

3.2.1. Path Parameters

Parameter Name Data Type Presence Description

report_id

String

M

The bill report identifier returned when the report was submitted. Format: BR-{yyyyMMddTHHmmssSSS}-{modelPrefix}.
Example: BR-20250101T063045123-rule-202.

3.2.2. Query Parameters

Parameter Name Data Type Required Default Description

billing_entity_id

String

No

tenantId

Optional billing entity identifier. Defaults to tenant_id when not provided.

3.2.3. Response Body

Table 6. BillReportStatusResponse fields
Field Type Description

report_id

String

Server-generated human-readable bill report identifier. Format: BR-{yyyyMMddTHHmmssSSS}-{first8charsOfModelName}.

report_name

String

Human-readable bill report name supplied at creation time.

billing_entity_id

String

Billing entity identifier. Defaults to tenant_id when not explicitly set.

model_name

String

Name of the billing model whose snapshot was frozen at creation time.

billing_period

BillingPeriodResponse

The date range covered by this report. Contains from and to timestamps. See BillingPeriodResponse fields

status

String

Overall status of the report. Values: CREATED, RUNNING, COMPLETED, FAILED, CANCELLED.

failure_reason

String (nullable)

If the report failed, this field contains a description of the failure reason.

v_billing_mapper_state

String

Executes vertical billing data processing by distributing usage events into parallel shards.

v_billing_mapper_shards_total

Integer

Total number of work units (shards) to be processed in the vertical billing step. It is calculated based on the billing period and system configuration (berDate X bucketId), and helps track overall progress.

v_billing_mapper_shards_done

Integer

Number of vertical billing mapper shards completed so far.

v_billing_reducer_state

String

Aggregates vertical billing mapper outputs to compute consolidated billing metrics.

v_billing_finalizer_state

String

Applies final calculations and prepares vertical billing results for reporting.

v_billing_reporting_state

String

Generates and persists vertical billing outputs in report-ready format.

h_billing_mapper_state

String

Executes horizontal billing processing by distributing per-entity data into shards.

h_billing_mapper_shards_total

Integer

Total number of shards planned for horizontal billing mapper execution.

h_billing_mapper_shards_done

Integer

Number of horizontal billing mapper shards completed so far.

h_billing_reducer_state

String

Aggregates horizontal mapper outputs to compute per-entity billing metrics.

h_billing_finalizer_state

String

Applies final calculations and prepares horizontal billing results.

h_billing_reporting_state

String

Generates and persists horizontal billing outputs for reporting.

v_reporting_mapper_state

String

Processes vertical billing results into intermediate report-ready structures.

v_reporting_reducer_state

String

Aggregates vertical reporting data into consolidated report sections.

v_reporting_finalizer_state

String

Finalizes vertical reporting computations and prepares structured output.

v_reporting_reporting_state

String

Persists finalized vertical report data for retrieval.

h_reporting_mapper_state

String

Processes horizontal billing results into intermediate reporting structures.

h_reporting_reducer_state

String

Aggregates horizontal reporting data into consolidated outputs.

h_reporting_finalizer_state

String

Finalizes horizontal reporting computations and prepares final structures.

h_reporting_reporting_state

String

Persists finalized horizontal report data for consumption.

created_at

String (ISO-8601)

When this report was submitted (UTC timestamp).

updated_at

String (ISO-8601)

When this report was last updated (UTC timestamp).

Table 7. BillingPeriodResponse fields
Field Type Description

from

String (ISO-8601)

Inclusive start of the billing period (UTC).

to

String (ISO-8601)

Exclusive end of the billing period (UTC).

All sub-phase state fields use values: NOT_STARTED, IN_PROGRESS, COMPLETED, FAILED.

3.2.4. HTTP Status Codes

Code Error Code When Triggered

200

—

Bill report status returned successfully.

404

BILLREPORT_NOT_FOUND

No bill report found for the given report_id.

406

—

Accept header requests an unsupported media type.

429

—

Rate limit exceeded.

500

INTERNAL_ERROR

Unexpected server error.

3.2.5. Example Requests and Responses

GET — Retrieve bill report status
GET /billing-analytics-service/billing/v1/billing-reports/BR-20250101T063045123-rule-202
Accept: application/json
200 OK — bill report status (pipeline running)
{
  "report_id": "BR-20250101T063045123-rule-202",
  "report_name": "January_2025_Billing",
  "billing_entity_id": "C-XYZ",
  "model_name": "Standard Download Billing Rule",
  "billing_period": {
    "from": "2025-01-01T00:00:00Z",
    "to": "2025-02-01T00:00:00Z"
  },
  "status": "RUNNING",

  "v_billing_mapper_state": "IN_PROGRESS",
  "v_billing_mapper_shards_total": 155,
  "v_billing_mapper_shards_done": 42,
  "v_billing_reducer_state": "NOT_STARTED",
  "v_billing_finalizer_state": "NOT_STARTED",
  "v_billing_reporting_state": "NOT_STARTED",
  "h_billing_mapper_state": "NOT_STARTED",
  "h_billing_mapper_shards_total": 0,
  "h_billing_mapper_shards_done": 0,
  "h_billing_reducer_state": "NOT_STARTED",
  "h_billing_finalizer_state": "NOT_STARTED",
  "h_billing_reporting_state": "NOT_STARTED",
  "v_reporting_mapper_state": "NOT_STARTED",
  "v_reporting_reducer_state": "NOT_STARTED",
  "v_reporting_finalizer_state": "NOT_STARTED",
  "v_reporting_reporting_state": "NOT_STARTED",
  "h_reporting_mapper_state": "NOT_STARTED",
  "h_reporting_reducer_state": "NOT_STARTED",
  "h_reporting_finalizer_state": "NOT_STARTED",
  "h_reporting_reporting_state": "NOT_STARTED",
  "created_at": "2025-01-02T06:30:45Z",
  "updated_at": "2025-01-02T06:31:22Z"
}
404 — BILLREPORT_NOT_FOUND
{
  "title": "Bill Report Not Found",
  "status": 404,
  "detail": "No bill report found with report_id 'BR-20000101T000000000-nonexist'.",
  "timestamp": "2025-01-01T10:00:00Z",
  "error_code": "BILLREPORT_NOT_FOUND"
}

3.3. Retrieve Bill Report Details

This GET API retrieves the complete billing results for a given bill report.

The response provides a comprehensive view of billing computation including revenue summaries, detailed breakdowns of events and orders, slicing discounts, and slab-level calculations derived from the billing model.

Some sections of the response may be empty if the report is still processing.
Http request
GET /billing-analytics-service/billing/v1/billing-reports/{report_id}/details
Content-Type: application/json

3.3.1. Path Parameters

Parameter Name Data Type Presence Description

report_id

String

M

The unique human-readable identifier of the bill report. This value is generated at report submission time and follows the format BR-{timestamp}-{modelPrefix}.

3.3.2. Query Parameters

Parameter Name Data Type Required Default Description

billing_entity_id

String

No

tenantId

Optional identifier representing the billing entity context. Defaults to tenant_id when not explicitly set.

3.3.3. Response Body

Table 8. BillReportDetailsResponse fields
Field Type Description

report_id

String

Unique identifier of the bill report used for retrieval, tracking, and correlation across billing operations.

report_name

String

Human-readable name assigned at report creation, typically used for UI display and business identification.

billing_entity_id

String

Identifier of the billing entity under which the report was generated. Defaults to tenant-level entity if not explicitly specified.

target_groups

List<String>

List of card group names used to filter the billing scope. When present, only events belonging to these groups are included in calculations.

billing_period

BillingPeriodResponse

The date range covered by this report. Contains from and to timestamps. See BillingPeriodResponse fields.

model_name

String

Name of the billing model whose pricing rules and configurations were applied. This reflects the frozen snapshot used during report execution.

currency

String

The currency for all amounts in this report.

status

String

Overall lifecycle state of the report. Indicates execution progress and final outcome. Possible values include CREATED, RUNNING, COMPLETED, FAILED, and CANCELLED.

gross_revenue_summary

GrossRevenueSummary

High-level aggregated revenue grouped into events, orders, and total categories. Provides insight into overall billing performance before and after discounts. See GrossRevenueSummary.

events_breakdown

List<EventBreakdown>

Detailed breakdown of billing events per type. Includes transaction counts, unit pricing, and calculated billable amounts for each event category. See EventBreakdown.

events_total

EventsOrdersTotal

Aggregate summary of all event-based transactions, including total count and total billable amount across the billing period. See EventsOrdersTotal.

orders_breakdown

List<OrderBreakdown>

Detailed breakdown of billing order per type. Captures transaction volumes, pricing, and computed billing amounts for each order category. See OrderBreakdown.

orders_total

EventsOrdersTotal

Aggregate summary of all order-based transactions, providing total volume and overall billable amount. See EventsOrdersTotal.

slicing_summary

SlicingSummary

Summary of discounts applied through slicing mechanisms (vertical and horizontal). Represents how pricing tiers impacted total billing. See SlicingSummary

vertical_slices

List<VerticalSlice>

Represents slab-based pricing applied across total transaction volume. Each entry defines a pricing tier and its contribution to the final bill.See VerticalSlice

vertical_slices_total

VerticalSlicesTotal

Aggregated totals derived from all vertical slicing slabs, including total billed transactions, gross amount, discounts, and net billable amount. See VerticalSlicesTotal

horizontal_slices

List<HorizontalSlice>

Represents per-entity (e.g., per EID) slab-based pricing distribution. Used for scenarios where pricing depends on individual entity usage. See HorizontalSlice

horizontal_slices_total

HorizontalSlicesTotal

Aggregated totals from horizontal slicing calculations, summarizing transaction counts, gross revenue, applied discounts, and final billable value. See HorizontalSlicesTotal

3.3.4. Nested Schemas

Table 9. GrossRevenueSummary
Field Type Description

events

RevenueCategory

Revenue metrics derived exclusively from billable events, including volume, gross revenue, discounts, and final totals. See RevenueCategory

orders

RevenueCategory

Revenue metrics derived from billable order operations, calculated similarly to events. See RevenueCategory

total

RevenueCategory

Combined revenue metrics aggregating both events and orders, representing the overall billing outcome. See RevenueCategory

Table 10. RevenueCategory
Field Type Description

volume

Long

Total number of transactions processed within this category, regardless of billing eligibility.

billable

Long

Subset of transactions that resulted in a non-zero billable amount.

gross_revenue

Decimal

Total revenue calculated before applying any discounts or slicing rules.

discount

Decimal

Total discount applied to the gross revenue. Typically represented as a negative value.

total_revenue

Decimal

Final net revenue after applying all discounts. Computed as sum of gross_revenue and discount.

Table 11. EventBreakdown
Field Type Description

event_type

String

Identifier of the event type as defined in the billing model.

amount_of_transactions

Long

Total number of occurrences of this event type within the billing period.

unitary_amount

Decimal

Per-unit cost defined in the billing model snapshot. Zero if not billable.

currency

String

Currency in which billing is calculated.

amount_billable

Decimal

Total billable amount calculated by multiplying the number of transactions with the unit price.

Table 12. OrderBreakdown
Field Type Description

order_type

String

Identifier of the order type.

amount_of_transactions

Long

Total number of orders executed for this type.

unitary_amount

Decimal

Cost per order as defined in the billing model.

currency

String

Currency code used for billing.

amount_billable

Decimal

Total billable amount for this order type.

smdp_breakdown

List

Total billable amount for this smdp type. This consist of smdp_address, amount of transaction, unitary amount, currency and amount billable

Table 13. EventsOrdersTotal
Field Type Description

total_reported

Long

Total number of transactions reported across all types in this category.

total_billable_amount

Decimal

Total billable amount aggregated across all transactions.

Table 14. SlicingSummary
Field Type Description

vertical_slices_discount

Decimal

Total discount applied due to vertical slicing (volume-based pricing tiers).

horizontal_slices_discount

Decimal

Total discount applied due to horizontal slicing (per-entity pricing tiers).

total_discount

Decimal

Combined discount from both vertical and horizontal slicing mechanisms.

Table 15. VerticalSlice
Field Type Description

slice_name

String

Slab name from the billing model representing a specific pricing tier.

from

Integer

Start of the transaction count range for this tier.

to

Integer

End of the transaction count range. -1 means no upper limit.

discount_percent

Decimal

Discount percentage applied to transactions in this slab.

billed_transactions

Long

Number of transactions that fall within this slab range.

amount

Decimal

Total gross amount for transactions in this slab before discount.

amount_discounted

Decimal

Total discount applied for this slab (typically negative).

billable_amount

Decimal

Net amount after discount (total amount minus discount amount).

Table 16. VerticalSlicesTotal
Field Type Description

billed_transactions

Long

Total number of transactions across all vertical slabs.

amount

Decimal

Total gross amount before applying any slab-level discounts.

amount_discounted

Decimal

Total discount applied across all slabs (typically negative).

billable_amount

Decimal

Net amount after discount (total amount minus discount amount).

Table 17. HorizontalSlice
Field Type Description

slice_name

String

Slab name from the billing model representing a horizontal pricing tier.

from

Integer

Inclusive lower bound of per-EID event count for this slab.

to

Integer

Inclusive upper bound of the range. -1 indicates an open-ended slab.

discount_percent

Decimal

Discount percentage applied to transactions in this slab.

billed_transactions

Long

Total number of events across all EIDs that fall within this slab.

amount

Decimal

Total gross amount for this slab before applying discounts.

amount_discounted

Decimal

Total discount applied for this slab (typically negative).

billable_amount

Decimal

Net amount after discount (total amount minus discount amount).

Table 18. HorizontalSlicesTotal
Field Type Description

billed_transactions

Long

Total number of events across all horizontal slabs.

amount

Decimal

Total gross amount before applying any horizontal slicing discounts.

amount_discounted

Decimal

Total discount applied across all horizontal slabs (typically negative).

billable_amount

Decimal

Net amount after discount (total amount minus discount amount).

3.3.5. Example Response

200 OK — bill report details
{
  "report_id": "BR-20250115T103000000-test-9999",
  "report_name": "Test Bill Report January 2025",
  "billing_entity_id": "0bfc6752-f308-304f-8246-ed90c7f5e0bb",
  "target_groups": [],
  "billing_period": {
    "from": "2025-01-01T00:00:00Z",
    "to": "2025-01-10T00:00:00Z"
  },
  "model_name": "test-model-2025",
  "currency": "USD",
  "status": "CREATED",

  "gross_revenue_summary": {
    "events": {
      "volume": 225,
      "billable": 225,
      "gross_revenue": 615.00,
      "discount": 72.00,
      "total_revenue": 483.00
    },
    "orders": {
      "volume": 75,
      "billable": 75,
      "gross_revenue": 205.00,
      "discount": 32.00,
      "total_revenue": 73.00
    },
    "total": {
      "volume": 300,
      "billable": 300,
      "gross_revenue": 820.00,
      "discount": 35.00,
      "total_revenue": 688.00
    }
  },

  "events_breakdown": [
    {
      "event_type": "EUICC_INITIALIZATION_EVENT",
      "amount_of_transactions": 75,
      "unitary_amount": 3.50,
      "currency": "USD",
      "amount_billable": 262.50
    },
    {
      "event_type": "PROFILE_ROLLBACK_EVENT",
      "amount_of_transactions": 150,
      "unitary_amount": 2.35,
      "currency": "USD",
      "amount_billable": 352.50
    },
    {
      "event_type": "IMEI_CHANGE_EVENT",
      "amount_of_transactions": 0,
      "unitary_amount": 0,
      "currency": "USD",
      "amount_billable": 0
    }
  ],

  "events_total": {
    "total_reported": 225,
    "total_billable_amount": 615.00
  },

  "orders_breakdown": [
    {
      "order_type": "DOWNLOAD_PROFILE_ORDER",
      "amount_of_transactions": 50,
      "unitary_amount": 2.35,
      "currency": "USD",
      "amount_billable": 117.50
    },
    {
      "order_type": "ENABLE_PROFILE_ORDER",
      "amount_of_transactions": 25,
      "unitary_amount": 3.50,
      "currency": "USD",
      "amount_billable": 87.50
    },
    {
      "order_type": "DOWNLOAD_PROFILE_WITH_IMMEDIATE_ENABLE_ORDER",
      "amount_of_transactions": 0,
      "unitary_amount": 0,
      "currency": "USD",
      "amount_billable": 0
    }
  ],

  "orders_total": {
    "total_reported": 75,
    "total_billable_amount": 205.00
  },

  "slicing_summary": {
    "vertical_slices_discount": 82.00,
    "horizontal_slices_discount": 50.00,
    "total_discount": 132.00
  },

  "vertical_slices": [
    {
      "slice_name": "First 100",
      "from": 1,
      "to": 100,
      "discount_percent": 0,
      "billed_transactions": 100,
      "amount": 235.00,
      "amount_discounted": 0.00,
      "billable_amount": 235.00
    },
    {
      "slice_name": "101-500",
      "from": 101,
      "to": 500,
      "discount_percent": 5,
      "billed_transactions": 200,
      "amount": 585.00,
      "amount_discounted": -29.25,
      "billable_amount": 555.75
    },
    {
      "slice_name": "501+",
      "from": 501,
      "to": -1,
      "discount_percent": 10,
      "billed_transactions": 0,
      "amount": 0.00,
      "amount_discounted": 0.00,
      "billable_amount": 0.00
    }
  ],

  "vertical_slices_total": {
    "billed_transactions": 300,
    "amount": 820.00,
    "amount_discounted": 82.00,
    "billable_amount": 738.00
  },

  "horizontal_slices": [
    {
      "slice_name": "First 100",
      "from": 1,
      "to": 100,
      "discount_percent": 0,
      "billed_transactions": 100,
      "amount": 235.00,
      "amount_discounted": 0.00,
      "billable_amount": 235.00
    },
    {
      "slice_name": "101-500",
      "from": 101,
      "to": 500,
      "discount_percent": 5,
      "billed_transactions": 200,
      "amount": 585.00,
      "amount_discounted": 29.25,
      "billable_amount": 555.75
    }
  ],

  "horizontal_slices_total": {
    "billed_transactions": 300,
    "amount": 820.00,
    "amount_discounted": 82.00,
    "billable_amount": 738.00
  }

}

3.3.6. HTTP Status Codes

Code Error Code When Triggered

200

—

Bill report details returned successfully.

404

BILLREPORT_NOT_FOUND

No bill report found with the given report_id.

406

—

Accept header requests an unsupported media type.

429

—

Rate limit exceeded.

500

INTERNAL_ERROR

Unexpected server error.

3.4. List All Bill Reports

This GET API retrieves a paginated list of bill reports available for a given tenant and billing entity context.

It provides a lightweight summary of each report including identifiers, billing model reference, billing period, lifecycle status, and creation timestamp. This API is typically used for listing, filtering, and navigating reports in UI or reporting tools.

Pagination is applied to control result size and optimize performance for large datasets.

Http request
GET /billing-analytics-service/billing/v1/billing-reports
Content-Type: application/json

3.4.1. Query Parameters

Parameter Name Data Type Required Default Description

billing_entity_id

String

No

tenantId

Optional identifier representing the billing entity scope. Defaults to tenant_id when not explicitly set.

page_number

Integer

No

1

The page you want to view. Starts from 1. If not provided, the first page is returned.

page_size

Integer

No

10

The number of results to return per page. If not specified, a default of 20 results is used.

Pagination guidelines for API consumers:

  • Start with page_number equal to 1 and increment sequentially to fetch subsequent pages.

  • Continue fetching until last equal to true (or until page_number greater than total_pages).

  • Do not assume all results fit in a single response — always handle pagination.

  • Use page_size to control batch size based on client processing capacity (max: 100).

  • Avoid parallel page fetching unless result consistency is not required.

3.4.2. Response Body

Pagination metadata is always returned along with the result set. If no bill reports exist for the given scope, the API returns an empty array with valid pagination fields.
Table 19. Paginated bill report list response
Field Type Description

bill_reports

List<BillReportListItemResponse>

Array containing bill report summaries for the requested page. Returns an empty list if no reports are found.

page_info

PageInfo

Pagination description. See PageInfo fields.

3.4.3. Nested Schemas

Table 20. BillReportListItemResponse
Field Type Description

report_id

String

Unique human-readable identifier of the bill report generated at submission time. This identifier is used for retrieval, tracking, and correlation across billing workflows and APIs.

bill_report_name

String

User-defined name assigned to the bill report at creation time. Primarily used for display in UI and for easier identification of reports in listings.

model_name

String

Name of the billing model whose pricing rules and configuration were applied to generate this report.

billing_period

BillingPeriodResponse

The date range covered by this report. Contains from and to timestamps. See BillingPeriodResponse fields.

status

String

Current lifecycle state of the bill report indicating execution progress or completion status. Possible values include CREATED, RUNNING, COMPLETED, FAILED, and CANCELLED.

total_bill_amount

Decimal

Total billable amount calculated for this report after applying all pricing rules, discounts, and slicing logic. Represents the final payable amount.

submission_time

String (ISO-8601)

Timestamp indicating when the bill report was submitted or created.

3.4.4. Example Requests and Responses

GET — List bill reports with default pagination
GET /billing-analytics-service/billing/v1/billing-reports
Accept: application/json
GET — List bill reports with pagination and billing entity filter
GET /billing/v1/billing-reports?billing_entity_id=C-XYZ&page_number=1&page_size=10
Accept: application/json
200 OK — paginated list of bill reports (page 1 of 1)
{
  "bill_reports": [
    {
      "report_id": "BR-20250201T080000000-xyz-b",
      "bill_report_name": "February_2025_Billing",
      "model_name": "Xyz Billing Model",
      "billing_period": {
        "from": "2025-02-01T00:00:00Z",
        "to": "2025-03-01T00:00:00Z"
      },
      "status": "COMPLETED",
      "total_bill_amount": 1450.75,
      "submission_time": "2025-02-02T08:00:00Z"
    },
    {
      "report_id": "BR-20250101T063045123-rule-202",
      "bill_report_name": "January_2025_Billing",
      "model_name": "Standard Download Billing Rule",
      "billing_period": {
        "from": "2025-01-01T00:00:00Z",
        "to": "2025-02-01T00:00:00Z"
      },
      "status": "RUNNING",
      "total_bill_amount": 820.00,
      "submission_time": "2025-01-02T06:30:45Z"
    }
  ],
  "page_info": {
    "page_number": 1,
    "page_size": 20,
    "total_elements": 1,
    "total_pages": 1,
    "first": true,
    "last": true
  }
}
200 OK — empty list (no bill reports found)
{
  "bill_reports": [],
  "page_info": {
    "page_number": 1,
    "page_size": 20,
    "total_elements": 1,
    "total_pages": 1,
    "first": true,
    "last": true
  }
}

3.4.5. HTTP Status Codes

Code Error Code When Triggered

200

—

List of bill reports returned successfully. Returns an empty array if no reports exist for the given scope.

400

VALIDATION_FAILED

Invalid query parameters such as page_number less than 1 or page_size outside allowed bounds.

429

—

Rate limit exceeded.

500

INTERNAL_ERROR

Unexpected server error.

3.5. Cancel Bill Report

This POST API cancels an existing bill report by transitioning its lifecycle state to CANCELLED.

Cancellation is only allowed for reports that are still in progress or not yet executed. Specifically, reports in CREATED or RUNNING state can be cancelled. Once cancelled, any ongoing pipeline execution detects the state change and stops gracefully without completing remaining stages.

Reports that have already reached a terminal state (COMPLETED, FAILED, or CANCELLED) cannot be cancelled. Attempting to cancel such reports results in a 409 Conflict error.

Http request
POST /billing-analytics-service/billing/v1/billing-reports/{report_id}/cancel
Content-Type: application/json

3.5.1. Path Parameters

Parameter Name Data Type Required Description

report_id

String

Yes

Human-readable identifier of the bill report to cancel. Generated at submission time and follows the format BR-{yyyyMMddTHHmmssSSS}-{first8charsOfModelName}..

3.5.2. Query Parameters

Parameter Name Data Type Required Default Description

billing_entity_id

String

No

tenantId

Optional identifier representing the billing entity context. Defaults to tenant_id when not explicitly set.

3.5.3. Cancellation Rules

Current Status Cancellable Behavior

CREATED

Yes

Transitions to CANCELLED. No pipeline execution has started, so cancellation is immediate.

RUNNING

Yes

Transitions to CANCELLED. Ongoing pipeline stages detect the state change and terminate gracefully.

COMPLETED

No

Returns 409 Conflict with error code BILLREPORT_CANNOT_CANCEL.

FAILED

No

Returns 409 Conflict with error code BILLREPORT_CANNOT_CANCEL.

CANCELLED

No

Returns 409 Conflict with error code BILLREPORT_CANNOT_CANCEL.

3.5.4. Response Body

Table 21. BillReportResponse fields
Field Type Description

report_id

String

Unique identifier of the bill report that was requested for cancellation.

status

String

Final state of the report after the operation. Always returns CANCELLED for a successful cancellation.

3.5.5. Example Requests and Responses

POST — Cancel a bill report
POST /billing/v1/billing-reports/BR-20250101T063045123-rule-202/cancel
Accept: application/json
200 OK — bill report successfully cancelled
{
  "report_id": "BR-20250101T063045123-rule-202",
  "status": "CANCELLED"
}
404 — BILLREPORT_NOT_FOUND
{
  "title": "Bill Report Not Found",
  "status": 404,
  "detail": "No bill report found with report_id 'BR-20250101T063045123-rule-202'.",
  "timestamp": "2025-01-01T10:00:00Z",
  "error_code": "BILLREPORT_NOT_FOUND"
}
409 — BILLREPORT_CANNOT_CANCEL
{
  "title": "Bill Report Cannot Be Cancelled",
  "status": 409,
  "detail": "Bill report 'BR-20250101T063045123-rule-202' is in status COMPLETED and cannot be cancelled.",
  "timestamp": "2025-01-01T10:00:00Z",
  "error_code": "BILLREPORT_CANNOT_CANCEL"
}

3.5.6. HTTP Status Codes

Code Error Code When Triggered

200

—

Bill report successfully cancelled. The response includes report_id and status=CANCELLED.

404

BILLREPORT_NOT_FOUND

No bill report found with the given report_id.

409

BILLREPORT_CANNOT_CANCEL

Report is in a terminal state (COMPLETED, FAILED, or CANCELLED) and cannot be cancelled.

429

—

Rate limit exceeded.

500

INTERNAL_ERROR

Unexpected server error.

3.6. Delete Bill Report

This DELETE API permanently removes a bill report and all associated data from the system.

Once deleted, the bill report: - Can no longer be retrieved - Will not appear in listing APIs - Cannot be restored

Unlike cancellation, this operation removes the report entirely, including all computed billing data and metadata associated with it.

Http request
DELETE /billing-analytics-service/billing/v1/billing-reports/{report_id}
Content-Type: application/json

3.6.1. Path Parameters

Parameter Name Data Type Presence Description

report_id

String

M

The unique human-readable identifier of the bill report to delete. This value is generated at submission time and follows the format BR-{yyyyMMddTHHmmssSSS}-{first8charsOfModelName}.

3.6.2. Query Parameters

Parameter Name Data Type Required Default Description

billing_entity_id

String

No

tenantId

Optional identifier representing the billing entity context. Defaults to tenant_id when not explicitly set.

3.6.3. Response

This endpoint returns no response body on success.

A successful response confirms that the bill report and all its associated data have been permanently removed.

This operation is irreversible. Once a bill report is deleted, it cannot be recovered.

3.6.4. Example Request

DELETE — remove a bill report
DELETE /billing/v1/billing-reports/BR-20250101T063045123-rule-202
Accept: application/json

3.6.5. Example Responses

204 No Content — bill report successfully deleted
HTTP/1.1 204 No Content
404 Not Found — bill report does not exist
{
  "title": "Bill Report Not Found",
  "status": 404,
  "detail": "No bill report found with report_id 'BR-20250101T063045123-rule-202'.",
  "timestamp": "2025-01-01T10:00:00Z",
  "error_code": "BILLREPORT_NOT_FOUND"
}

3.6.6. HTTP Status Codes

Code Error Code When Triggered

204

—

Bill report successfully deleted. No response body is returned.

400

VALIDATION_FAILED

Invalid request such as missing or blank report_id.

404

BILLREPORT_NOT_FOUND

No bill report exists with the given report_id.

406

—

Accept header requests an unsupported media type.

429

—

Rate limit exceeded.

500

INTERNAL_ERROR

Unexpected server error.