Lock items
Once an item is created and its metadata set, you need to explicitly lock it so the following actions can happen for this item :
- Listing
- Minting
- Transferring
- Sending via an email claim
Issue a POST
request to the items/lock
endpoint to lock one or multiple items.
POST https://admin-api.phosphor.xyz/v1/items/lock
- collection_id
- item_id and token_id (ERC-721)
- item_id, token_id, and max_supply (ERC-1155)
- item_ids (ERC-721)
{
"collection_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
{
"item_id": "3fa85f64-5717-4562-b3fc-2c963f66afa8",
"token_id": "5"
}
{
"item_id": "3fa85f64-5717-4562-b3fc-2c963f66afa8",
"max_supply": "50",
"token_id": "1"
}
{
"item_ids": [
"3fa85f64-5717-4562-b3fc-2c963f66afa8",
"3fa85f64-5717-4562-b3fc-2c963f66afa9"
]
}
The three ways to specify the items to lock are:
item_id
- Locks a single item.item_ids
- Locks a list of items by their IDs.collection_id
- Locks all remaining unlocked items in a collection.
When specifying individual items, each item should be unlocked, or the request fails.
There are two additional parameters in the payload:
max_supply
- For ERC-721s, it should be 1 (default). For ERC-1155s, it should be greater than 0. The default is the max value of a web3 uint256.token_id
- This can only be set for a single item and if the token ID assignment strategy of the collection is set toMANUAL
.