Nft.register

From Safe Creative API
Jump to navigation Jump to search

Registers an external NFT associated to a work.

A NFT info page will be generated in IPFS.

This call requires a nonce key

Info

  • Component name: nft.register
  • Signature: Requires signature using the authkey's private key
  • Timestamp: Requires ztime parameter
  • Nonce key: Requires a nonce key
  • Authorization level: ADD
  • API trust level: Partner

Parameters

  • authkey*: Authorization key
  • ztime*: Z-Timestamp
  • noncekey*: nonce key
  • workcode*: Code of the work associated to the NFT. The work must be in REGISTERED state.
  • tokentype*: NFT type (ERC720 or ERC1155)
  • network*: Blockchain network (ETHEREUM, POLYGON,...)
  • smartcontract*: Address of smart contract (0x...)
  • tokenid*: NFT token ID
  • wallet*: Minter wallet address (0x...)
  • language*: Language for info page
    • en: English
    • es: Spanish
  • supply: NFT issues supply (for ERC1155) defaults to 1
  • exclusive: 1 to mark this NFT as exclusive (no other NFT exists for the work)
  • licensetype: Type of license granted by the NFT
    • PRIVATE: Non-commercial end user
    • PROFESSIONAL: Professional end user
    • DISTRIBUTION: Distributor
    • CUSTOM: Custom license, must be accompanied by the customlicense parameter
  • customlicense: Full license text explaining the rights granted by the NFT over the work (for CUSTOM licensetype)
  • licenserights: Text explaining the rights or kind of usage granted by the NFT over the work
  • licenselimitations: Text explaining any limitations on the usage described by licenserights
    • Eg. geographic limits, kind of allowed projects,...
  • numberofuses: Number of uses or copies of the work allowed by this NFT
    • For licenserights allowing to create physical copies of the work, this field will specify how many copies are allowed
  • validuntil: Date limit for the rights granted by this NFT
    • Date format: yyyy-mm-ddThh:mm:ssZ
  • allowresale: 1 if this NFT can be resold by its owner, 0 otherwise (defaults to 1)
  • royaltywalletN: (multivalue) wallet address that receives royalties on sales of the NFT
  • royaltypercentN: (multivalue, integer) % of the sale price received as royalties by the corresponding wallet
    • There must be the same number of royaltywallet and royaltypercent parameters
  • imageurl*: HTTP or IPFS url of the NFT image
  • audiourl: HTTP or IPFS url of the NFT audio file
  • videourl: HTTP or IPFS url of the NFT video file

Returns

  • nftregistry
    • id: NFT registration internal ID
    • workCode: Code of the registered work
    • licenseIpfsUrl: IPFS url of the generated NFT info page

Example

REQUEST:

https://api.safecreative.org/v2/
?component=nft.register
&authkey=28c2cvwp1iljjgoai4u0v57mk
&noncekey=1jnpyhwkmowihrlwix5qls204
&workcode=2204200018768
&network=ETHEREUM
&smartcontract=0x0000000000
&tokenid=7890
&tokentype=ERC1155
&wallet=0xc9AEBf2e4c05e2674cc59E20C9E526a36c785252
&imageurl=ipfs%3A%2F%2Fipfs%2FQmZP3nkJiAFyLAkRgZjcqjJWVg53ZyqfueftUzmB8g7Mio
&audiourl=ipfs%3A%2F%2Fipfs%2FQmWqmqEPjCewqLzDcSmmuN5pKV1MsWqN1CvsJWqb46Aka1%2Fanimation.mp3
&language=en
&licenselimitations=Sport+transmissions+and+private+events
&licenserights=Public+reproduction
&licensetype=PROFESSIONAL
&ztime=1650445718415
&signature=b4e3ddacc5776b8dcb2c86b4e1e8571c2c1362bd

RESPONSE:

<?xml version="1.0" encoding="UTF-8"?>
<nftregistry>
  <id>0d245973-1371-4271-b595-b87c4f7ae1ac</id>
  <workCode>2204200018768</workCode>
  <licenseIpfsUrl>ipfs://ipfs/QmSpSfkRPU4iBQh9Vq82Y6AGe86zjxUPyKP8RFn1dde4PF/info.html</licenseIpfsUrl>
</nftregistry>