Skip to main content
PUT
/
organizations
/
{orgId}
/
balances
/
{balanceId}
/
balancechargeschedules
/
{id}
Update BalanceChargeSchedule
curl --request PUT \
  --url https://api.m3ter.com/organizations/{orgId}/balances/{balanceId}/balancechargeschedules/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "code": "<string>",
  "currency": "<string>",
  "servicePeriodStartDate": "2023-11-07T05:31:56Z",
  "servicePeriodEndDate": "2023-11-07T05:31:56Z",
  "billFrequency": "DAILY",
  "billFrequencyInterval": 183,
  "billInAdvance": true,
  "chargeDescription": "<string>",
  "version": 123,
  "customFields": "<unknown>",
  "amount": 1,
  "units": 123,
  "unitPrice": 123,
  "billEpoch": "2023-12-25"
}
'
{
  "id": "<string>",
  "chargeDescription": "<string>",
  "version": 123,
  "customFields": {},
  "balanceId": "<string>",
  "name": "<string>",
  "code": "<string>",
  "amount": 123,
  "units": 123,
  "unitPrice": 123,
  "currency": "<string>",
  "servicePeriodStartDate": "2023-11-07T05:31:56Z",
  "servicePeriodEndDate": "2023-11-07T05:31:56Z",
  "billEpoch": "2023-12-25",
  "billFrequency": "DAILY",
  "billFrequencyInterval": 123,
  "billInAdvance": true,
  "dtCreated": "2023-11-07T05:31:56Z",
  "dtLastModified": "2023-11-07T05:31:56Z",
  "createdBy": "<string>",
  "lastModifiedBy": "<string>",
  "nextRun": "2023-11-07T05:31:56Z",
  "previousRun": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

m3ter supports machine to machine authentication using the clientCredentials OAuth2 flow.

The authorizationCode flow controls access for human users via the m3ter Console application.

Path Parameters

orgId
string
required

UUID of the organization

balanceId
string
required

UUID of the balance

id
string
required

The UUID of the BalanceChargeSchedule to update.

Body

application/json
name
string
required

The name of the Balance Charge Schedule.

Required string length: 1 - 200
code
string
required

Unique short code for the Balance Charge Schedule.

Required string length: 1 - 80
currency
string
required

The currency of the Charges created by the Balance Charge Schedule.

servicePeriodStartDate
string<date-time>
required

The service period start date (in ISO-8601 format) of the Balance Charge Schedule.

servicePeriodEndDate
string<date-time>
required

The service period end date (in ISO-8601 format) of the Balance Charge Schedule.

billFrequency
enum<string>
required

Specify the daily, weekly, monthly, or yearly intervals for when Bills for Charges created by the Schedule against the Balance are generated for the Account.

Available options:
DAILY,
WEEKLY,
MONTHLY,
ANNUALLY
billFrequencyInterval
integer<int32>
required

How often Bills are issued. For example, if billFrequency is MONTHLY and billFrequencyInterval is 3, Bills are issued every three months.

Required range: 1 <= x <= 365
billInAdvance
boolean
required

Used to specify how Charges created by the Balance Charge Schedule are billed - either in arrears or in advance:

  • Use false for billing in arrears.
  • Use true for billing in advance.
chargeDescription
string
required

The description for Charges created by the Balance Charge Schedule. Used on Bills for Charge line items.

Minimum string length: 1
version
integer<int64>

The version number of the entity:

  • Create entity: Not valid for initial insertion of new entity - do not use for Create. On initial Create, version is set at 1 and listed in the response.
  • Update Entity: On Update, version is required and must match the existing version because a check is performed to ensure sequential versioning is preserved. Version is incremented by 1 and listed in the response.
customFields
any
amount
number

The amount of each Charge created by the Balance Charge Schedule. Must be omitted if units and unitPrice are provided.

Required range: x >= 0
units
number

Number of units defined for the Charges created by the Schedule. Required when unitPrice is provided. Must be omitted when amount is used.

unitPrice
number

Unit price for Charge. Must be provided when units is used. Must be omitted when amount is used.

billEpoch
string<date>

Specify a billing cycle date (in ISO-8601 format) for when the first Bill is created for Balance Charges created by the Schedule, and also acts as a reference for when in the Schedule period subsequent Bills are created for the defined billFrequency. If left blank, then the relevant Epoch date from your Organization's configuration will be used as the billing cycle date instead.

Response

Return the updated BalanceChargeSchedule

id
string
required

The UUID of the entity.

chargeDescription
string
required

The description for Charges created by the Balance Charge Schedule. Used on Bills for Charge line items.

Minimum string length: 1
version
integer<int64>

The version number:

  • Create: On initial Create to insert a new entity, the version is set at 1 in the response.
  • Update: On successful Update, the version is incremented by 1 in the response.
customFields
object

User defined fields enabling you to attach custom data. The value for a custom field can be either a string or a number.

If customFields can also be defined for this entity at the Organizational level,customField values defined at individual level override values of customFields with the same name defined at Organization level.

See Working with Custom Fields in the m3ter documentation for more information.

balanceId
string

The unique identifier (UUID) for the Balance this Balance Charge Schedule was created for.

name
string

The name of the Balance Charge Schedule.

code
string

Unique short code for the Balance Charge Schedule.

amount
number

The amount of each Charge created by the Balance Charge Schedule.

units
number

Number of units. If the Charge was created with amount only, then will be null.

unitPrice
number

Unit price. If the Charge was created with amount only, then will be null.

currency
string

The currency of the Charges created by the Balance Charge Schedule.

servicePeriodStartDate
string<date-time>

The service period start date (in ISO-8601 format) of the Balance Charge Schedule.

servicePeriodEndDate
string<date-time>

The service period end date (in ISO-8601 format) of the Balance Charge Schedule.

billEpoch
string<date>

Specifies a billing cycle date (in ISO-8601 format) for when the first Bill is generated for Balance Charges created by the Schedule, and also acts as a reference for when in the Schedule period subsequent Bills are created for the defined billFrequency. If blank, then the relevant Epoch date from your Organization's configuration is used.

billFrequency
enum<string>

Specifies when Bills for Charges created by the Schedule are generated for the Account - at either daily, weekly, monthly, or yearly intervals.

Available options:
DAILY,
WEEKLY,
MONTHLY,
ANNUALLY
billFrequencyInterval
integer<int32>

How often Bills are issued. For example, if billFrequency is MONTHLY and billFrequencyInterval is 3, Bills are issued every three months.

billInAdvance
boolean

Specifies how Charges created by the Balance Charge Schedule are billed - either in arrears or in advance:

  • If false then billing is in arrears.
  • If true then billing is in advance.
dtCreated
string<date-time>

The date and time (in ISO-8601 format) when the Balance Charge Schedule was created.

dtLastModified
string<date-time>

The date and time (in ISO-8601 format) when the Balance Charge Schedule was last modified.

createdBy
string

The unique identifier (UUID) of the user who created the Balance Charge Schedule.

lastModifiedBy
string

The unique identifier (UUID) for the user who last modified the Balance Charge Schedule.

nextRun
string<date-time>

The date and time (in ISO-8601 format) when the next Charge will be created by the Balance Charge Schedule.

previousRun
string<date-time>

The date and time (in ISO-8601 format) when the previous Charge was generated by the Balance Charge Schedule.