From b529f9e2e891216c893364c739b257a089d01604 Mon Sep 17 00:00:00 2001 From: Tadej Date: Fri, 4 Aug 2023 14:27:43 +0200 Subject: [PATCH 1/3] docs(nfts): add nestable docs and generic NFT updates and fixes --- build/3-apillon-api.md | 288 ++++++++++++++++++++++++++--------------- 1 file changed, 184 insertions(+), 104 deletions(-) diff --git a/build/3-apillon-api.md b/build/3-apillon-api.md index 938029d2..84839e49 100644 --- a/build/3-apillon-api.md +++ b/build/3-apillon-api.md @@ -1160,6 +1160,7 @@ curl --location --request GET "https://api.apillon.io/hosting/websites/:websiteU + ## Web3 NFTs API API is for creating and managing NFTs. To prepare images and metadata you can use storage API. To learn more about metadata standards you can visit: https://docs.opensea.io/docs/metadata-standards @@ -1188,31 +1189,35 @@ API is for creating and managing NFTs. To prepare images and metadata you can us #### Response Fields -| Name | Type | Description | -|------------------|-----------|---------------------------------------------------------------------------------------------------| -| collectionUuid | `string` | Unique key of a collection. | -| collectionStatus | `number` | Apillon internal/database collection status. | -| status | `number` | Collection status. | -| projectUuid | `string` | Apillon project id. | -| symbol | `string` | NFT collection symbol (usually 3-4 characters long). | -| name | `string` | NFT collection name. | -| description | `string` | NFT collection description. | -| maxSupply | `number` | Maximal number of NFTs ever in existence. | -| bucketUuid | `string` | UUID of the bucket where metadata is stored. | -| baseUri | `string` | Base URI for collection metadata (token id and file extension is appended to it). | -| baseExtension | `string` | File extension that is auto appended after token id to form a full URL. | -| isSoulbound | `boolean` | Soul bound tokens are NFTs that are bounded to wallet and not transferable. | -| isRevokable | `boolean` | For revocable collection owner can destroy NFTs at any time. | -| royaltiesFees | `number` | Percentage (between 0 and 100) of each NFT sale sent to wallet specified under royalties address. | -| royaltiesAddress | `string` | Address where royalties are sent to. | -| chain | `number` | Blockchain id on which you want to release your collection. | -| contractAddress | `string` | Smart address of contract for deployed collection. | -| transactionHash | `string` | Deployment transaction hash/id. | -| deployerAddress | `string` | Wallet address of deployer. | -| drop | `boolean` | Determines if collection is mintable by public. | -| dropStart | `number` | UNIX timestamp which determines public mint opening date and time. | -| dropPrice | `number` | Price of NFT at mint stage. | -| dropReserve | `number` | Amount of NFTs reserved by owner. | +| Name | Type | Description | +|------------------|------------|---------------------------------------------------------------------------------------------------| +| id | `string` | Internal collection id. | +| status | `number` | Collection status. | +| collectionType | `number` | Type of smart contract to use for collection (1 for generic, 2 for nestable). | +| collectionUuid | `string` | Unique key of a collection. | +| projectUuid | `string` | Apillon project id. | +| symbol | `string` | NFT collection symbol (usually 3-4 characters long). | +| name | `string` | NFT collection name. | +| description | `string` | NFT collection description. | +| maxSupply | `number` | Maximal number of NFTs ever in existence (0 stands for unlimited). | +| bucketUuid | `string` | UUID of the bucket where metadata is stored. | +| baseUri | `string` | Base URI for collection metadata (token id and file extension is appended to it). | +| baseExtension | `string` | File extension that is auto appended after token id to form a full URL. | +| isSoulbound | `boolean` | Soul bound tokens are NFTs that are bounded to wallet and not transferable. | +| isRevokable | `boolean` | For revocable collection owner can destroy NFTs at any time. | +| royaltiesFees | `number` | Percentage (between 0 and 100) of each NFT sale sent to wallet specified under royalties address. | +| royaltiesAddress | `string` | Address where royalties are sent to. | +| collectionStatus | `number` | Apillon internal/database collection status. | +| contractAddress | `string` | Smart address of contract for deployed collection. | +| transactionHash | `string` | Deployment transaction hash/id. | +| imagesSession | `string` | | +| metadataSession | `string` | | +| deployerAddress | `string` | Wallet address of deployer. | +| chain | `number` | Blockchain id on which you want to release your collection. | +| drop | `boolean` | Determines if collection is mintable by public. | +| dropStart | `number` | UNIX timestamp which determines public mint opening date and time. | +| dropPrice | `number` | Price of NFT at mint stage. | +| dropReserve | `number` | Amount of NFTs reserved by owner. |
@@ -1237,28 +1242,29 @@ curl --location 'https://api.apillon.io/nfts/collections/:uuid' \ "data": { "id": 23, "status": 2, + "collectionType": 1, "collectionUuid": "d6355fd3-640d-4803-a4d9-79d875abcb5a", "projectUuid": "b8d3cb86-fde5-4d96-81af-bf47f8703e22", "symbol": "NFT", "name": "NFT Collection", "description": "NFT Collection Description", "maxSupply": 1000, - "dropPrice": 0.1, "bucketUuid": "a9425ff7-4802-4a38-b771-84a790112c30", "baseUri": "https://ipfs.apillon.io/metadata/", "baseExtension": ".json", - "drop": true, "isSoulbound": false, "isRevokable": true, - "dropStart": 1687251003, - "dropReserve": 5, "royaltiesFees": 0.1, "royaltiesAddress": "0x4156edbafc5091507de2dd2a53ded551a346f83b", "collectionStatus": 0, "contractAddress": "0x452101C96A1Cf2cBDfa5BB5353e4a7F235241557", "transactionHash": "0x6b97424de3367cd0335b08265787b83053b62bee2d1c8bec1f776936bea4fb26", "deployerAddress": "0x4156edbafc5091507de2dd2a53ded551a346f83b", - "chain": 1287 + "chain": 1287, + "drop": true, + "dropStart": 1687251003, + "dropPrice": 0.1, + "dropReserve": 5 } } ``` @@ -1279,6 +1285,13 @@ curl --location 'https://api.apillon.io/nfts/collections/:uuid' \ | 8 | Marked for deletion | | 9 | Deleted | +##### Collection Type + +| Number | Description | +|--------|--------------------------| +| 0 | Generic NFT collection. | +| 1 | Nestable NFT collection. | + ##### Collection Statuses | Number | Description | @@ -1291,7 +1304,6 @@ curl --location 'https://api.apillon.io/nfts/collections/:uuid' \ | 5 | Failed deploying collection. | - ### List NFT Collections > List NFT collections. Items are paginated and can be filtered and ordered through query parameters. @@ -1340,28 +1352,29 @@ curl --location 'https://api.apillon.io/nfts/collections' \ { "id": 23, "status": 2, + "collectionType": 1, "collectionUuid": "d6355fd3-640d-4803-a4d9-79d875abcb5a", "projectUuid": "b8d3cb86-fde5-4d96-81af-bf47f8703e22", "symbol": "NFT", "name": "NFT Collection", "description": "NFT Collection Description", "maxSupply": 1000, - "dropPrice": 0.1, "bucketUuid": "a9425ff7-4802-4a38-b771-84a790112c30", "baseUri": "https://ipfs.apillon.io/metadata/", "baseExtension": ".json", - "drop": true, "isSoulbound": false, "isRevokable": true, - "dropStart": 1687251003, - "dropReserve": 5, "royaltiesFees": 0.1, "royaltiesAddress": "0x4156edbafc5091507de2dd2a53ded551a346f83b", "collectionStatus": 0, "contractAddress": "0x452101C96A1Cf2cBDfa5BB5353e4a7F235241557", "transactionHash": "0x6b97424de3367cd0335b08265787b83053b62bee2d1c8bec1f776936bea4fb26", "deployerAddress": "0x4156edbafc5091507de2dd2a53ded551a346f83b", - "chain": 1287 + "drop": true, + "chain": 1287, + "dropStart": 1687251003, + "dropPrice": 0.1, + "dropReserve": 5 } ], "total": 1 @@ -1375,7 +1388,6 @@ curl --location 'https://api.apillon.io/nfts/collections' \
- ### List Collection Transactions > List NFT collections. Items are paginated and can be filtered and ordered through query parameters. @@ -1406,6 +1418,7 @@ curl --location 'https://api.apillon.io/nfts/collections' \ | Name | Type | Description | |-------------------|-------------|-------------------------------------------------------------| +| id | `number` | Internal collection id. | | status | `number` | Apillon internal/database transaction status. | | chainId | `number` | Blockchain id on which you want to release your collection. | | transactionType | `number` | Transaction type. | @@ -1474,6 +1487,7 @@ curl --location 'https://api.apillon.io/nfts/collections/:uuid/transactions' \ | 3 | Mint NFT | | 4 | Set Collection Base URI | | 5 | Burn NFT | +| 6 | Nest mint NFT | ##### Transaction Status @@ -1488,7 +1502,7 @@ curl --location 'https://api.apillon.io/nfts/collections/:uuid/transactions' \ ### Create NFT Collection -> API that creates NFT collection and deploys it on selected network. +> API endpoint that creates NFT collection and deploys it on selected network. Collection can be created with a few features/functionalities: @@ -1497,6 +1511,10 @@ Collection can be created with a few features/functionalities: - soulbound: NFTs are bound to wallet address and can't be transferred - royalties: owner can enable royalties to earn specified percentage per each NFT trade +2 types of collections are supported: +1. Generic collection +2. Nestable collection (the same as generic but allows nesting NFTs under each other) + #### POST /nfts/collections
@@ -1504,24 +1522,24 @@ Collection can be created with a few features/functionalities: #### Body fields -| Name | Type | Description | Required | -|------------------|-----------|-----------------------------------------------------------------------------------|----------| -| project_uuid | `string` | Apillon project id. | true | -| chain | `number` | Blockchain id on which you want to release your collection. | true | -| symbol | `string` | NFT collection symbol (usually 3-4 characters long). | true | -| name | `string` | NFT collection name. | true | -| description | `string` | NFT collection description. | false | -| maxSupply | `number` | Maximal number of NFTs ever in existence. | true | -| baseUri | `string` | Base URI for collection metadata (token id and file extension is appended to it). | true | -| baseExtension | `string` | File extension that is auto appended after token id to form a full URL. | true | -| isRevokable | `boolean` | For revocable collection owner can destroy NFTs at any time. | true | -| isSoulbound | `boolean` | Soul bound tokens are NFTs that are bound to wallet and not transferable. | true | -| royaltiesAddress | `string` | Address where royalties are sent to. | true | -| royaltiesFees | `number` | Percentage of royalties earned per each NFT trade. | true | -| drop | `boolean` | Determines if collection is mintable by public. | true | -| dropStart* | `number` | UNIX timestamp (in seconds) which determines public mint opening date and time. | true | -| dropPrice* | `number` | Price of NFT at mint stage. | true | -| dropReserve* | `number` | Amount of NFTs reserved by owner. | true | +| Name | Type | Description | Required | +|------------------|-----------|------------------------------------------------------------------------------------------|----------| +| collectionType | `number` | Type of smart contract to use when deploying collection (1 for generic, 2 for nestable). | true | +| chain | `number` | Blockchain id on which you want to release your collection. | true | +| symbol | `string` | NFT collection symbol (usually 3-4 characters long). | true | +| name | `string` | NFT collection name. | true | +| description | `string` | NFT collection description. | false | +| maxSupply | `number` | Maximal number of NFTs ever in existence (0 stands for unlimited). | true | +| baseUri | `string` | Base URI for collection metadata (token id and file extension is appended to it). | true | +| baseExtension | `string` | File extension that is auto appended after token id to form a full URL. | true | +| isRevokable | `boolean` | For revocable collection owner can destroy NFTs at any time. | true | +| isSoulbound | `boolean` | Soul bound tokens are NFTs that are bound to wallet and not transferable. | true | +| royaltiesAddress | `string` | Address where royalties are sent to. | true | +| royaltiesFees | `number` | Percentage of royalties earned per each NFT trade. | true | +| drop | `boolean` | Determines if collection is mintable by public. | true | +| dropStart* | `number` | UNIX timestamp (in seconds) which determines public mint opening date and time. | true | +| dropPrice* | `number` | Price of NFT at mint stage. | true | +| dropReserve* | `number` | Amount of NFTs reserved by owner. | true | **Notes:** @@ -1529,12 +1547,13 @@ Collection can be created with a few features/functionalities: *`dropStart`, `dropPrice` and `dropReserve` are only used if `drop` is set to boolean `true`. #### Possible errors +Beside validation errors (with 422 http status code) these are the error codes may be returned: -| Code | Description | -| -------- |-------------------------------------------------------------| -| 40012002 | Collection quota reached | -| 50012010 | Failed to create bucket for storing metadata. | -| 50012003 | Failed deploying NFT contract on chain. | +| Code | Description | +| -------- |-----------------------------------------------| +| 40012002 | Collection quota reached | +| 50012003 | Failed deploying NFT contract on chain. | +| 50012010 | Failed to create bucket for storing metadata. | #### Response @@ -1551,21 +1570,22 @@ curl --location 'https://api.apillon.io/nfts/collections' \ --header 'Content-Type: application/json' \ --header 'Authorization: Basic :credentials' \ --data '{ + "collectionType": 1, + "chain": 1287, "symbol": "NFT", "name": "NFT Collection", + "description": "NFT Collection description", "maxSupply": 1000, - "dropPrice": 0.1, - "project_uuid": "b8d3cb86-fde5-4d96-81af-bf47f8703e22", "baseUri": "https://ipfs.apillon.io/metadata/", "baseExtension": "json", - "drop": true, - "dropStart": 1687251003, - "dropReserve": 5, - "chain": 1287, "isRevokable": true, "isSoulbound": false, "royaltiesAddress": "0x4156edbafc5091507de2dd2a53ded551a346f83b", - "royaltiesFees": 10 + "royaltiesFees": 10, + "drop": true, + "dropStart": 1687251003, + "dropReserve": 5, + "dropPrice": 0.1 }' ``` @@ -1581,11 +1601,12 @@ curl --location 'https://api.apillon.io/nfts/collections' \ "data": { "id": 23, "status": 2, + "collectionType": 1, "collectionUuid": "d6355fd3-640d-4803-a4d9-79d875abcb5a", "projectUuid": "b8d3cb86-fde5-4d96-81af-bf47f8703e22", "symbol": "NFT", "name": "NFT Collection", - "description": null, + "description": "NFT Collection description", "maxSupply": 1000, "dropPrice": 0.1, "bucketUuid": "a9425ff7-4802-4a38-b771-84a790112c30", @@ -1634,14 +1655,15 @@ curl --location 'https://api.apillon.io/nfts/collections' \ | address | `string` | Wallet address of a new owner. | true | #### Possible errors +Beside validation errors (with 422 http status code) these are the error codes may be returned: -| Code | Description | -| -------- |-----------------------------------------------------------------------------------| -| 40012003 | Contract can't be transferred to wallet address that already owns this collection. | -| 40012004 | Transfer transaction already exists. | -| 40300000 | Not allowed to access collection | -| 50012002 | Collection doesn't exist, wasn't deployed or was already transferred. | -| 50012004 | Collection transfer failed. | +| Code | Description | +| -------- |-------------------------------------------------------------------------------------| +| 40012003 | Contract can't be transferred to wallet address that already owns this collection. | +| 40012004 | Transfer transaction already exists. | +| 40300000 | Not allowed to access collection | +| 50012002 | Collection doesn't exist, wasn't deployed or was already transferred. | +| 50012004 | Collection transfer failed. | #### Response @@ -1730,11 +1752,13 @@ curl --location 'https://api.apillon.io/nfts/collections/:uuid/transfer' \ #### Possible errors +Beside validation errors (with 422 http status code) these are the error codes may be returned: | Code | Description | | -------- |--------------------------------------------------------------------------| | 40300000 | Not allowed to access collection. | -| 50012002 | Collection doesn't exist, wasn't deployed or was already transferred. | +| 50012002 | Collection doesn't exist, wasn't deployed or was already transferred. | +| 50012005 | Error minting NFT. | | 50012007 | Total number of minted NFTs would exceed max supply for this collection. | | 50012008 | All of the reserved NFTs were already minted. | @@ -1767,30 +1791,83 @@ curl --location 'https://api.apillon.io/nfts/collections/:uuid/mint' \ "id": "b5935c73-204d-4365-9f9a-6a1792adab5b", "status": 200, "data": { - "id": 23, - "status": 2, - "collectionUuid": "d6355fd3-640d-4803-a4d9-79d875abcb5a", - "projectUuid": "b8d3cb86-fde5-4d96-81af-bf47f8703e22", - "symbol": "NFT", - "name": "NFT Collection", - "description": null, - "maxSupply": 1000, - "dropPrice": 0.1, - "bucketUuid": "a9425ff7-4802-4a38-b771-84a790112c30", - "baseUri": "https://ipfs.apillon.io/metadata/", - "baseExtension": ".json", - "drop": true, - "isSoulbound": false, - "isRevokable": true, - "dropStart": 1687251003, - "dropReserve": 5, - "royaltiesFees": 0, - "royaltiesAddress": "0x4156edbafc5091507de2dd2a53ded551a346f83b", - "collectionStatus": 0, - "contractAddress": "0x452101C96A1Cf2cBDfa5BB5353e4a7F235241557", - "transactionHash": "0x6b97424de3367cd0335b08265787b83053b62bee2d1c8bec1f776936bea4fb26", - "deployerAddress": "0x4156edbafc5091507de2dd2a53ded551a346f83b", - "chain": 1287 + "success": true + } +} +``` + + + +
+ + + +### Nest Mint Collection NFTs + +> Nest mint specified amount of NFTs under a parent NFT defined by the parent collection UUID and token id. + +#### POST /nfts/collections/:uuid/nest-mint + +
+
+ +#### URL parameters + +| Name | Description | Required | +|-------|--------------------------------------------------| -------- | +| uuid | Unique key of (child) collection we are minting. | true | + +#### Body fields + +| Name | Type | Description | Required | +|----------------------|----------|---------------------------------------------------| -------- | +| parentCollectionUuid | `string` | Collection UUID of NFT receiving nest-minted NFT. | true | +| parentNftId | `number` | Token id of NFT receiving nest-minted NFT. | true | +| quantity | `number` | Number of NFTs to nest-mint. | true | + + +#### Possible errors +Beside validation errors (with 422 http status code) these are the error codes may be returned: + +| Code | Description | +| -------- |--------------------------------------------------------------------------| +| 40300000 | Not allowed to access collection. | +| 50012002 | Collection doesn't exist, wasn't deployed or was already transferred. | +| 50012007 | Total number of minted NFTs would exceed max supply for this collection. | +| 50012008 | All of the reserved NFTs were already minted. | +| 50012013 | Parrent collection doesn't support nesting. | +| 50012014 | Parrent and child collection chain missmatch. | + +#### Response Fields + +| Field | Type | Description | +| ---------------- |-----------|-------------------| +| success | `boolean` | Status of action. | + +
+
+ + + + +```sh +curl --location 'https://api.apillon.io/nfts/collections/:uuid/next-mint' \ +--header 'Content-Type: application/json' \ +--header 'Authorization: Basic :credentials' \ +--data '{"parentCollectionUuid": "d6355fd3-640d-4803-a4d9-79d875abcb5a", "parentNftId": 1, "quantity": 1}' +``` + + + + + + +```json +{ + "id": "b5935c73-204d-4365-9f9a-6a1792adab5b", + "status": 200, + "data": { + "success": true } } ``` @@ -1825,10 +1902,13 @@ curl --location 'https://api.apillon.io/nfts/collections/:uuid/mint' \ | tokenId | `number` | Non fungible token id that we are burning. | true | #### Possible errors +Beside validation errors (with 422 http status code) these are the error codes may be returned: -| Code | Description | -| -------- |--------------------| -| 50012012 | Burning NFT failed | +| Code | Description | +| -------- |-----------------------------------------------------------------------| +| 40300000 | Not allowed to access collection. | +| 50012002 | Collection doesn't exist, wasn't deployed or was already transferred. | +| 50012012 | Burning NFT failed. | #### Response fields From 099bdfd4c152f13a96b66c8559e0478bdcf003fb Mon Sep 17 00:00:00 2001 From: Tadej Date: Wed, 9 Aug 2023 13:58:08 +0200 Subject: [PATCH 2/3] docs(nfts): finalize docs --- build/3-apillon-api.md | 176 ++++++++++++++++------------------------- 1 file changed, 70 insertions(+), 106 deletions(-) diff --git a/build/3-apillon-api.md b/build/3-apillon-api.md index 84839e49..abfe2d2b 100644 --- a/build/3-apillon-api.md +++ b/build/3-apillon-api.md @@ -1189,35 +1189,32 @@ API is for creating and managing NFTs. To prepare images and metadata you can us #### Response Fields -| Name | Type | Description | -|------------------|------------|---------------------------------------------------------------------------------------------------| -| id | `string` | Internal collection id. | -| status | `number` | Collection status. | -| collectionType | `number` | Type of smart contract to use for collection (1 for generic, 2 for nestable). | -| collectionUuid | `string` | Unique key of a collection. | -| projectUuid | `string` | Apillon project id. | -| symbol | `string` | NFT collection symbol (usually 3-4 characters long). | -| name | `string` | NFT collection name. | -| description | `string` | NFT collection description. | -| maxSupply | `number` | Maximal number of NFTs ever in existence (0 stands for unlimited). | -| bucketUuid | `string` | UUID of the bucket where metadata is stored. | -| baseUri | `string` | Base URI for collection metadata (token id and file extension is appended to it). | -| baseExtension | `string` | File extension that is auto appended after token id to form a full URL. | -| isSoulbound | `boolean` | Soul bound tokens are NFTs that are bounded to wallet and not transferable. | -| isRevokable | `boolean` | For revocable collection owner can destroy NFTs at any time. | -| royaltiesFees | `number` | Percentage (between 0 and 100) of each NFT sale sent to wallet specified under royalties address. | -| royaltiesAddress | `string` | Address where royalties are sent to. | -| collectionStatus | `number` | Apillon internal/database collection status. | -| contractAddress | `string` | Smart address of contract for deployed collection. | -| transactionHash | `string` | Deployment transaction hash/id. | -| imagesSession | `string` | | -| metadataSession | `string` | | -| deployerAddress | `string` | Wallet address of deployer. | -| chain | `number` | Blockchain id on which you want to release your collection. | -| drop | `boolean` | Determines if collection is mintable by public. | -| dropStart | `number` | UNIX timestamp which determines public mint opening date and time. | -| dropPrice | `number` | Price of NFT at mint stage. | -| dropReserve | `number` | Amount of NFTs reserved by owner. | +| Name | Type | Description | +|------------------|-------------|---------------------------------------------------------------------------------------------------| +| createTime | `DateTime` | Collection create time. | +| updateTime | `DateTime` | Collection last update time. | +| collectionType | `number` | Type of smart contract to use for collection (1 for generic, 2 for nestable). | +| collectionUuid | `string` | Unique key of a collection. | +| symbol | `string` | NFT collection symbol (usually 3-4 characters long). | +| name | `string` | NFT collection name. | +| description | `string` | NFT collection description. | +| maxSupply | `number` | Maximal number of NFTs ever in existence (0 stands for unlimited). | +| bucketUuid | `string` | UUID of the bucket where metadata is stored. | +| baseUri | `string` | Base URI for collection metadata (token id and file extension is appended to it). | +| baseExtension | `string` | File extension that is auto appended after token id to form a full URL. | +| isSoulbound | `boolean` | Soul bound tokens are NFTs that are bounded to wallet and not transferable. | +| isRevokable | `boolean` | For revocable collection owner can destroy NFTs at any time. | +| royaltiesFees | `number` | Percentage (between 0 and 100) of each NFT sale sent to wallet specified under royalties address. | +| royaltiesAddress | `string` | Address where royalties are sent to. | +| collectionStatus | `number` | Apillon internal/database collection status. | +| contractAddress | `string` | Smart address of contract for deployed collection. | +| transactionHash | `string` | Deployment transaction hash/id. | +| deployerAddress | `string` | Wallet address of deployer. | +| chain | `number` | Blockchain id on which you want to release your collection. | +| drop | `boolean` | Determines if collection is mintable by public. | +| dropStart | `number` | UNIX timestamp which determines public mint opening date and time. | +| dropPrice | `number` | Price of NFT at mint stage in token that is used on `chain`. | +| dropReserve | `number` | Amount of NFTs reserved by owner. |
@@ -1240,11 +1237,10 @@ curl --location 'https://api.apillon.io/nfts/collections/:uuid' \ "id": "b5935c73-204d-4365-9f9a-6a1792adab5b", "status": 200, "data": { - "id": 23, - "status": 2, + "createTime": "2023-06-13T10:15:58.000Z", + "updateTime": "2023-06-13T10:15:58.000Z", "collectionType": 1, "collectionUuid": "d6355fd3-640d-4803-a4d9-79d875abcb5a", - "projectUuid": "b8d3cb86-fde5-4d96-81af-bf47f8703e22", "symbol": "NFT", "name": "NFT Collection", "description": "NFT Collection Description", @@ -1275,16 +1271,6 @@ curl --location 'https://api.apillon.io/nfts/collections/:uuid' \
-##### Statuses - -| Number | Description | -|--------|---------------------| -| 1 | Draft | -| 2 | Incomplete | -| 5 | Active | -| 8 | Marked for deletion | -| 9 | Deleted | - ##### Collection Type | Number | Description | @@ -1315,14 +1301,14 @@ curl --location 'https://api.apillon.io/nfts/collections/:uuid' \ #### Query parameters -| Name | Description | Required | -|---------|-------------------------------------------------------------------------------------------------------|----------| -| status | Collection status. | false | -| search | Search by collection name. | false | -| page | Collections are paginated by default. This parameter is used to get collections from a specific page. | false | -| limit | Number of files on a page (default: 20). | false | -| orderBy | One or multiple properties, separated by a comma, used to order data. | false | -| desc | `Boolean` values, mapped to the index of the `orderBy` parameter. Defaults to false. | false | +| Name | Description | Required | +|------------------|-------------------------------------------------------------------------------------------------------|----------| +| collectionStatus | Collection status. | false | +| search | Search by collection name. | false | +| page | Collections are paginated by default. This parameter is used to get collections from a specific page. | false | +| limit | Number of files on a page (default: 20). | false | +| orderBy | One or multiple properties, separated by a comma, used to order data. | false | +| desc | `Boolean` values, mapped to the index of the `orderBy` parameter. Defaults to false. | false | #### Response Response is a list of items described [under Response Fields above](#get-nft-collection). @@ -1350,11 +1336,10 @@ curl --location 'https://api.apillon.io/nfts/collections' \ "data": { "items": [ { - "id": 23, - "status": 2, + "createTime": "2023-06-13T10:15:58.000Z", + "updateTime": "2023-06-13T10:15:58.000Z", "collectionType": 1, "collectionUuid": "d6355fd3-640d-4803-a4d9-79d875abcb5a", - "projectUuid": "b8d3cb86-fde5-4d96-81af-bf47f8703e22", "symbol": "NFT", "name": "NFT Collection", "description": "NFT Collection Description", @@ -1370,8 +1355,8 @@ curl --location 'https://api.apillon.io/nfts/collections' \ "contractAddress": "0x452101C96A1Cf2cBDfa5BB5353e4a7F235241557", "transactionHash": "0x6b97424de3367cd0335b08265787b83053b62bee2d1c8bec1f776936bea4fb26", "deployerAddress": "0x4156edbafc5091507de2dd2a53ded551a346f83b", - "drop": true, "chain": 1287, + "drop": true, "dropStart": 1687251003, "dropPrice": 0.1, "dropReserve": 5 @@ -1405,26 +1390,26 @@ curl --location 'https://api.apillon.io/nfts/collections' \ #### Query parameters -| Name | Description | Required | -|---------|---------------------------------------------------------------------------------------------------------|----------| -| status | Transaction status. | false | -| search | Search by transaction hash. | false | -| page | Transactions are paginated by default. This parameter is used to get transactions from a specific page. | false | -| limit | Number of transactions on a page (default: 20). | false | -| orderBy | One or multiple properties, separated by a comma, used to order data. | false | -| desc | `Boolean` values, mapped to the index of the `orderBy` parameter. Defaults to false. | false | +| Name | Description | Required | +|-------------------|---------------------------------------------------------------------------------------------------------|----------| +| transactionStatus | Transaction status. | false | +| transactionType | Transaction type. | false | +| search | Search by transaction hash. | false | +| page | Transactions are paginated by default. This parameter is used to get transactions from a specific page. | false | +| limit | Number of transactions on a page (default: 20). | false | +| orderBy | One or multiple properties, separated by a comma, used to order data. | false | +| desc | `Boolean` values, mapped to the index of the `orderBy` parameter. Defaults to false. | false | #### Response Fields | Name | Type | Description | |-------------------|-------------|-------------------------------------------------------------| -| id | `number` | Internal collection id. | -| status | `number` | Apillon internal/database transaction status. | | chainId | `number` | Blockchain id on which you want to release your collection. | | transactionType | `number` | Transaction type. | | transactionStatus | `number` | Transaction status | | transactionHash | `number` | Transaction hash/id. | | updateTime | `DateTime` | Transaction last update time. | +| createTime | `DateTime` | Transaction create time. |
@@ -1449,13 +1434,12 @@ curl --location 'https://api.apillon.io/nfts/collections/:uuid/transactions' \ "data": { "items": [ { - "id": 7, - "status": 5, "chainId": 1287, "transactionType": 1, "transactionStatus": 1, "transactionHash": "0xb988c8cda7ec8b441611b208360e0aace9c294e1ca5672375b21e815890a54d1", - "updateTime": "2023-06-13T10:15:58.000Z" + "updateTime": "2023-06-13T10:15:58.000Z", + "createTime": "2023-06-13T10:15:58.000Z" } ], "total": 1 @@ -1468,16 +1452,6 @@ curl --location 'https://api.apillon.io/nfts/collections/:uuid/transactions' \
-##### Statuses - -| Number | Description | -|--------|---------------------| -| 1 | Draft | -| 2 | Incomplete | -| 5 | Active | -| 8 | Marked for deletion | -| 9 | Deleted | - ##### Transaction Types | Number | Description | @@ -1599,31 +1573,30 @@ curl --location 'https://api.apillon.io/nfts/collections' \ "id": "b5935c73-204d-4365-9f9a-6a1792adab5b", "status": 200, "data": { - "id": 23, - "status": 2, + "createTime": "2023-06-13T10:15:58.000Z", + "updateTime": "2023-06-13T10:15:58.000Z", "collectionType": 1, "collectionUuid": "d6355fd3-640d-4803-a4d9-79d875abcb5a", - "projectUuid": "b8d3cb86-fde5-4d96-81af-bf47f8703e22", "symbol": "NFT", "name": "NFT Collection", - "description": "NFT Collection description", + "description": "NFT Collection Description", "maxSupply": 1000, - "dropPrice": 0.1, "bucketUuid": "a9425ff7-4802-4a38-b771-84a790112c30", "baseUri": "https://ipfs.apillon.io/metadata/", "baseExtension": ".json", - "drop": true, "isSoulbound": false, "isRevokable": true, - "dropStart": 1687251003, - "dropReserve": 5, - "royaltiesFees": 0, + "royaltiesFees": 0.1, "royaltiesAddress": "0x4156edbafc5091507de2dd2a53ded551a346f83b", "collectionStatus": 0, "contractAddress": "0x452101C96A1Cf2cBDfa5BB5353e4a7F235241557", "transactionHash": "0x6b97424de3367cd0335b08265787b83053b62bee2d1c8bec1f776936bea4fb26", "deployerAddress": "0x4156edbafc5091507de2dd2a53ded551a346f83b", - "chain": 1287 + "chain": 1287, + "drop": true, + "dropStart": 1687251003, + "dropPrice": 0.1, + "dropReserve": 5 } } ``` @@ -1692,30 +1665,30 @@ curl --location 'https://api.apillon.io/nfts/collections/:uuid/transfer' \ "id": "b5935c73-204d-4365-9f9a-6a1792adab5b", "status": 200, "data": { - "id": 23, - "status": 2, + "createTime": "2023-06-13T10:15:58.000Z", + "updateTime": "2023-06-13T10:15:58.000Z", + "collectionType": 1, "collectionUuid": "d6355fd3-640d-4803-a4d9-79d875abcb5a", - "projectUuid": "b8d3cb86-fde5-4d96-81af-bf47f8703e22", "symbol": "NFT", "name": "NFT Collection", - "description": null, + "description": "NFT Collection Description", "maxSupply": 1000, - "dropPrice": 0.1, "bucketUuid": "a9425ff7-4802-4a38-b771-84a790112c30", "baseUri": "https://ipfs.apillon.io/metadata/", "baseExtension": ".json", - "drop": true, "isSoulbound": false, "isRevokable": true, - "dropStart": 1687251003, - "dropReserve": 5, - "royaltiesFees": 0, + "royaltiesFees": 0.1, "royaltiesAddress": "0x4156edbafc5091507de2dd2a53ded551a346f83b", "collectionStatus": 0, "contractAddress": "0x452101C96A1Cf2cBDfa5BB5353e4a7F235241557", "transactionHash": "0x6b97424de3367cd0335b08265787b83053b62bee2d1c8bec1f776936bea4fb26", "deployerAddress": "0x4156edbafc5091507de2dd2a53ded551a346f83b", - "chain": 1287 + "chain": 1287, + "drop": true, + "dropStart": 1687251003, + "dropPrice": 0.1, + "dropReserve": 5 } } ``` @@ -1916,15 +1889,6 @@ Beside validation errors (with 422 http status code) these are the error codes m | ---------------- |-----------|-------------------| | success | `boolean` | Status of action. | -Deployment goes through different stages and each stage updates `deploymentStatus`. Possible deployment statuses: - -| Status | Description | -| ------ | --------------------- | -| 0 | Deployment initiated | -| 1 | In processing | -| 10 | Deployment successful | -| 100 | Deployment failed | -
From 9bda1e949d71fdb8ded23137c736ecc3c59dfb68 Mon Sep 17 00:00:00 2001 From: Tadej Date: Wed, 4 Oct 2023 12:00:00 +0000 Subject: [PATCH 3/3] docs(nfts): add internal links and better explain NFT collection types --- build/3-apillon-api.md | 58 +++++++++++++++++++++--------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/build/3-apillon-api.md b/build/3-apillon-api.md index db87fde7..46529f69 100644 --- a/build/3-apillon-api.md +++ b/build/3-apillon-api.md @@ -1191,32 +1191,32 @@ API is for creating and managing NFTs. To prepare images and metadata you can us #### Response Fields -| Name | Type | Description | -|------------------|-------------|---------------------------------------------------------------------------------------------------| -| createTime | `DateTime` | Collection create time. | -| updateTime | `DateTime` | Collection last update time. | -| collectionType | `number` | Type of smart contract to use for collection (1 for generic, 2 for nestable). | -| collectionUuid | `string` | Unique key of a collection. | -| symbol | `string` | NFT collection symbol (usually 3-4 characters long). | -| name | `string` | NFT collection name. | -| description | `string` | NFT collection description. | -| maxSupply | `number` | Maximal number of NFTs ever in existence (0 stands for unlimited). | -| bucketUuid | `string` | UUID of the bucket where metadata is stored. | -| baseUri | `string` | Base URI for collection metadata (token id and file extension is appended to it). | -| baseExtension | `string` | File extension that is auto appended after token id to form a full URL. | -| isSoulbound | `boolean` | Soul bound tokens are NFTs that are bounded to wallet and not transferable. | -| isRevokable | `boolean` | For revocable collection owner can destroy NFTs at any time. | -| royaltiesFees | `number` | Percentage (between 0 and 100) of each NFT sale sent to wallet specified under royalties address. | -| royaltiesAddress | `string` | Address where royalties are sent to. | -| collectionStatus | `number` | Apillon internal/database collection status. | -| contractAddress | `string` | Smart address of contract for deployed collection. | -| transactionHash | `string` | Deployment transaction hash/id. | -| deployerAddress | `string` | Wallet address of deployer. | -| chain | `number` | Blockchain id on which you want to release your collection. | -| drop | `boolean` | Determines if collection is mintable by public. | -| dropStart | `number` | UNIX timestamp which determines public mint opening date and time. | -| dropPrice | `number` | Price of NFT at mint stage in token that is used on `chain`. | -| dropReserve | `number` | Amount of NFTs reserved by owner. | +| Name | Type | Description | +|------------------|-------------|----------------------------------------------------------------------------------------------------------| +| createTime | `DateTime` | Collection create time. | +| updateTime | `DateTime` | Collection last update time. | +| collectionType | `number` | Type of smart contract to use for collection. Available types are described [here](#collection-types). | +| collectionUuid | `string` | Unique key of a collection. | +| symbol | `string` | NFT collection symbol (usually 3-4 characters long). | +| name | `string` | NFT collection name. | +| description | `string` | NFT collection description. | +| maxSupply | `number` | Maximal number of NFTs ever in existence (0 stands for unlimited). | +| bucketUuid | `string` | UUID of the bucket where metadata is stored. | +| baseUri | `string` | Base URI for collection metadata (token id and file extension is appended to it). | +| baseExtension | `string` | File extension that is auto appended after token id to form a full URL. | +| isSoulbound | `boolean` | Soul bound tokens are NFTs that are bounded to wallet and not transferable. | +| isRevokable | `boolean` | For revocable collection owner can destroy NFTs at any time. | +| royaltiesFees | `number` | Percentage (between 0 and 100) of each NFT sale sent to wallet specified under royalties address. | +| royaltiesAddress | `string` | Address where royalties are sent to. | +| collectionStatus | `number` | Apillon internal/database collection status. | +| contractAddress | `string` | Smart address of contract for deployed collection. | +| transactionHash | `string` | Deployment transaction hash/id. | +| deployerAddress | `string` | Wallet address of deployer. | +| chain | `number` | Blockchain id on which you want to release your collection. | +| drop | `boolean` | Determines if collection is mintable by public. | +| dropStart | `number` | UNIX timestamp which determines public mint opening date and time. | +| dropPrice | `number` | Price of NFT at mint stage in token that is used on `chain`. | +| dropReserve | `number` | Amount of NFTs reserved by owner. |
@@ -1305,7 +1305,7 @@ curl --location 'https://api.apillon.io/nfts/collections/:uuid' \ | Name | Description | Required | |------------------|-------------------------------------------------------------------------------------------------------|----------| -| collectionStatus | Collection status. | false | +| collectionStatus | Collection status. Find available statuses [here](#collection-statuses). | false | | search | Search by collection name. | false | | page | Collections are paginated by default. This parameter is used to get collections from a specific page. | false | | limit | Number of files on a page (default: 20). | false | @@ -1488,8 +1488,8 @@ Collection can be created with a few features/functionalities: - royalties: owner can enable royalties to earn specified percentage per each NFT trade 2 types of collections are supported: -1. Generic collection -2. Nestable collection (the same as generic but allows nesting NFTs under each other) +1. Generic collection (based on [OpenZeppelins ERC-721](https://docs.openzeppelin.com/contracts/3.x/erc721) NFT standard) +2. Nestable collection which allows nesting NFTs under each other (based on [RMRKs ERC-7401](https://evm.rmrk.app/general-overview/rmrk-legos/nestable) NFT standard) #### POST /nfts/collections