Skip to main content
POST
/
organizations
/
{orgId}
/
charges
Create Charge
curl --request POST \
  --url https://api.m3ter.com/organizations/{orgId}/charges \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "code": "<string>",
  "accountId": "<string>",
  "currency": "<string>",
  "entityType": "AD_HOC",
  "lineItemType": "BALANCE_FEE",
  "servicePeriodStartDate": "2023-11-07T05:31:56Z",
  "servicePeriodEndDate": "2023-11-07T05:31:56Z",
  "version": 123,
  "billDate": "2022-01-04",
  "amount": 123,
  "units": 123,
  "unitPrice": 123,
  "description": "<string>",
  "entityId": "<string>",
  "accountingProductId": "<string>",
  "notes": "<string>",
  "contractId": "<string>"
}
'
{
  "id": "<string>",
  "version": 123,
  "name": "<string>",
  "code": "<string>",
  "accountId": "<string>",
  "billDate": "2023-12-25",
  "amount": 123,
  "units": 123,
  "unitPrice": 123,
  "currency": "<string>",
  "description": "<string>",
  "entityType": "AD_HOC",
  "entityId": "<string>",
  "billId": "<string>",
  "accountingProductId": "<string>",
  "servicePeriodStartDate": "2023-11-07T05:31:56Z",
  "servicePeriodEndDate": "2023-11-07T05:31:56Z",
  "notes": "<string>",
  "contractId": "<string>",
  "lineItemType": "BALANCE_FEE",
  "dtCreated": "2023-11-07T05:31:56Z",
  "dtLastModified": "2023-11-07T05:31:56Z",
  "createdBy": "<string>",
  "lastModifiedBy": "<string>",
  "scheduleId": "<string>"
}

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

Body

application/json

Request containing a Charge entity

name
string
required

Name of the Charge. Added to the Bill line item description for this Charge.

Required string length: 1 - 200
code
string
required

Unique short code for the Charge.

Required string length: 1 - 80
accountId
string
required

The ID of the Account the Charge is being created for.

Required string length: 36
currency
string
required

Charge currency.

Minimum string length: 1
entityType
enum<string>
required

The entity type the Charge is created for.

NOTE: If entityType is BALANCE, you must provide the entityId of the Balance the Charge is for.

Available options:
AD_HOC,
BALANCE
lineItemType
enum<string>
required

The line item type used for Charge billing.

Available options:
BALANCE_FEE,
AD_HOC
servicePeriodStartDate
string<date-time>
required

The service period start date (in ISO-8601 format) for the Charge.

servicePeriodEndDate
string<date-time>
required

The service period end date (in ISO-8601 format)for the Charge.

NOTE: End date is exclusive.

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.
billDate
string

The date when the Charge will be added to a Bill.

Example:

"2022-01-04"

amount
number

Amount of the Charge. If amount is provided, then units and unitPrice must be omitted.

units
number

Number of units of the Charge. If amount is omitted, then provide together with unitPrice. When amount is provided, units must be omitted.

unitPrice
number

Unit price. If amount is omitted, then provide together with units. When amount is provided, unitPrice must be omitted.

description
string

The description added to the Bill line item for the Charge.

entityId
string

The ID of the Charge linked entity. For example, the ID of an Account Balance if a Balance Charge.

NOTE: If entityType is BALANCE, you must provide the entityId of the Balance the Charge is for.

accountingProductId
string

The Accounting Product ID assigned to the Charge.

Required string length: 36
notes
string

Used to enter information about the Charge for accounting purposes, such as the reason it was created. This information will not be added to a Bill line item for the Charge.

contractId
string

The ID of a Contract on the Account that the Charge will be added to.

Response

Returns the created Charge

Response containing a Charge entity

id
string
required

The UUID of the entity.

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.
name
string

Name of the Charge. Added to the Bill line item description for Charge.

code
string

The unique short code of the Charge.

accountId
string

The ID of the Account the Charge was created for.

billDate
string<date>

The date when the Charge will be added to a Bill.

amount
number

The Charge amount. If amount has been defined, then units and unitPrice cannot be used.

units
number

Number of units of the Charge. Provided together with unitPrice. If units and unitPrice are provided, amount cannot be used.

unitPrice
number

Unit Price for the Charge. Provided together with units:

  • Null if the Charge was created with amount only.
  • If units and unitPrice are provided, amount cannot be used.
currency
string

Charge currency.

description
string

The description added to the Bill line item for the Charge.

entityType
enum<string>

The entity type the Charge has been created for.

Available options:
AD_HOC,
BALANCE
entityId
string

The ID of the Charge linked entity. For example, the ID of an Account Balance if a Balance Charge.

billId
string

The ID of the Bill created for this Charge.

accountingProductId
string

The Accounting Product ID assigned to the Charge.

servicePeriodStartDate
string<date-time>

The service period start date (in ISO-8601 format) for the Charge .

servicePeriodEndDate
string<date-time>

The service period end date (in ISO-8601 format) for the Charge.

NOTE: End date is exclusive.

notes
string

Information about the Charge for accounting purposes, such as the reason it was created. This information will not be added to the created Bill line item for the Charge.

contractId
string

The ID of a Contract on the Account that the Charge has been added to.

lineItemType
enum<string>

The line item type used for billing a Charge.

Available options:
BALANCE_FEE,
AD_HOC
dtCreated
string<date-time>

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

dtLastModified
string<date-time>

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

createdBy
string

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

lastModifiedBy
string

The unique identifier (UUID) of the user who last modified the Charge.

scheduleId
string

The ID of the Balance Charge Schedule that created the Charge.