Skip to main content
GET
/
organizations
/
{orgId}
/
contracts
/
{id}
Retrieve Contract
curl --request GET \
  --url https://api.m3ter.com/organizations/{orgId}/contracts/{id} \
  --header 'Authorization: Bearer <token>'
{
  "id": "<string>",
  "version": 123,
  "customFields": {},
  "accountId": "<string>",
  "name": "<string>",
  "code": "<string>",
  "description": "<string>",
  "purchaseOrderNumber": "<string>",
  "applyContractPeriodLimits": true,
  "usageFilters": [
    {
      "dimensionCode": "<string>",
      "value": "<string>",
      "mode": "INCLUDE"
    }
  ],
  "billGroupingKeyId": "<string>",
  "startDate": "2023-12-25",
  "endDate": "2023-12-25",
  "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

The unique identifier (UUID) of your Organization. The Organization represents your company as a direct customer of our service.

id
string
required

The unique identifier (UUID) of the Contract to retrieve.

Response

Returns the Contract

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.

accountId
string

The unique identifier (UUID) of the Account associated with this Contract.

name
string

The name of the Contract.

code
string

The short code of the Contract.

description
string

The description of the Contract, which provides context and information.

purchaseOrderNumber
string

The Purchase Order Number associated with the Contract.

applyContractPeriodLimits
boolean

For Contract billing, a boolean setting for restricting the charges billed to the period defined for the Contract:

  • TRUE - Contract billing for the Account will be restricted to charge amounts that fall within the defined Contract period.
  • FALSE - The period for amounts billed under the Contract will be determined by the Account Plan attached to the Account and linked to the Contract.(Default)
usageFilters
object[]

Used to control Contract billing and charge at billing only for usage where Product Meter dimensions equal specific defined values:

  • Usage filters are defined to either include or exclude charges for usage associated with specific Meter dimensions.
  • The Meter dimensions must be present in the data field schema of the Meter used to submit usage data measurements.
billGroupingKeyId
string

The ID of the Bill Grouping Key assigned to the Contract.

startDate
string<date>

The start date for the Contract (in ISO-8601 format). This date is inclusive, meaning the Contract is active from this date onward.

endDate
string<date>

The exclusive end date of the Contract (in ISO-8601 format). This means the Contract is active until midnight on the day before this date.

dtCreated
string<date-time>

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

dtLastModified
string<date-time>

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

createdBy
string

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

lastModifiedBy
string

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