Get NFT Allowances by Account

Returns an account's non-fungible token (NFT) allowances.

This method will use 20 Compute Units.


Get non fungible token allowances for an account

get

Returns an account's non-fungible token allowances.

Ordering

The order is governed by a combination of the account ID and the token ID values, with account ID being the parent column. The token ID value governs its order within the given account ID.

Note: The default order for this API is currently ascending. The account ID can be the owner or the spender ID depending upon the owner flag.

Filtering

When filtering there are some restrictions enforced to ensure correctness and scalability.

The table below defines the restrictions and support for the endpoint

Query Param Comparison Operator Support Description Example
account.id eq Y Single occurrence only. ?account.id=X
ne N
lt(e) Y Single occurrence only. ?account.id=lte:X
gt(e) Y Single occurrence only. ?account.id=gte:X
token.id eq Y Single occurrence only. Requires the presence of an account.id parameter ?account.id=X&token.id=eq:Y
ne N
lt(e) Y Single occurrence only. Requires the presence of an lte or eq account.id parameter ?account.id=lte:X&token.id=lt:Y
gt(e) Y Single occurrence only. Requires the presence of an gte or eq account.id parameter ?account.id=gte:X&token.id=gt:Y

Both filters must be a single occurrence of gt(e) or lt(e) which provide a lower and or upper boundary for search.

Path parameters
idOrAliasOrEvmAddressstringRequired

Account alias or account id or evm address

Example: {"value":"HIQQEXWKW53RKN4W6XXC4Q232SYNZ3SZANVZZSUME5B5PRGXL663UAQA"}Pattern: ^(\d{1,10}\.){0,2}(\d{1,10}|(0x)?[A-Fa-f0-9]{40}|(?:[A-Z2-7]{8})*(?:[A-Z2-7]{2}|[A-Z2-7]{4,5}|[A-Z2-7]{7,8}))$
Query parameters
limitinteger · int32 · min: 1 · max: 100Optional

The maximum number of items to return

Default: 25Example: 2
orderundefined · enumOptional

The order in which items are listed

Default: ascExample: descPossible values:
account.idstringOptional

The ID of the account to return information for

Example: {"summary":"--","value":""}Pattern: ^((gte?|lte?|eq|ne)\:)?(\d{1,10}\.\d{1,10}\.)?\d{1,10}$
token.idstringOptional

The ID of the token to return information for

Example: {"summary":"--","value":""}Pattern: ^((gte?|lte?|eq|ne)\:)?(\d{1,10}\.\d{1,10}\.)?\d{1,10}$
ownerbooleanOptional

When the owner value is true or omitted, the accountId path parameter will specify the ID of the owner, and the API will retrieve the allowances that the owner has granted to different spenders. Conversely, when the owner value is false, the accountId path parameter will indicate the ID of the spender who has an allowance, and the API will instead provide the allowances granted to the spender by different owners of those tokens.

Default: trueExample: true
Responses
200
OK
application/json
get
GET /v1/<YOUR_API_KEY>/api/v1/accounts/{idOrAliasOrEvmAddress}/allowances/nfts HTTP/1.1
Host: mainnet.hedera.validationcloud.io
Accept: */*
{
  "allowances": [
    {
      "approved_for_all": false,
      "owner": "0.0.11",
      "payer_account_id": "0.0.10",
      "spender": "0.0.15",
      "timestamp": {
        "from": "1651560386.060890949",
        "to": "1651560386.661997287"
      },
      "token_id": "0.0.99"
    }
  ],
  "links": {
    "next": null
  }
}

Last updated

Was this helpful?