Skip to main content
GET
/
organizations
/
{orgId}
/
bills
/
search
Search Bills
curl --request GET \
  --url https://api.m3ter.com/organizations/{orgId}/bills/search \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "id": "<string>",
      "version": 123,
      "accountId": "<string>",
      "accountCode": "<string>",
      "startDate": "2023-12-25",
      "endDate": "2023-12-25",
      "startDateTimeUTC": "2023-11-07T05:31:56Z",
      "endDateTimeUTC": "2023-11-07T05:31:56Z",
      "billDate": "2023-12-25",
      "dueDate": "2023-12-25",
      "billingFrequency": "DAILY",
      "billFrequencyInterval": 123,
      "timezone": "UTC",
      "currency": "<string>",
      "locked": true,
      "createdDate": "2023-11-07T05:31:56Z",
      "status": "PENDING",
      "billJobId": "<string>",
      "currencyConversions": [
        {
          "from": "EUR",
          "to": "USD",
          "multiplier": 1.12
        }
      ],
      "lastCalculatedDate": "2023-11-07T05:31:56Z",
      "lineItems": [
        {
          "description": "<string>",
          "quantity": 123,
          "units": 123,
          "unit": "<string>",
          "subtotal": 123,
          "currency": "<string>",
          "conversionRate": 123,
          "convertedSubtotal": 123,
          "lineItemType": "STANDING_CHARGE",
          "averageUnitPrice": 123,
          "id": "<string>",
          "productId": "<string>",
          "productName": "<string>",
          "productCode": "<string>",
          "accountingProductId": "<string>",
          "accountingProductName": "<string>",
          "accountingProductCode": "<string>",
          "aggregationId": "<string>",
          "compoundAggregationId": "<string>",
          "counterId": "<string>",
          "chargeId": "<string>",
          "segment": {},
          "group": {},
          "meterId": "<string>",
          "planId": "<string>",
          "planGroupId": "<string>",
          "commitmentId": "<string>",
          "balanceId": "<string>",
          "creditTypeId": "<string>",
          "pricingId": "<string>",
          "childAccountId": "<string>",
          "childAccountCode": "<string>",
          "usagePerPricingBand": [
            {
              "pricingBandId": "<string>",
              "lowerLimit": 123,
              "fixedPrice": 123,
              "unitSubtotal": 123,
              "unitPrice": 123,
              "bandUnits": 123,
              "bandQuantity": 123,
              "bandSubtotal": 123,
              "creditTypeId": "<string>",
              "convertedBandSubtotal": 123
            }
          ],
          "servicePeriodStartDate": "2023-11-07T05:31:56Z",
          "servicePeriodEndDate": "2023-11-07T05:31:56Z",
          "referencedBillId": "<string>",
          "referencedLineItemId": "<string>",
          "reasonId": "<string>",
          "contractId": "<string>",
          "sequenceNumber": 123,
          "additional": {}
        }
      ],
      "purchaseOrderNumber": "<string>",
      "externalInvoiceReference": "<string>",
      "externalInvoiceDate": "2023-12-25",
      "jsonStatementGenerated": true,
      "csvStatementGenerated": true,
      "statementStale": true,
      "billTotal": 123,
      "sequentialInvoiceNumber": "<string>",
      "dtCreated": "2023-11-07T05:31:56Z",
      "dtLastModified": "2023-11-07T05:31:56Z",
      "createdBy": "<string>",
      "lastModifiedBy": "<string>",
      "dtApproved": "2023-11-07T05:31:56Z",
      "approvedBy": "<string>",
      "dtLocked": "2023-11-07T05:31:56Z",
      "lockedBy": "<string>"
    }
  ],
  "nextToken": "<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.

Query Parameters

searchQuery
string

Query for data using special syntax:

  • Query parameters should be delimited using $ (dollar sign).
  • Allowed comparators are:
    • (greater than) >
    • (greater than or equal to) >=
    • (equal to) :
    • (less than) <
    • (less than or equal to) <=
    • (match phrase/prefix) ~
  • Allowed parameters: accountId, locked, billDate, startDate, endDate, dueDate, billingFrequency, id, createdBy, dtCreated, lastModifiedBy, ids.
  • Query example:
    • searchQuery=startDate>2023-01-01$accountId:62eaad67-5790-407e-b853-881564f0e543.
    • This query is translated into: find Bills that startDate is older than 2023-01-01 AND accountId is equal to 62eaad67-5790-407e-b853-881564f0e543.

Note: Using the ~ match phrase/prefix comparator. For best results, we recommend treating this as a "starts with" comparator for your search query.

fromDocument
integer<int32>

fromDocument for multi page retrievals.

pageSize
integer<int32>

Number of Bills to retrieve per page.

NOTE: If not defined, default is 10.

Required range: 1 <= x <= 100
operator
enum<string>

Search Operator to be used while querying search.

Available options:
AND,
OR
sortBy
string

Name of the parameter on which sorting is performed. Use any field available on the Bill entity to sort by, such as accountId, endDate, and so on.

sortOrder
enum<string>

Sorting order.

Available options:
ASC,
DESC

Response

Returns the Bills matching the search criteria

data
object[]
nextToken
string