Managing a Collection
Collections can be updated once created in the database. Once deployed, however, certain fields are not modifiable anymore.
In order to update a Collection we use the JSON Patch endpoint Collection/{id}
. Currently, the only fields that can be modified once the collection has been deployed are:
- /Visibility - Which controls whether the collection is in
PreReveal
orRevealed
state. - /RoyaltyPercentage
- /FileSource - Which can be
Web2
orIpfs
. The latter will expose contractURI and tokenURI links through the IPFS protocol, while the former will use a Web2 HTTPS gateway.
Remember that, in order to see the effects on chain, you'll need to /resync
.
curl --request PATCH \
--header 'Content-Type: application/json-patch+json' \
--data '[
{
"path": "/Visibility",
"op": "add",
"value": "Revealed"
}
]'
A standard request to change the collection visibility from PreReveal to Revealed would look something like this (plus base URL and Authorization). Do remember that the Content-Type for this request must be application/json-patch+json
.
Updated 5 months ago