MonetizeNow Usage API

APIs to record, update and query usage events

Operations 6

GET /usage/consumption Get usage consumption #
GET /usage/consumption/perDay/v2 Get usage consumption per day #
GET /usage/events Get usage events #
POST /usage/events Record usage events #
PUT /usage/events/{id} Update units consumed and/or the rated price #
PUT /usage/events/{id}/void Void a usage event #

Documentation

Specifications

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/monetizenow-usage-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

monetizenow-usage-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: OpenAPI definition Usage API
  version: v0
  description: '# About MonetizeNow


    MonetizeNow provides a Quoting, Billing, and Usage platform built for the B2B SaaS enterprise.'
servers:
- url: https://api.monetizeplatform.com
tags:
- name: Usage
  description: APIs to record, update and query usage events
paths:
  /usage/consumption:
    get:
      tags:
      - Usage
      summary: Get usage consumption
      description: Returns usage consumption for a given subscription identifier, usage type, aggregation model and time rangeFor reads after updates, we support eventual consistency semantics. For usage events with timestamps less than 45 days old, the eventual consistency is more or less immediate. For events with timestamps greater than 45 days old, the eventual consistency could take upto 6 hours.
      operationId: getUsageConsumption
      parameters:
      - name: subscriptionId
        in: query
        required: true
        schema:
          type: string
          description: Identifier for the Subscription
          example: subs_60fPx2PNuVson
      - name: usageTypeId
        in: query
        required: false
        schema:
          type: string
          description: Identifier for the usage type
          example: ustyp_sAufs4nKWzpvyosc
      - name: usageTypeIds
        in: query
        required: false
        schema:
          uniqueItems: true
          type: array
          description: Identifier(s) for the usage type
          example:
          - ustyp_sAufs4nKWzpvyosc
          items:
            type: string
            description: Identifier(s) for the usage type
            example: '["ustyp_sAufs4nKWzpvyosc"]'
      - name: startTime
        in: query
        required: true
        schema:
          type: string
          description: Start date time of the period for which the usage consumption is being requested
          format: date-time
          example: '2021-07-01T00:00:00Z'
      - name: endTime
        in: query
        required: false
        schema:
          type: string
          description: End date time of the period for which the usage consumption is being requested
          format: date-time
          example: '2021-07-31T00:00:00Z'
      - name: aggregationModel
        in: query
        required: false
        schema:
          type: string
          example: SUM
          default: SUM
          enum:
          - SUM
          - AVERAGE
      - name: x-api-key
        in: header
        description: x-api-key is an authentication or authorization token used in API requests to verify the identity and permissions of the client
        required: true
        schema:
          type: string
          example: TYQ1YzM3NWItZjQzMi00NDYwLTlmOWYtN2UwNzI5YzM2ZmV0
      responses:
        '200':
          description: View aggregated usage for a subscription and usage type for a given time period
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsageQueryResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseDto'
  /usage/consumption/perDay/v2:
    get:
      tags:
      - Usage
      summary: Get usage consumption per day
      description: Returns usage consumption grouped by date for a given subscription identifier, usage type, aggregation model and time rangeFor reads after updates, we support eventual consistency semantics. For usage events with timestamps less than 45 days old, the eventual consistency is more or less immediate. For events with timestamps greater than 45 days old, the eventual consistency could take upto 6 hours.
      operationId: getUsageConsumptionPerDay
      parameters:
      - name: subscriptionId
        in: query
        required: true
        schema:
          type: string
          description: Identifier for the Subscription
          example: subs_60fPx2PNuVson
      - name: usageTypeId
        in: query
        required: false
        schema:
          type: string
          description: Identifier for the usage type
          example: ustyp_sAufs4nKWzpvyosc
      - name: usageTypeIds
        in: query
        required: false
        schema:
          uniqueItems: true
          type: array
          description: Identifier(s) for the usage type
          example:
          - ustyp_sAufs4nKWzpvyosc
          items:
            type: string
            description: Identifier(s) for the usage type
            example: '["ustyp_sAufs4nKWzpvyosc"]'
      - name: startTime
        in: query
        required: true
        schema:
          type: string
          description: Start date time of the period for which the usage consumption is being requested
          format: date-time
          example: '2021-07-01T00:00:00Z'
      - name: endTime
        in: query
        required: true
        schema:
          type: string
          description: End date time of the period for which the usage consumption is being requested
          format: date-time
          example: '2021-07-31T00:00:00Z'
      - name: x-api-key
        in: header
        description: x-api-key is an authentication or authorization token used in API requests to verify the identity and permissions of the client
        required: true
        schema:
          type: string
          example: TYQ1YzM3NWItZjQzMi00NDYwLTlmOWYtN2UwNzI5YzM2ZmV0
      responses:
        '200':
          description: View aggregated usage grouped by date for a subscription and usage type for a given number of days in the past from today
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsageHistoryResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseDto'
  /usage/events:
    get:
      tags:
      - Usage
      summary: Get usage events
      description: Returns usage events for a given subscription identifier, usage type and time rangeFor reads after updates, we support eventual consistency semantics. For usage events with timestamps less than 45 days old, the eventual consistency is more or less immediate. For events with timestamps greater than 45 days old, the eventual consistency could take upto 6 hours.
      operationId: getEvents
      parameters:
      - name: subscriptionId
        in: query
        required: true
        schema:
          type: string
          description: Identifier for the Subscription
          example: subs_60fPx2PNuVson
      - name: usageTypeId
        in: query
        required: false
        schema:
          type: string
          description: Identifier for the usage type
          example: ustyp_sAufs4nKWzpvyosc
      - name: usageTypeIds
        in: query
        required: false
        schema:
          uniqueItems: true
          type: array
          description: Identifier(s) for the usage type
          example:
          - ustyp_sAufs4nKWzpvyosc
          items:
            type: string
            description: Identifier(s) for the usage type
            example: '["ustyp_sAufs4nKWzpvyosc"]'
      - name: startTime
        in: query
        required: true
        schema:
          type: string
          description: Start date time of the period for which the usage consumption is being requested
          format: date-time
          example: '2021-07-01T00:00:00Z'
      - name: endTime
        in: query
        required: true
        schema:
          type: string
          description: End date time of the period for which the usage consumption is being requested
          format: date-time
          example: '2021-07-31T00:00:00Z'
      - name: pageSize
        in: query
        required: false
        schema:
          maximum: 100
          minimum: 5
          type: integer
          description: Page size. Default value is 100
          format: int32
          example: 100
          default: 100
      - name: nextPageToken
        in: query
        required: false
        schema:
          type: string
          description: Pagination key containing the information about to record to search after
          example: eyJ0aW1lc3RhbXAiOjE2OTE0NTM4MT
      - name: x-api-key
        in: header
        description: x-api-key is an authentication or authorization token used in API requests to verify the identity and permissions of the client
        required: true
        schema:
          type: string
          example: TYQ1YzM3NWItZjQzMi00NDYwLTlmOWYtN2UwNzI5YzM2ZmV0
      responses:
        '200':
          description: Get usage events for a given subscription identifier
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EventListDto'
    post:
      tags:
      - Usage
      summary: Record usage events
      description: This is a batch API that can ingest upto 100 events per request. The API will return success or partial success or failed in the response. For reads after updates,we support eventual consistency semantics. For usage events with timestamps less than 45 days old, the eventual consistency is more or less immediate. For events with timestamps greater than 45 days old, the eventual consistency could take upto 6 hours.
      operationId: recordEvents
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/EventRequest'
        required: true
      responses:
        '200':
          description: Create usage records for subscriptions.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EventResponse'
        '400':
          description: Invalid payload.
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/EventResponse'
      parameters:
      - name: x-api-key
        in: header
        description: x-api-key is an authentication or authorization token used in API requests to verify the identity and permissions of the client
        required: true
        schema:
          type: string
          example: TYQ1YzM3NWItZjQzMi00NDYwLTlmOWYtN2UwNzI5YzM2ZmV0
  /usage/events/{id}:
    put:
      tags:
      - Usage
      summary: Update units consumed and/or the rated price
      description: Update units consumed and/or rated price for a given event identifier
      operationId: editEventUnits
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          description: Identifier for the usage event
          example: evt_60fPx2PNuVson
      - name: x-api-key
        in: header
        description: x-api-key is an authentication or authorization token used in API requests to verify the identity and permissions of the client
        required: true
        schema:
          type: string
          example: TYQ1YzM3NWItZjQzMi00NDYwLTlmOWYtN2UwNzI5YzM2ZmV0
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateUsageRequest'
        required: true
      responses:
        '200':
          description: Update units consumed for a given event identifier
          content:
            application/json: {}
        '404':
          description: Usage record could not be found for the given event identifier
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Unit'
  /usage/events/{id}/void:
    put:
      tags:
      - Usage
      summary: Void a usage event
      description: Voiding a usage event, essentially sets its unitsConsumed to 0 and the ratedPrice if it exists to 0.0
      operationId: voidEvent
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          description: Identifier for the event
          example: a46e0ff2-fc31-11ed-be56
      - name: x-api-key
        in: header
        description: x-api-key is an authentication or authorization token used in API requests to verify the identity and permissions of the client
        required: true
        schema:
          type: string
          example: TYQ1YzM3NWItZjQzMi00NDYwLTlmOWYtN2UwNzI5YzM2ZmV0
      responses:
        '200':
          description: Void a usage event
          content:
            application/json: {}
        '404':
          description: Usage record could not be found for the given event identifier
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Unit'
components:
  schemas:
    Pageable:
      type: object
      properties:
        nextPageToken:
          type: string
        pageSize:
          type: integer
          format: int32
    FailedEvent:
      type: object
      properties:
        event:
          $ref: '#/components/schemas/EventRequest'
        reason:
          type: string
          description: Reason for failure
      description: List of events that failed ingestion
    Event:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the event
        accountId:
          type: string
          description: MonetizeNow Identifier for the account associated with the event
          example: acct_oypCgzfyTCaWE
        subscriptionId:
          type: string
          description: MonetizeNow Identifier for the subscription associated with the event
          example: subs_lRVTvOpnpXgmv
        usageTypeId:
          type: string
          description: MonetizeNow Identifier for the usage type associated with the product on which usage is being reported
          example: usgt_aqtt2711mr1rz
        unitsConsumed:
          type: number
          description: Units consumed
          format: double
          example: 100
        ratedPrice:
          type: number
          description: Optional Rated Price for the event. The currency is determined by the Rate used in the subscription.
          format: double
          example: 1
        timestamp:
          type: string
          description: Timestamp of the event
          format: date-time
          example: '2022-01-01T00:00:00Z'
    Unit:
      type: object
    UsageHistoryResponse:
      type: object
      properties:
        date:
          type: string
          description: Date corresponding to the aggregated unitsConsumed
          format: date
          example: '2022-01-01'
        unitsConsumed:
          type: number
          description: Total unrated unitsConsumed for the given date
          format: double
          example: 100
    UsageQueryResponse:
      type: object
      properties:
        unitsConsumed:
          type: number
          description: Total Un-rated Units consumed for the requested period
          format: double
          example: 100
        ratedUnitsConsumed:
          type: number
          description: Total Rated Units consumed for the requested period
          format: double
          example: 20
        totalRatedPrice:
          type: number
          description: Total Rated Price for the requested period
          format: double
          example: 1
    EventRequest:
      type: object
      properties:
        id:
          maxLength: 200
          minLength: 1
          type: string
          description: User provided Unique identifier for the event
        accountId:
          maxLength: 50
          minLength: 1
          type: string
          description: MonetizeNow Identifier for the account associated with the event
          example: acct_oypCgzfyTCaWE
        subscriptionId:
          maxLength: 50
          minLength: 1
          type: string
          description: MonetizeNow Identifier for the subscription associated with the event
          example: subs_lRVTvOpnpXgmv
        usageTypeId:
          maxLength: 50
          minLength: 1
          type: string
          description: MonetizeNow Identifier for the usage type associated with the product on which usage is being reported
          example: usgt_aqtt2711mr1rz
        unitsConsumed:
          type: number
          description: Units consumed
          format: double
          example: 100
        timestamp:
          type: string
          description: Timestamp of the event
          format: date-time
          example: '2022-01-01T00:00:00Z'
        ratedPrice:
          type: number
          description: Optional Rated Price for the event. The currency is determined by the Rate used in the subscription.
          format: double
          example: 1
      description: Event that failed ingestion
    UpdateUsageRequest:
      type: object
      properties:
        unitsConsumed:
          type: number
          description: Updated units consumed for the event
          format: double
          example: 100
        ratedPrice:
          type: number
          description: Optionally update rated Price for the event
          format: double
          example: 1
    ResponseDto:
      type: object
      properties:
        status:
          type: string
          enum:
          - 100 CONTINUE
          - 101 SWITCHING_PROTOCOLS
          - 102 PROCESSING
          - 103 CHECKPOINT
          - 200 OK
          - 201 CREATED
          - 202 ACCEPTED
          - 203 NON_AUTHORITATIVE_INFORMATION
          - 204 NO_CONTENT
          - 205 RESET_CONTENT
          - 206 PARTIAL_CONTENT
          - 207 MULTI_STATUS
          - 208 ALREADY_REPORTED
          - 226 IM_USED
          - 300 MULTIPLE_CHOICES
          - 301 MOVED_PERMANENTLY
          - 302 FOUND
          - 302 MOVED_TEMPORARILY
          - 303 SEE_OTHER
          - 304 NOT_MODIFIED
          - 305 USE_PROXY
          - 307 TEMPORARY_REDIRECT
          - 308 PERMANENT_REDIRECT
          - 400 BAD_REQUEST
          - 401 UNAUTHORIZED
          - 402 PAYMENT_REQUIRED
          - 403 FORBIDDEN
          - 404 NOT_FOUND
          - 405 METHOD_NOT_ALLOWED
          - 406 NOT_ACCEPTABLE
          - 407 PROXY_AUTHENTICATION_REQUIRED
          - 408 REQUEST_TIMEOUT
          - 409 CONFLICT
          - 410 GONE
          - 411 LENGTH_REQUIRED
          - 412 PRECONDITION_FAILED
          - 413 PAYLOAD_TOO_LARGE
          - 413 REQUEST_ENTITY_TOO_LARGE
          - 414 URI_TOO_LONG
          - 414 REQUEST_URI_TOO_LONG
          - 415 UNSUPPORTED_MEDIA_TYPE
          - 416 REQUESTED_RANGE_NOT_SATISFIABLE
          - 417 EXPECTATION_FAILED
          - 418 I_AM_A_TEAPOT
          - 419 INSUFFICIENT_SPACE_ON_RESOURCE
          - 420 METHOD_FAILURE
          - 421 DESTINATION_LOCKED
          - 422 UNPROCESSABLE_ENTITY
          - 423 LOCKED
          - 424 FAILED_DEPENDENCY
          - 425 TOO_EARLY
          - 426 UPGRADE_REQUIRED
          - 428 PRECONDITION_REQUIRED
          - 429 TOO_MANY_REQUESTS
          - 431 REQUEST_HEADER_FIELDS_TOO_LARGE
          - 451 UNAVAILABLE_FOR_LEGAL_REASONS
          - 500 INTERNAL_SERVER_ERROR
          - 501 NOT_IMPLEMENTED
          - 502 BAD_GATEWAY
          - 503 SERVICE_UNAVAILABLE
          - 504 GATEWAY_TIMEOUT
          - 505 HTTP_VERSION_NOT_SUPPORTED
          - 506 VARIANT_ALSO_NEGOTIATES
          - 507 INSUFFICIENT_STORAGE
          - 508 LOOP_DETECTED
          - 509 BANDWIDTH_LIMIT_EXCEEDED
          - 510 NOT_EXTENDED
          - 511 NETWORK_AUTHENTICATION_REQUIRED
        message:
          type: string
    EventListDto:
      type: object
      properties:
        content:
          type: array
          items:
            $ref: '#/components/schemas/Event'
        totalElements:
          type: integer
          format: int64
        totalPages:
          type: integer
          format: int64
        pageable:
          $ref: '#/components/schemas/Pageable'
    EventResponse:
      type: object
      properties:
        status:
          type: string
          description: Status of the event ingestion
          example: PARTIAL
          enum:
          - SUCCESS
          - PARTIAL
          - FAILED
        failedEvents:
          type: array
          description: List of events that failed ingestion
          items:
            $ref: '#/components/schemas/FailedEvent'