M3ter Bill API

Endpoints for billing operations such as creating, updating, listing,downloading, and deleting Bills. Bills are generated for an Account, and are calculated in accordance with the usage-based pricing Plans applied for the Products the Account consumes. These endpoints enable interaction with the billing system, allowing you to obtain billing details and insights into the consumption patterns and charges of your end-customer Accounts.

OpenAPI Specification

m3ter-bill-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: m3ter Account Bill API
  description: "If you are using Postman, you can:\n- Use the **Download** button above to download the m3ter Open API spec JSON file and then import this file as the **m3ter API Collection** into your Workspace. See [Importing the m3ter Open API](https://www.m3ter.com/docs/guides/m3ter-apis/getting-started-with-api-calls#importing-the-m3ter-open-api) in our main user Documentation for details.\n- Copy this link: [m3ter-Template API Collection](https://www.datocms-assets.com/78893/1672846767-m3ter-template-api-collection-postman_collection.json) and use it to import the **m3ter-Template API Collection** into your Workspace. See [Importing the m3ter Template API Collection](https://www.m3ter.com/docs/guides/m3ter-apis/getting-started-with-api-calls#importing-the-m3ter-template-api-collection) in our main user Documentation for details.\n\n---\n\n# Introduction\nThe m3ter platform supports two HTTP-based REST APIs returning JSON encoded responses:\n- The **Ingest API**, which you can use for submitting raw data measurements. *(See the [Submit Measurements](https://www.m3ter.com/docs/api#tag/Measurements/operation/SubmitMeasurements) endpoint in this API Reference.)*\n- The **Config API**, which you can use for configuration and management. *(All other endpoints in this API Reference.)* \n\n## Authentication and Authorization\nOur APIs use an industry-standard authorization protocol known as the OAuth 2.0 specification.\n\nOAuth2 supports several grant types, each designed for a specific use case. m3ter uses the following two grant types:\n  - **Authorization Code**: Used for human login access via the m3ter Console.\n  - **Client Credentials**: Used for machine-to-machine communication and API access.\n\nComplete the following flow for API access:\n\n1. **Create a Service User and add Permissions**: Log in to the m3ter Console, go to **Settings**, **Access** then **Service Users** tab, and create a Service User. To enable API calls, grant the user **Administrator** permissions. \n    \n2. **Generate Access Keys**: In the Console, open the *Overview* page for the Service User by clicking on the name. Generate an **Access Key id** and **Api Secret**. Make sure you copy the **Api Secret** because it is only visible at the time of creation. \n\nSee [Service Authentication](https://www.m3ter.com/docs/guides/authenticating-with-the-platform/service-authentication) for detailed instructions and an example.\n\n3. **Obtain a Bearer Token using Basic Auth**: We implement the OAuth 2.0 Client Credentials Grant authentication flow for Service User Authentication. Submit a request to the m3ter OAuth Client Credentials authentication flow, using your concatenated **Access Key id** and **Api Secret** to obtain a Bearer Token for your Service User. *See examples below.* \n \n4. **Bearer Token Usage**: Use the HTTP 'Authorization' header with the bearer token to authorise all subsequent API requests.  \n\n> Warning: The Bearer Token is valid for 18,000 seconds or 5 hours. When the token has expired, you must obtain a new one.\n\nBelow are two examples for obtaining a Bearer Token using Basic Auth: the first in cURL and the second as a Python script. \n\n### cURL Example\n1. Open your terminal or command prompt.    \n2. Use the following `cURL` command to obtain a Bearer Token:\n\n```bash\ncurl -X POST https://api.m3ter.com/oauth/token \\\n  -H 'Content-Type: application/x-www-form-urlencoded' \\\n  -u your_access_key_id:your_api_secret \\\n  -d 'grant_type=client_credentials'\n```\n\nReplace `your_access_key_id` and `your_api_secret` with your actual **Access Key id** and **Api Secret**.\n\n3.  Run the command, and if successful, it will return a JSON response containing the Bearer Token. The response will look like this:\n\n```json\n{\n  \"access_token\": \"your_bearer_token\",\n  \"token_type\": \"Bearer\",\n  \"expires_in\": 18000\n}\n```\n\nYou can then use the Bearer Token *(the value of `\"access_token\"`)* for subsequent API calls to m3ter.\n\n### Python Example\n1. Install the `requests` library if you haven't already:\n\n```bash\npip install requests\n```\n\n2. Use the following Python script to obtain a Bearer Token:\n\n```python\nimport requests\nimport base64\n\n# Replace these with your Access Key id and Api Secret\naccess_key_id = 'your_access_key_id'\napi_secret = 'your_api_secret'\n\n# Encode the Access Key id and Api Secret in base64 format\ncredentials = base64.b64encode(f'{access_key_id}:{api_secret}'.encode('utf-8')).decode('utf-8')\n\n# Set the m3ter token endpoint URL\ntoken_url = 'https://api.m3ter.com/oauth/token'\n\n# Set the headers for the request\nheaders = {\n    'Authorization': f'Basic {credentials}',\n    'Content-Type': 'application/x-www-form-urlencoded'\n}\n\n# Set the payload for the request\npayload = {\n    'grant_type': 'client_credentials'\n}\n\n# Send the request to obtain the Bearer Token\nresponse = requests.post(token_url, headers=headers, data=payload)\n\n# Check if the request was successful\nif response.status_code == 200:\n    # Extract the Bearer Token from the response\n    bearer_token = response.json()['access_token']\n    print(f'Bearer Token: {bearer_token}')\nelse:\n    print(f'Error: {response.status_code} - {response.text}')\n```\n\nReplace `your_access_key_id` and `your_api_secret` with your actual **Access Key id** and **Api Secret**. \n\n3. Run the script, and if successful, it will print the Bearer Token. You can then use this Bearer Token for subsequent API calls to m3ter.\n\n## Submitting Personally Identifiable Information (PII)\n**IMPORTANT!** Under the [Data Processing Agreement](https://www.m3ter.com/docs/legal/dpa), the only fields permissible for use in submitting any of your end-customer PII data in m3ter are the ``name``, ``address``, and ``emailAddress`` fields on the **Account** entity - see the details for [Create Account](https://www.m3ter.com/docs/api#operation/PostAccount). See also section 4.2 of the [Terms of Service](https://www.m3ter.com/docs/legal/terms-of-service).\n\n## Rate and Payload Limits\n### Config API Request Rate Limits\nSee [Config API Limits](https://www.m3ter.com/docs/guides/m3ter-apis/config-api-limits).\n\n### Data Explorer API Request Rate Limits\nSee [Data Explorer Request Rate Limits](https://www.m3ter.com/docs/guides/m3ter-apis/config-api-limits#date-explorer-request-rate-limits).\n\n### Ingest API Request Rate and Payload Limits\nSee [Ingest API Limits](https://www.m3ter.com/docs/guides/m3ter-apis/ingest-api-limits) for more information.\n\n## Pagination\n**List Endpoints**\nAPI endpoints that have a List resources request support cursor-based pagination - for example, the `List Accounts` request. These List calls support pagination by taking the two parameters `pageSize` and `nextToken`. \n\nThe response of a List API call is a single page list. If the `nextToken` parameter is not supplied, the first page returned contains the newest objects chronologically. Specify a `nextToken` to retrieve the page of older objects that occur immediately after the last object on the previous page.\n\nUse `pageSize` to limit the list results per page, typically this allows up to a maximum of 100 or 200 per page.\n\n**Search Endpoints**\nAPI endpoints that have a Search resources request support cursor-based pagination - for example, the `Search Accounts` request. These Search calls support pagination by taking the two parameters `pageSize` and `fromDocument`.\n\nThe response of a Search API call is a single page list. If the `fromDocument` parameter is not supplied, the first page returned contains the newest objects chronologically. Specify a `fromDocument` to retrieve the page of older objects that occur immediately after the last object on the previous page.\n\nUse `pageSize` to limit the list results per page, typically this allows up to a maximum of 100 or 200 per page. Default is 10.\n\n## API Quick Start\nSee [Getting Started with API Calls](https://www.m3ter.com/docs/guides/m3ter-apis/getting-started-with-api-calls) for detailed guidance on how to use our API to:\n* Create a Service User and add permissions.\n* Generate access keys for the Service User.\n* Use basic authentication to obtain a Bearer Token.\n\nFor further guidance, also see [Creating and Configuring Service Users](https://www.m3ter.com/docs/guides/organization-and-access-management/managing-users/creating-and-configuring-service-users).\n\n## Other Languages\nIf you want to work with the m3ter REST APIs using other languages such as:\n* Python\n* JavaScript\n* C++\n\nPlease see the [Developer Tools](https://www.m3ter.com/docs/guides/developer-tools) topic in our main documentation for information about available SDKs.\n\n\n# Authentication\n<!-- ReDoc-Inject: <security-definitions> -->"
  version: '1.0'
  x-logo:
    url: https://console.m3ter.com/m3ter-logo-black.svg
servers:
- url: https://api.m3ter.com
security:
- OAuth2: []
tags:
- name: Bill
  description: 'Endpoints for billing operations such as creating, updating, listing,downloading, and deleting Bills.


    Bills are generated for an Account, and are calculated in accordance with the usage-based pricing Plans applied for the Products the Account consumes. These endpoints enable interaction with the billing system, allowing you to obtain billing details and insights into the consumption patterns and charges of your end-customer Accounts.'
paths:
  /organizations/{orgId}/bills/latest/{accountId}:
    get:
      tags:
      - Bill
      summary: Retrieve latest Bill
      description: 'Retrieve the latest Bill for the given Account.


        This endpoint retrieves the latest Bill for the given Account in the specified Organization. It facilitates tracking of the most recent charges and consumption details. '
      operationId: GetLatestBill
      parameters:
      - name: orgId
        in: path
        description: The unique identifier (UUID) of your Organization. The Organization represents your company as a direct customer of our service.
        required: true
        style: simple
        explode: false
        schema:
          type: string
          deprecated: true
          x-stainless-deprecation-message: the org id should be set at the client level instead
      - name: accountId
        in: path
        description: The unique identifier (UUID) of the Account for which the latest Bill should be retrieved.
        required: true
        style: simple
        explode: false
        schema:
          type: string
      - name: additional
        in: query
        description: Comma separated list of additional fields.
        required: false
        allowEmptyValue: true
        style: form
        explode: true
        schema:
          type: array
          items:
            type: string
      responses:
        '200':
          description: Returns the latest Bill for the given Account
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillResponse'
        4XX:
          $ref: '#/components/responses/Error'
        5XX:
          $ref: '#/components/responses/Error'
  /organizations/{orgId}/bills/{id}:
    get:
      tags:
      - Bill
      summary: Retrieve Bill
      description: 'Retrieve the Bill with the given UUID.


        This endpoint retrieves the Bill with the given unique identifier (UUID) and specific Organization. '
      operationId: GetBill
      parameters:
      - name: orgId
        in: path
        description: The unique identifier (UUID) of your Organization. The Organization represents your company as a direct customer of our service.
        required: true
        style: simple
        explode: false
        schema:
          type: string
          deprecated: true
          x-stainless-deprecation-message: the org id should be set at the client level instead
      - name: id
        in: path
        description: The unique identifier (UUID) of the Bill to retrieve.
        required: true
        style: simple
        explode: false
        schema:
          type: string
      - name: additional
        in: query
        description: Comma separated list of additional fields.
        required: false
        allowEmptyValue: true
        style: form
        explode: true
        schema:
          type: array
          items:
            type: string
      responses:
        '200':
          description: Returns the requested Bill
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillResponse'
        4XX:
          $ref: '#/components/responses/Error'
        5XX:
          $ref: '#/components/responses/Error'
    delete:
      tags:
      - Bill
      summary: Delete Bill
      description: 'Delete the Bill with the given UUID.


        This endpoint deletes the specified Bill with the given unique identifier. Use with caution since deleted Bills cannot be recovered. Suitable for removing incorrect or obsolete Bills, and for Bills that have not been sent to customers.  Where end-customer invoices for Bills have been sent to customers, Bills should not be deleted to ensure you have an audit trail of how the invoice was created. '
      operationId: DeleteBill
      parameters:
      - name: orgId
        in: path
        description: The unique identifier (UUID) of your Organization. The Organization represents your company as a direct customer of our service.
        required: true
        style: simple
        explode: false
        schema:
          type: string
          deprecated: true
          x-stainless-deprecation-message: the org id should be set at the client level instead
      - name: id
        in: path
        description: The unique identifier (UUID) of the Bill to delete.
        required: true
        style: simple
        explode: false
        schema:
          type: string
      responses:
        '200':
          description: Returns the deleted Bill
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillResponse'
        4XX:
          $ref: '#/components/responses/Error'
        5XX:
          $ref: '#/components/responses/Error'
  /organizations/{orgId}/bills:
    get:
      tags:
      - Bill
      summary: List Bills
      description: 'Retrieve a list of Bills.


        This endpoint retrieves a list of all Bills for the given Account within the specified Organization. Optional filters can be applied such as by date range, lock status, or other attributes. The list can also be paginated for easier management.'
      operationId: ListBills
      parameters:
      - name: orgId
        in: path
        description: The unique identifier (UUID) of your Organization. The Organization represents your company as a direct customer of our service.
        required: true
        style: simple
        explode: false
        schema:
          type: string
          deprecated: true
          x-stainless-deprecation-message: the org id should be set at the client level instead
      - name: pageSize
        in: query
        description: Specifies the maximum number of Bills to retrieve per page.
        required: false
        allowEmptyValue: true
        style: form
        explode: true
        schema:
          maximum: 100
          minimum: 1
          type: integer
          format: int32
      - name: nextToken
        in: query
        description: The `nextToken` for multi-page retrievals. It is used to fetch the next page of Bills in a paginated list.
        required: false
        allowEmptyValue: true
        style: form
        explode: true
        schema:
          type: string
      - name: accountId
        in: query
        description: Optional filter. An Account ID - returns the Bills for the single specified Account.
        required: false
        allowEmptyValue: true
        style: form
        explode: true
        schema:
          type: string
      - name: locked
        in: query
        description: 'Boolean flag specifying whether to include Bills with "locked" status.


          * **TRUE** - the list inlcudes "locked" Bills.

          * **FALSE** - excludes "locked" Bills from the list.'
        required: false
        allowEmptyValue: true
        style: form
        explode: true
        schema:
          type: boolean
      - name: excludeLineItems
        in: query
        description: Exclude Line Items
        required: false
        allowEmptyValue: true
        style: form
        explode: true
        schema:
          type: boolean
      - name: includeBillTotal
        in: query
        description: Include Bill Total
        required: false
        allowEmptyValue: true
        style: form
        explode: true
        schema:
          type: boolean
      - name: status
        in: query
        description: Only include Bills having the given status
        required: false
        allowEmptyValue: true
        style: form
        explode: true
        schema:
          $ref: '#/components/schemas/BillStatus'
      - name: billDate
        in: query
        description: The specific date in ISO 8601 format for which you want to retrieve Bills.
        required: false
        allowEmptyValue: true
        style: form
        explode: true
        schema:
          type: string
      - name: billDateStart
        in: query
        description: Only include Bills with bill dates equal to or later than this date.
        required: false
        allowEmptyValue: true
        style: form
        explode: true
        schema:
          type: string
      - name: billDateEnd
        in: query
        description: Only include Bills with bill dates earlier than this date.
        required: false
        allowEmptyValue: true
        style: form
        explode: true
        schema:
          type: string
      - name: externalInvoiceDateStart
        in: query
        description: Only include Bills with external invoice dates equal to or later than this date.
        required: false
        allowEmptyValue: true
        style: form
        explode: true
        schema:
          type: string
      - name: externalInvoiceDateEnd
        in: query
        description: Only include Bills with external invoice dates earlier than this date.
        required: false
        allowEmptyValue: true
        style: form
        explode: true
        schema:
          type: string
      - name: ids
        in: query
        description: Optional filter. The list of Bill IDs to retrieve.
        required: false
        allowEmptyValue: true
        style: form
        explode: true
        schema:
          type: array
          items:
            type: string
      - name: billJobId
        in: query
        description: List Bill entities by the bill job that last calculated them.
        required: false
        allowEmptyValue: true
        style: form
        explode: true
        schema:
          type: string
      - name: additional
        in: query
        description: Comma separated list of additional fields.
        required: false
        allowEmptyValue: true
        style: form
        explode: true
        schema:
          type: array
          items:
            type: string
      - name: billingFrequency
        in: query
        description: ''
        required: false
        style: form
        explode: true
        schema:
          type: string
          nullable: true
      responses:
        '200':
          description: Returns the requested list of Bills
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedBillResponseData'
        4XX:
          $ref: '#/components/responses/Error'
        5XX:
          $ref: '#/components/responses/Error'
  /organizations/{orgId}/bills/{id}/status:
    put:
      tags:
      - Bill
      summary: Update Bill Status
      description: "Updates the status of a specified Bill with the given Bill ID. \n\nThis endpoint allows you to transition a Bill's status through various stages, such as from \"Pending\" to \"Approved\"."
      operationId: UpdateBillStatus
      parameters:
      - name: orgId
        in: path
        description: The unique identifier (UUID) of your Organization. The Organization represents your company as a direct customer of our service.
        required: true
        style: simple
        explode: false
        schema:
          type: string
          deprecated: true
          x-stainless-deprecation-message: the org id should be set at the client level instead
      - name: id
        in: path
        description: The unique identifier (UUID) of the Bill whose status you want to update.
        required: true
        style: simple
        explode: false
        schema:
          type: string
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateBillStatusRequest'
        required: true
      responses:
        '200':
          description: Returns the updated Bill
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillResponse'
        4XX:
          $ref: '#/components/responses/Error'
        5XX:
          $ref: '#/components/responses/Error'
  /organizations/{orgId}/bills/{id}/statement/json:
    get:
      tags:
      - Bill
      summary: Retrieve Bill Statement in JSON Format
      description: 'Retrieve a Bill Statement in JSON format for a given Bill ID.


        Bill Statements are backing sheets to the invoices sent to your customers. Bill Statements provide a breakdown of the usage responsible for the usage charge line items shown on invoices.


        The response to this call returns a pre-signed `downloadUrl`, which you use with a `GET` call to obtain the Bill Statement.'
      operationId: GetBillJsonStatement
      parameters:
      - name: orgId
        in: path
        description: The unique identifier (UUID) of your Organization. The Organization represents your company as a direct customer of our service.
        required: true
        style: simple
        explode: false
        schema:
          type: string
          deprecated: true
          x-stainless-deprecation-message: the org id should be set at the client level instead
      - name: id
        in: path
        description: The unique identifier (UUID) of the Bill for which you want to retrieve the Statement.
        required: true
        style: simple
        explode: false
        schema:
          type: string
      responses:
        '200':
          description: 'Returns the download URL '
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ObjectUrlResponse'
        4XX:
          $ref: '#/components/responses/Error'
        5XX:
          $ref: '#/components/responses/Error'
  /organizations/{orgId}/bills/{billId}/lineitems:
    get:
      tags:
      - Bill
      summary: List Line Items
      description: "Lists all the line items for a specific Bill. \n\nThis endpoint retrieves a list of line items for the given Bill within the specified Organization. The list can also be paginated for easier management. The line items returned in the list include individual charges, discounts, or adjustments within a Bill.\n"
      operationId: ListBillLineItems
      parameters:
      - name: orgId
        in: path
        description: The unique identifier (UUID) of your Organization. The Organization represents your company as a direct customer of our service.
        required: true
        style: simple
        explode: false
        schema:
          type: string
          deprecated: true
          x-stainless-deprecation-message: the org id should be set at the client level instead
      - name: billId
        in: path
        description: The unique identifier (UUID) of the Bill for which you want to list the line items.
        required: true
        style: simple
        explode: false
        schema:
          type: string
      - name: pageSize
        in: query
        description: Specifies the maximum number of line items to retrieve per page.
        required: false
        allowEmptyValue: true
        style: form
        explode: true
        schema:
          maximum: 100
          minimum: 1
          type: integer
          format: int32
      - name: nextToken
        in: query
        description: The `nextToken` for multi-page retrievals. It is used to fetch the next page of line items in a paginated list.
        required: false
        allowEmptyValue: true
        style: form
        explode: true
        schema:
          type: string
      - name: additional
        in: query
        description: Comma separated list of additional fields.
        required: false
        allowEmptyValue: true
        style: form
        explode: true
        schema:
          type: array
          items:
            type: string
      responses:
        '200':
          description: Returns the list of Bill line items
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedBillLineItemResponseData'
        4XX:
          $ref: '#/components/responses/Error'
        5XX:
          $ref: '#/components/responses/Error'
  /organizations/{orgId}/bills/accountid/{accountId}:
    get:
      tags:
      - Bill
      summary: Retrieve Bills for an Account ID
      description: 'Retrieve all Bills for the given Account.


        This endpoint retrieves all Bills associated with a specific Account ID in a specified organization. The list can also be paginated for easier management.


        This is useful for obtaining an overview of all billing activities for an Account.

        '
      operationId: GetAllBillsForAccount
      parameters:
      - name: orgId
        in: path
        description: The unique identifier (UUID) of your Organization. The Organization represents your company as a direct customer of our service.
        required: true
        style: simple
        explode: false
        schema:
          type: string
          deprecated: true
          x-stainless-deprecation-message: the org id should be set at the client level instead
      - name: pageSize
        in: query
        description: Specifies the maximum number of Bills to retrieve per page.
        required: false
        allowEmptyValue: true
        style: form
        explode: true
        schema:
          maximum: 100
          minimum: 1
          type: integer
          format: int32
      - name: nextToken
        in: query
        description: The `nextToken` for multi-page retrievals. It is used to fetch the next page of Bills in a paginated list.
        required: false
        allowEmptyValue: true
        style: form
        explode: true
        schema:
          type: string
      - name: accountId
        in: path
        description: The unique identifier (UUID) of the Account for which you want to retrieve Bills.
        required: true
        style: simple
        explode: false
        schema:
          type: string
      - name: additional
        in: query
        description: Comma separated list of additional fields.
        required: false
        allowEmptyValue: true
        style: form
        explode: true
        schema:
          type: array
          items:
            type: string
      responses:
        '200':
          description: Returns list of Bills for the requested account
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedBillResponseData'
        4XX:
          $ref: '#/components/responses/Error'
        5XX:
          $ref: '#/components/responses/Error'
  /organizations/{orgId}/bills/{billId}/lineitems/{id}:
    get:
      tags:
      - Bill
      summary: Retrieve Line Item
      description: 'Retrieves a specific line item within a Bill.


        This endpoint retrieves the line item given by its unique identifier (UUID) from a specific Bill.  '
      operationId: GetBillLineItem
      parameters:
      - name: orgId
        in: path
        description: The unique identifier (UUID) of your Organization. The Organization represents your company as a direct customer of our service.
        required: true
        style: simple
        explode: false
        schema:
          type: string
          deprecated: true
          x-stainless-deprecation-message: the org id should be set at the client level instead
      - name: billId
        in: path
        description: The unique identifier (UUID) of the Bill containing the line item.
        required: true
        style: simple
        explode: false
        schema:
          type: string
      - name: id
        in: path
        description: The unique identifier (UUID) of the line item you want to retrieve.
        required: true
        style: simple
        explode: false
        schema:
          type: string
      - name: additional
        in: query
        description: Comma separated list of additional fields.
        required: false
        allowEmptyValue: true
        style: form
        explode: true
        schema:
          type: array
          items:
            type: string
      responses:
        '200':
          description: Returns the requested line item from a Bill
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillLineItemResponse'
        4XX:
          $ref: '#/components/responses/Error'
        5XX:
          $ref: '#/components/responses/Error'
  /organizations/{orgId}/bills/{id}/lock:
    put:
      tags:
      - Bill
      summary: Lock Bill
      description: 'Lock the specific Bill identified by the given UUID. Once a Bill is locked, no further changes can be made to it.


        **NOTE:** You cannot lock a Bill whose current status is `PENDING`. You will receive an error message if you try to do this. You must first use the [Approve Bills](https://www.m3ter.com/docs/api#tag/Bill/operation/ApproveBills) call to approve a Bill before you can lock it.'
      operationId: LockBill
      parameters:
      - name: orgId
        in: path
        description: The unique identifier (UUID) of your Organization. The Organization represents your company as a direct customer of our service.
        required: true
        style: simple
        explode: false
        schema:
          type: string
          deprecated: true
          x-stainless-deprecation-message: the org id should be set at the client level instead
      - name: id
        in: path
        description: The unique identifier (UUID) of the Bill to lock.
        required: true
        style: simple
        explode: false
        schema:
          type: string
      responses:
        '200':
          description: Returns the locked Bill
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillResponse'
        4XX:
          $ref: '#/components/responses/Error'
        5XX:
          $ref: '#/components/responses/Error'
  /organizations/{orgId}/bills/billingperiod/{lastDateInBillingPeriod}/{billingFrequency}/approve:
    post:
      tags:
      - Bill
      summary: Approve Bills in Billing Period
      description: "Approve all Bills within a specified billing period. This endpoint allows you to approve Bills on various frequencies, such as daily, weekly, monthly, or annually. Specify the last day of the period to define the range. \n\nFor example, to approve all Bills on monthly billing up to September with due date of 1st of month, use the last day of September, which is September 30th."
      operationId: ApproveAllBillsInBillingPeriod
      parameters:
      - name: orgId
        in: path
        description: The unique identifier (UUID) of your Organization. The Organization represents your company as a direct customer of our service.
        required: true
        style: simple
        explode: false
        schema:
          type: string
          deprecated: true
          x-stainless-deprecation-message: the org id should be set at the client level instead
      - name: lastDateInBillingPeriod
        in: path
        description: The last date of the billing period for which you want to approve Bills. This date defines the range of Bills to be approved.
        required: true
        style: simple
        

# --- truncated at 32 KB (85 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/m3ter/refs/heads/main/openapi/m3ter-bill-api-openapi.yml