# Non-fungible token (NFT) action

The `NFTTokenAction` entity describes standard actions that can be performed on NFTs, such as mint, transfer, burn etc. CSPR.cloud supports NFTs compatible with the [CEP-47](https://github.com/casper-ecosystem/casper-nft-cep47) and [CEP-78](https://github.com/casper-ecosystem/cep-78-enhanced-nft) Casper Network standards.

### Properties

The `NFTTokenAction` entity has the following properties:

| Property                | Type         | Description                                                                                                                         |
| ----------------------- | ------------ | ----------------------------------------------------------------------------------------------------------------------------------- |
| `deploy_hash`           | `string(64)` | Deploy hash in which the token action occurred. First part of token action identifier, represented as a hexadecimal string          |
| `block_height`          | `uint64`     | Height of the block in which the token action occurred.                                                                             |
| `token_tracking_id`     | `string`     | ID describes relation with corresponded [`NFTToken`](/1.3.x/rest-api/non-fungible-token.md). Second part of token action identifier |
| `contract_package_hash` | `string(64)` | Contract package hash of the NFT contract, represented as a hexadecimal string                                                      |
| `from_hash`             | `string(64)` | Action source account or contract hash, represented as a hexadecimal string                                                         |
| `from_type`             | `uint8`      | Action source hash type: `0` for account, `1` for contract                                                                          |
| `to_hash`               | `string(64)` | Action target account or contract hash, represented as a hexadecimal string                                                         |
| `to_type`               | `uint8`      | Action target hash type: `0` for account, `1` for contract                                                                          |
| `nft_action_id`         | `uint8`      | [NFT action type](/1.3.x/rest-api/non-fungible-token-action/get-token-actions-types.md) type identifier                             |
| `token_id`              | `string`     | Token ID presented on the network                                                                                                   |
| `timestamp`             | `uint16`     | The timestamp of performed token action                                                                                             |

**Example**

```json
{
  "contract_package_hash": "542359cb825bbf2a10017db5cb31b8862df7a64784e39b947678164156050d89",
  "deploy_hash": "1a9d50b16af889d2c3bd32e54216150d3bb2e0718d2a6572bb33167d1297460c",
  "block_height": 2404577,
  "from_hash": "3411d3b4d457af0309f3ee967d18ca53fdff749caa60314aeb47f2ff9f99c1c1",
  "from_type": 0,
  "nft_action_id": 5,
  "timestamp": "2021-08-11T07:20:18Z",
  "to_hash": "3411d3b4d457af0309f3ee967d18ca53fdff749caa60314aeb47f2ff9f99c1c1",
  "to_type": 0,
  "token_id": "US-7000001-XTest6",
  "token_tracking_id": 5
}
```

## Optional properties

Depending on the endpoint some of the following optional properties may be included in the `NFTTokenAction` entity:

| Property           | Type                                                     | Description                                 |
| ------------------ | -------------------------------------------------------- | ------------------------------------------- |
| `contract_package` | [`ContractPackage`](/1.3.x/rest-api/contract-package.md) | NFT contract package                        |
| `deploy`           | [`Deploy`](/1.3.x/rest-api/deploy.md)                    | Deploy in which the token action occurred   |
| `from_public_key`  | `string(68)`                                             | Action source public key if it's an account |
| `to_public_key`    | `string(68)`                                             | Action target public key if it's an account |

### Relations

| Entity                                                    | Mapping property        | Description                                                     |
| --------------------------------------------------------- | ----------------------- | --------------------------------------------------------------- |
| [`Contract package`](/1.3.x/rest-api/contract-package.md) | `contract_package_hash` | NFT actions belong to a contract package                        |
| [`Account`](/1.3.x/rest-api/account.md)                   | `from_hash, to_hash`    | NFT actions could have accounts as the action source and target |
| [`NFTToken`](/1.3.x/rest-api/non-fungible-token.md)       | `tracking_id`           | NFT actions are performed under non-fungible tokens             |

### Endpoints

The `NFTTokenAction` entity has the following endpoints:

* [Get contract package NFT actions for a token](/1.3.x/rest-api/non-fungible-token-action/get-contract-package-token-actions-by-token.md)
* [Get account NFT actions](/1.3.x/rest-api/non-fungible-token-action/get-account-token-actions.md)
* [Get contract package NFT actions](/1.3.x/rest-api/non-fungible-token-action/get-contract-package-token-actions.md)

### Relation endpoints

The `NFTTokenAction` entity has the following relation endpoints:

* [Get NFT action types](/1.3.x/rest-api/non-fungible-token-action/get-token-actions-types.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cspr.cloud/1.3.x/rest-api/non-fungible-token-action.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
