Skip to main content
GET
/
organizations
/
{orgId}
/
accounts
/
search
Search Accounts
curl --request GET \
  --url https://api.m3ter.com/organizations/{orgId}/accounts/search \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "id": "<string>",
      "version": 123,
      "customFields": {},
      "name": "<string>",
      "code": "<string>",
      "address": {
        "addressLine1": "<string>",
        "addressLine2": "<string>",
        "addressLine3": "<string>",
        "addressLine4": "<string>",
        "locality": "<string>",
        "region": "<string>",
        "postCode": "<string>",
        "country": "<string>"
      },
      "emailAddress": "<string>",
      "parentAccountId": "<string>",
      "billEpoch": "2023-12-25",
      "purchaseOrderNumber": "<string>",
      "currency": "USD",
      "statementDefinitionId": "<string>",
      "dtCreated": "2023-11-07T05:31:56Z",
      "dtLastModified": "2023-11-07T05:31:56Z",
      "createdBy": "<string>",
      "lastModifiedBy": "<string>",
      "autoGenerateStatementMode": "NONE",
      "creditApplicationOrder": [
        "PREPAYMENT"
      ],
      "daysBeforeBillDue": 123
    }
  ],
  "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

UUID of the Organization.

Query Parameters

searchQuery
string

Query for data using special syntax:

  • Query parameters should be delimited using the $ (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 are: name, code, currency, purchaseOrderNumber, parentAccountId, codes, id, createdBy, dtCreated, lastModifiedBy, ids.
  • Query example:
    • searchQuery=name~Premium On$currency:USD.
    • This query is translated into: find accounts whose name contains the phrase/prefix 'Premium On' AND the account currency is USD.

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 Accounts 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 Account entity to sort by, such as name, code, and so on.

sortOrder
enum<string>

Sorting order.

Available options:
ASC,
DESC

Response

Return the Accounts that match the search criteria

data
object[]
nextToken
string