Skip to content
Rate Setups(Package-based)

Edit Billing Package

Edits a billing package (v2). The fields match the create-package operation.

Request parameters

  • Required: id (billing-package id), supplied in the path.
  • Optional: audit_frontend_resource (caller-provided audit context), plus the package configuration fields from the create operation.
  • See the field descriptions for the format, value range, and business meaning of each field.

Risk warning

This operation changes live billing configuration and may affect how customers are actually charged. Verify the target record and parameters before calling.

Result

On success, the operation completes; the resulting state and returned data follow the 200 response definition.

PUThttps://b-api.lbkrs.com/v2/billing/billing_package/{id}

Authorization

AuthorizationstringheaderRequired

Send the Broker ACCESS_TOKEN as Authorization: Bearer <token>.

Permission

lb_hk_charging.lb_hk_billingpackage_update

The Broker ACCESS_TOKEN must be granted the permission above, or the call will be rejected.

Parameters

idstringRequired

Package ID

Request body application/json

namestring

Package name.

org_package_typestring

Package type.

org_idnumber

Organization ID.

feesarray<object>

Fee items; each is an object (fields below).

Child attributes
billing_item_idstringrequired

Billing item (fee scenario) ID.

currencystringrequired

Currency code, e.g. HKD.

maxstring

Fee cap (numeric string).

minstring

Fee floor (numeric string).

thresholdstring

Threshold (numeric string).

calculation_methodinteger

Calculation method code.

fee_rate_typeinteger

Fee rate type code.

metric_typeinteger

Metering method code.

metric_cycle_typeinteger

Metering cycle type code.

granularityinteger

Metering granularity code.

cutoff_methodinteger

Rounding (cut-off) method code.

cutoff_digitsinteger

Number of digits kept when cutting off.

max_metric_typeinteger

Cap metering method code; 0 means no cap.

max_metric_ratestring

Cap rate.

min_metric_typeinteger

Floor metering method code; 0 means no floor.

min_metric_ratestring

Floor rate.

metric_type_bill_amount_item_idsarray<string>

Secondary billing item IDs.

special_feesarray<object>

Custom fee list; pass an empty array when none.

ratesarray<object>required

Rate bands, at least one; missing or invalid bands return Abnormal rate range configuration.

Child attributes
gtstring

Lower bound of the band (exclusive).

ltestring

Upper bound of the band (inclusive); 0 means no upper bound.

fee_ratestring

Fee rate for the band.

minstring

Minimum fee for the band.

market_rule_idsarray<string>

Market rule IDs.

audit_frontend_resourceobject

Provides audit context for this operation.

Responses

HTTP 200The request was processed successfully. The response data does not contain additional business fields.
Standard response envelopecodemessagedata
dataobjectdata structure
idstring
HTTP 400Bad request. Check the business error code in code and the error details in message.
Standard response envelopecodemessagedata
dataobjectdata structure

No nested fields

HTTP 401The user is not authenticated, or the login session has expired.
Standard response envelopecodemessagedata
dataobjectdata structure

No nested fields

HTTP 403The current account is not authorized to use this feature. Grant the required permission to the account in User Permission.
Standard response envelopecodemessagedata
dataobjectdata structure

No nested fields

HTTP 408The request timed out. Check the business error code in code and the error details in message.
Standard response envelopecodemessagedata
dataobjectdata structure

No nested fields

Whale Docs