Skip to main content
POST
/
organizations
/
{orgId}
/
counteradjustments
Create CounterAdjustment
curl --request POST \
  --url https://api.m3ter.com/organizations/{orgId}/counteradjustments \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "counterId": "<string>",
  "accountId": "<string>",
  "date": "2022-01-04",
  "value": 1,
  "version": 123,
  "purchaseOrderNumber": "<string>"
}
'
{
  "id": "<string>",
  "version": 123,
  "dtCreated": "2023-11-07T05:31:56Z",
  "dtLastModified": "2023-11-07T05:31:56Z",
  "createdBy": "<string>",
  "lastModifiedBy": "<string>",
  "counterId": "<string>",
  "accountId": "<string>",
  "date": "2023-12-25",
  "value": 123,
  "purchaseOrderNumber": "<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.

Body

application/json
counterId
string
required

The ID of the Counter used for the CounterAdjustment on the Account.

Minimum string length: 1
accountId
string
required

The Account ID the CounterAdjustment is created for.

Minimum string length: 1
date
string
default:2022-01-04
required

The date the CounterAdjustment is created for the Account (in ISO-8601 date format).

Note: CounterAdjustments on Accounts are supported down to a specific day of granularity - you cannot create more than one CounterAdjustment for any given day using the same Counter and you'll receive an error if you try to do this.

Example:

"2022-01-04"

value
integer<int32>
required

Integer Value of the Counter used for the CounterAdjustment.

Note: Use the new absolute value for the Counter for the selected date - if it was 15 and has increased to 20, enter 20; if it was 15 and has decreased to 10, enter 10. Do not enter the plus or minus value relative to the previous Counter value on the Account.

Required range: x >= 0
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.
purchaseOrderNumber
string

Purchase Order Number for the Counter Adjustment. (Optional)

Maximum string length: 100

Response

Returns the created CounterAdjustment

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.
dtCreated
string<date-time>

The DateTime when this item was created (in ISO-8601 format).

dtLastModified
string<date-time>

The DateTime when this item was last modified (in ISO-8601 format).

createdBy
string

The ID of the user who created this item.

lastModifiedBy
string

The ID of the user who last modified this item.

counterId
string

The ID of the Counter that was used to make the CounterAdjustment on the Account.

accountId
string

The Account ID the CounterAdjustment was created for.

date
string<date>

The date the CounterAdjustment was created for the Account (in ISO-8601 date format).

value
integer<int32>

Integer Value of the Counter that was used to make the CounterAdjustment.

purchaseOrderNumber
string

Purchase Order Number for the Counter Adjustment. (Optional)