Skip to main content
PUT
/
organizations
/
{orgId}
/
bills
/
{billId}
/
debitlineitems
/
{id}
Update Debit Line Item
curl --request PUT \
  --url https://api.m3ter.com/organizations/{orgId}/bills/{billId}/debitlineitems/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "productId": "<string>",
  "accountingProductId": "<string>",
  "description": "<string>",
  "amount": 1,
  "referencedBillId": "<string>",
  "referencedLineItemId": "<string>",
  "servicePeriodStartDate": "2023-11-07T05:31:56Z",
  "servicePeriodEndDate": "2023-11-07T05:31:56Z",
  "version": 123,
  "reasonId": "<string>",
  "lineItemType": "STANDING_CHARGE",
  "amountToApplyOnBill": 123,
  "debitReasonId": "<string>"
}
'
{
  "id": "<string>",
  "version": 123,
  "lineItemType": "STANDING_CHARGE",
  "productId": "<string>",
  "description": "<string>",
  "servicePeriodStartDate": "2023-11-07T05:31:56Z",
  "servicePeriodEndDate": "2023-11-07T05:31:56Z",
  "referencedBillId": "<string>",
  "referencedLineItemId": "<string>",
  "dtCreated": "2023-11-07T05:31:56Z",
  "dtLastModified": "2023-11-07T05:31:56Z",
  "createdBy": "<string>",
  "lastModifiedBy": "<string>",
  "amount": 123,
  "debitReasonId": "<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. The Organization represents your company as a direct customer of the m3ter service.

billId
string
required

UUID of the bill.

id
string
required

The UUID of the debit line item to update.

Body

application/json
productId
string
required

The UUID of the Product.

accountingProductId
string
required
description
string
required

The description for the line item.

Minimum string length: 1
amount
number
required

The amount for the line item.

Required range: x > 0
referencedBillId
string
required

The UUID of the bill for the line item.

referencedLineItemId
string
required

The UUID of the line item.

servicePeriodStartDate
string<date-time>
required

The service period start date in ISO-8601 format. (inclusive of the starting date).

servicePeriodEndDate
string<date-time>
required

The service period end date in ISO-8601 format.(exclusive of the ending date).

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

The UUID of the line item reason.

lineItemType
enum<string>
Available options:
STANDING_CHARGE,
USAGE,
COUNTER_RUNNING_TOTAL_CHARGE,
COUNTER_ADJUSTMENT_DEBIT,
COUNTER_ADJUSTMENT_CREDIT,
USAGE_CREDIT,
MINIMUM_SPEND,
MINIMUM_SPEND_REFUND,
CREDIT_DEDUCTION,
MANUAL_ADJUSTMENT,
CREDIT_MEMO,
DEBIT_MEMO,
COMMITMENT_CONSUMED,
COMMITMENT_FEE,
OVERAGE_SURCHARGE,
OVERAGE_USAGE,
BALANCE_CONSUMED,
BALANCE_FEE,
AD_HOC
amountToApplyOnBill
number
debitReasonId
string

The ID of the Debit Reason given for this debit line item.

Response

Returns the updated debit line item

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.
lineItemType
enum<string>
Available options:
STANDING_CHARGE,
USAGE,
COUNTER_RUNNING_TOTAL_CHARGE,
COUNTER_ADJUSTMENT_DEBIT,
COUNTER_ADJUSTMENT_CREDIT,
USAGE_CREDIT,
MINIMUM_SPEND,
MINIMUM_SPEND_REFUND,
CREDIT_DEDUCTION,
MANUAL_ADJUSTMENT,
CREDIT_MEMO,
DEBIT_MEMO,
COMMITMENT_CONSUMED,
COMMITMENT_FEE,
OVERAGE_SURCHARGE,
OVERAGE_USAGE,
BALANCE_CONSUMED,
BALANCE_FEE,
AD_HOC
productId
string
description
string
servicePeriodStartDate
string<date-time>
servicePeriodEndDate
string<date-time>
referencedBillId
string
referencedLineItemId
string
dtCreated
string<date-time>

The DateTime when the line item was created.

dtLastModified
string<date-time>

The DateTime when the line item was last modified.

createdBy
string

The ID of the user who created this line item.

lastModifiedBy
string

The ID of the user who last modified this line item.

amount
number
debitReasonId
string

The UUID of the debit reason for this debit line item.