Skip to main content

batch report usageRecordGroups

POST 

/org/:orgId/batchCreateUsageRecordGroups

Batch report new usage record groups.

Request

Path Parameters

    orgId stringrequired

    Organization ID

Body

array

required

Array of new usage record groups to report

  • Array [

  • billableRecords

    object[]

    for usage metering API v2, don't use it together with the records v1.

  • Array [

  • key string

    Key is the unique identifier of a billable metric.

    properties

    object

    Properties is the filters of a billable metric. It should be equal to the filters of the billable metric.

    property name* any

    Properties is the filters of a billable metric. It should be equal to the filters of the billable metric.

    quantity number

    The quantity (or numeric value) of a billable metric.

  • ]

  • entitlementID stringrequired

    metaInfo

    object

    SkipValidation boolean

    If it is true, the validation of the usage record group is skipped.

    billableRecords

    object[]

    for usage metering API v2

  • Array [

  • key string

    Key is the unique identifier of a billable metric.

    properties

    object

    Properties is the filters of a billable metric. It should be equal to the filters of the billable metric.

    property name* any

    Properties is the filters of a billable metric. It should be equal to the filters of the billable metric.

    quantity number

    The quantity (or numeric value) of a billable metric.

  • ]

  • lagoAmount number

    The lago amount (in dollars) of the customer. This field keeps the largest of the monthly amount. So it can only be updated when the invoice month increases.

    lagoSubscriptionID string

    The lago subscription ID of the customer.

    lagoUsageStartTime date-time

    The lago usage start time of the customer usage.

    metronomeDailyCostAmount number

    The metronome daily cost amount (in dollars) of the customer.

    metronomeInvoiceID string

    The metronome invoice ID of the customer.

    metronomeMonthlyInvoiceAmount number

    The metronome monthly invoice amount (in dollars) of the customer. This field keeps the largest amount of the invoice month. So it can only be updated when the invoice month increases.

    metronomeMonthlyInvoiceAmountAdjusted number

    The metronome monthly invoice amount (in dollars) of the customer, which is adjusted by the seller. This field is populated only when the invoice amount is decreased by the seller via credit granting.

    originRecords

    object

    The original records reported by the customer before convertion. If no dimension mapping is applied, this field is the same as the records field.

    property name* number
    source UsageRecordGroupSource (string)

    Possible values: [``, API, INTERNAL, METRONOME, ORB, LAGO]

    The source of the usage record group. Can be from Suger API or other third party services, such as Metronome.

    timestamp date-time

    The timestamp (UTC)) of when the usage records were generated. Optional, if not provided, the current report timestamp will be used.

    records

    object

    required

    for usage metering API v1, don't use it together with the billableRecords v2.

    property name* number
    timestamp date-time

    The timestamp of when the usage records were generated. Optional, if not provided, the current report timestamp will be used. This is not the timestamp of when the usage records were reported to Suger.

  • ]

Responses

OK

Schema

  • Array [

  • buyerID string
    creationTime date-time
    entitlementID string
    id string
    lastUpdateTime date-time

    metaInfo

    object

    SkipValidation boolean

    If it is true, the validation of the usage record group is skipped.

    billableRecords

    object[]

    for usage metering API v2

  • Array [

  • key string

    Key is the unique identifier of a billable metric.

    properties

    object

    Properties is the filters of a billable metric. It should be equal to the filters of the billable metric.

    property name* any

    Properties is the filters of a billable metric. It should be equal to the filters of the billable metric.

    quantity number

    The quantity (or numeric value) of a billable metric.

  • ]

  • lagoAmount number

    The lago amount (in dollars) of the customer. This field keeps the largest of the monthly amount. So it can only be updated when the invoice month increases.

    lagoSubscriptionID string

    The lago subscription ID of the customer.

    lagoUsageStartTime date-time

    The lago usage start time of the customer usage.

    metronomeDailyCostAmount number

    The metronome daily cost amount (in dollars) of the customer.

    metronomeInvoiceID string

    The metronome invoice ID of the customer.

    metronomeMonthlyInvoiceAmount number

    The metronome monthly invoice amount (in dollars) of the customer. This field keeps the largest amount of the invoice month. So it can only be updated when the invoice month increases.

    metronomeMonthlyInvoiceAmountAdjusted number

    The metronome monthly invoice amount (in dollars) of the customer, which is adjusted by the seller. This field is populated only when the invoice amount is decreased by the seller via credit granting.

    originRecords

    object

    The original records reported by the customer before convertion. If no dimension mapping is applied, this field is the same as the records field.

    property name* number
    source UsageRecordGroupSource (string)

    Possible values: [``, API, INTERNAL, METRONOME, ORB, LAGO]

    timestamp date-time

    The timestamp (UTC)) of when the usage records were generated. Optional, if not provided, the current report timestamp will be used.

    organizationID string
    partner string

    Possible values: [AWS, AZURE, GCP]

    records

    object

    property name* number
    serialID integer
    status string
    usageRecordReportID string
  • ]

Loading...