Entitlements
Customers

List customer entitlement grants

List all grants issued for an entitlement. The entitlement can be defined either by its id or featureKey.

get/api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/grants

Request

  • Base URL
    https://openmeter.cloud (the document declares no server; this is the origin it was published from)
  • Auth
    • HTTP bearer
    • or API key in cookie __session

Path parameters

string required

ULID (Universally Unique Lexicographically Sortable Identifier).

OR
string required

ExternalKey is a looser version of key.

Example:01G65Z755AFWAKHE12NY0CQ9FH
entitlementIdOrFeatureKeystring required

Query parameters

includeDeletedboolean
pageinteger

Page index.

Default is 1.

pageSizeinteger

The maximum number of items per page.

Default is 100.

offsetinteger

Number of items to skip.

Default is 0.

limitinteger

Number of items to return.

Default is 100.

order'ASC' | 'DESC'

The order direction.

orderBy'id' | 'createdAt' | 'updatedAt'

Order by options for grants.

The order by field.

Response

The request has succeeded.

pageinteger required

The page index.

pageSizeinteger required

The maximum number of items per page.

totalCountinteger required

The total number of items.

Example response

{
  "items": [
    {
      "amount": 100,
      "annotations": {
        "externalId": "019142cc-a016-796a-8113-1a942fecd26d"
      },
      "createdAt": "2024-01-01T01:01:01.001Z",
      "deletedAt": "2024-01-01T01:01:01.001Z",
      "effectiveAt": "2023-01-01T01:01:01.001Z",
      "entitlementId": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
      "expiration": {
        "count": 12
      },
      "expiresAt": "2023-01-01T01:01:01.001Z",
      "id": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
      "maxRolloverAmount": 100,
      "metadata": {
        "externalId": "019142cc-a016-796a-8113-1a942fecd26d"
      },
      "minRolloverAmount": 100,
      "nextRecurrence": "2023-01-01T01:01:01.001Z",
      "priority": 1,
      "recurrence": {
        "anchor": "2023-01-01T01:01:01.001Z",
        "interval": "DAY",
        "intervalISO": "P1D"
      },
      "updatedAt": "2024-01-01T01:01:01.001Z",
      "voidedAt": "2023-01-01T01:01:01.001Z"
    }
  ],
  "page": 1,
  "pageSize": 100,
  "totalCount": 500
}

Changes

No recorded changes to this operation across all 2 revisions of this API.