Skip to main content
PUT
/
organizations
/
{orgId}
/
plans
/
{id}
Update Plan
curl --request PUT \
  --url https://api.m3ter.com/organizations/{orgId}/plans/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "planTemplateId": "<string>",
  "name": "<string>",
  "code": "<string>",
  "version": 123,
  "customFields": "<unknown>",
  "standingCharge": 1,
  "standingChargeDescription": "<string>",
  "ordinal": 1,
  "bespoke": true,
  "minimumSpend": 1,
  "minimumSpendDescription": "<string>",
  "standingChargeBillInAdvance": true,
  "minimumSpendBillInAdvance": true,
  "minimumSpendAccountingProductId": "<string>",
  "standingChargeAccountingProductId": "<string>",
  "accountId": "<string>"
}
'
{
  "id": "<string>",
  "version": 123,
  "customFields": {},
  "planTemplateId": "<string>",
  "productId": "<string>",
  "name": "<string>",
  "code": "<string>",
  "standingCharge": 123,
  "standingChargeDescription": "<string>",
  "ordinal": 123,
  "bespoke": true,
  "minimumSpend": 123,
  "minimumSpendDescription": "<string>",
  "standingChargeBillInAdvance": true,
  "minimumSpendBillInAdvance": true,
  "minimumSpendAccountingProductId": "<string>",
  "standingChargeAccountingProductId": "<string>",
  "accountId": "<string>",
  "dtCreated": "2023-11-07T05:31:56Z",
  "dtLastModified": "2023-11-07T05:31:56Z",
  "createdBy": "<string>",
  "lastModifiedBy": "<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.

id
string
required

The UUID of the Plan to update.

Body

application/json
planTemplateId
string
required

UUID of the PlanTemplate the Plan belongs to.

Required string length: 36
name
string
required

Descriptive name for the Plan.

Required string length: 1 - 200
code
string
required

Unique short code reference for the Plan.

Required string length: 1 - 80
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
standingCharge
number<double>

The standing charge applied to bills for end customers. This is prorated.

(Optional). Overrides PlanTemplate value.

Required range: x >= 0
standingChargeDescription
string

Standing charge description (displayed on the bill line item).

Maximum string length: 200
ordinal
integer<int64>

Assigns a rank or position to the Plan in your order of pricing plans - lower numbers represent more basic pricing plans; higher numbers represent more premium pricing plans.

(Optional). Overrides PlanTemplate value.

NOTE: DEPRECATED - do not use.

Required range: x >= 0
bespoke
boolean

TRUE/FALSE flag indicating whether the plan is a custom/bespoke Plan for a particular Account:

  • When creating a Plan, use the accountId request parameter to specify the Account for which the Plan will be custom/bespoke.
  • A custom/bespoke Plan can only be attached to the specified Account.
minimumSpend
number<double>

The product minimum spend amount per billing cycle for end customer Accounts on a priced Plan.

(Optional). Overrides PlanTemplate value.

Required range: x >= 0
minimumSpendDescription
string

Minimum spend description (displayed on the bill line item).

Maximum string length: 200
standingChargeBillInAdvance
boolean

When TRUE, standing charge is billed at the start of each billing period.

When FALSE, standing charge is billed at the end of each billing period.

(Optional). Overrides the setting at PlanTemplate level for standing charge billing in arrears/in advance.

minimumSpendBillInAdvance
boolean

When TRUE, minimum spend is billed at the start of each billing period.

When FALSE, minimum spend is billed at the end of each billing period.

(Optional). Overrides the setting at PlanTemplate level for minimum spend billing in arrears/in advance.

minimumSpendAccountingProductId
string

Optional Product ID this Plan's minimum spend should be attributed to for accounting purposes.

Required string length: 36
standingChargeAccountingProductId
string

Optional Product ID this Plan's standing charge should be attributed to for accounting purposes.

Required string length: 36
accountId
string

(Optional). Used to specify an Account for which the Plan will be a custom/bespoke Plan:

  • Use when first creating a Plan.
  • A custom/bespoke Plan can only be attached to the specified Account.
  • Once created, a custom/bespoke Plan cannot be updated to be made a custom/bespoke Plan for a different Account.
Required string length: 36

Response

Returns the updated Plan

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

planTemplateId
string

UUID of the PlanTemplate the Plan belongs to.

productId
string

UUID of the Product the Plan belongs to.

name
string

Descriptive name for the Plan.

code
string

Unique short code reference for the Plan.

standingCharge
number<double>

The standing charge applied to bills for end customers. This is prorated.

(Optional). Overrides PlanTemplate value.

standingChargeDescription
string

Standing charge description (displayed on the bill line item).

ordinal
integer<int64>

Assigns a rank or position to the Plan in your order of pricing plans - lower numbers represent more basic pricing plans; higher numbers represent more premium pricing plans.

(Optional). Overrides PlanTemplate value.

NOTE: DEPRECATED - no longer used.

bespoke
boolean

TRUE/FALSE flag indicating whether the Plan is custom/bespoke for a particular Account.

minimumSpend
number<double>

The product minimum spend amount per billing cycle for end customer Accounts on a priced Plan.

(Optional). Overrides PlanTemplate value.

minimumSpendDescription
string

Minimum spend description (displayed on the bill line item).

standingChargeBillInAdvance
boolean

When TRUE, standing charge is billed at the start of each billing period.

When FALSE, standing charge is billed at the end of each billing period.

(Optional). Overrides the setting at PlanTemplate level for standing charge billing in arrears/in advance.

minimumSpendBillInAdvance
boolean

When TRUE, minimum spend is billed at the start of each billing period.

When FALSE, minimum spend is billed at the end of each billing period.

(Optional). Overrides the setting at PlanTemplate level for minimum spend billing in arrears/in advance.

minimumSpendAccountingProductId
string

Optional Product ID this Plan's minimum spend should be attributed to for accounting purposes.

standingChargeAccountingProductId
string

Optional Product ID this Plan's standing charge should be attributed to for accounting purposes.

accountId
string

(Optional). The Account ID for which this Plan was created as custom/bespoke. A custom/bespoke Plan can only be attached to the specified Account.

dtCreated
string<date-time>

The DateTime (in ISO-8601 format) when the Plan was created.

dtLastModified
string<date-time>

The DateTime (in ISO-8601 format) when the Plan was last modified.

createdBy
string

The id of the user who created this plan.

lastModifiedBy
string

The id of the user who last modified this Plan.