Skip to main content
POST
/
organizations
/
{orgId}
/
products
Create Product
curl --request POST \
  --url https://api.m3ter.com/organizations/{orgId}/products \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "code": "<string>",
  "version": 123,
  "customFields": "<unknown>"
}
'
{
  "id": "<string>",
  "version": 123,
  "customFields": {},
  "name": "<string>",
  "code": "<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

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

Body

application/json
name
string
required

Descriptive name for the Product providing context and information.

Required string length: 1 - 200
code
string
required

A unique short code to identify the Product. It should not contain control chracters or spaces.

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

Response

Returns the created Product

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.

name
string

Descriptive name for the Product providing context and information.

code
string

A unique short code to identify the Product. It should not contain control chracters or spaces.

dtCreated
string<date-time>

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

dtLastModified
string<date-time>

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

createdBy
string

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

lastModifiedBy
string

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