Items

Grant an item to a player

post

Mints an item of a given item type to the specified player. If name, description, image, or attributes are not provided, the item will be granted with the default metadata configured on the item type. On-chain, granting an item means an NFT is minted from the collection associated with the item type to the wallet of the given player.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Header parameters
x-mythical-environment-idstring · uuidRequired

Identifier for the environment that this request should interact with

x-idempotency-keystring · max: 64Required

A unique identifier for the request. If the request is repeated with the same idempotency key, the response will be the same as the first request. Recommend using a UUID or ULID

Body
itemTypeIdstring · max: 64Required

Unique identifier of the item

ownerPlayerIdstring · max: 64Required

The id of the player who owns the item

tokenIdintegerOptional

The on-chain unique identifier of the item within its given collection. The token id of the item is displayed in the Mythical Marketplace.

Example: 1
tagsstring[]Optional
Responses
post
/v1/items

Search items

post

Retrieve a list of items. Supports filtering, sorting, and pagination.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Header parameters
x-mythical-environment-idstring · uuidRequired

Identifier for the environment that this request should interact with

Body
idsstring[]Optional

An array of items ids to search for.

itemTypeIdsstring[]Optional

An array of item type ids to find matching item instances for

ownerPlayerIdsstring[]Optional

An array of player ids who own the items you are interested in searching for

statesstring · string[]Optional

The current blockchain state of the items you are searching for

limitintegerOptional

The maximum number of items you would like returned in this search

Example: 10
skipintegerOptional

How many records should be skipped in the result set before returning results?

Example: 10
Responses
post
/v1/items/search
200

Success

Get an item

get

Retrieve a single item by id.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
itemIdstringRequired
Header parameters
x-mythical-environment-idstring · uuidRequired

Identifier for the environment that this request should interact with

Responses
get
/v1/items/{itemId}
200

Success

Update an item

put

Update an item

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
itemIdstringRequired
Header parameters
x-mythical-environment-idstring · uuidRequired

Identifier for the environment that this request should interact with

x-idempotency-keystring · max: 64Required

A unique identifier for the request. If the request is repeated with the same idempotency key, the response will be the same as the first request. Recommend using a UUID or ULID

Body
Responses
put
/v1/items/{itemId}
200

Success

Transfer an item from one player to another

post

On-chain, this will transfer the item between the wallets of the provided players.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
itemIdstringRequired

The id of the item to transfer

Header parameters
x-mythical-environment-idstring · uuidRequired

Identifier for the environment that this request should interact with

x-idempotency-keystring · max: 64Required

A unique identifier for the request. If the request is repeated with the same idempotency key, the response will be the same as the first request. Recommend using a UUID or ULID

Body
fromPlayerIdstring · max: 64Required

Player from which the item will be transferred

toPlayerIdstring · max: 64Required

Player to which the item will be transferred

Responses
post
/v1/items/{itemId}/transfer
200

Success

Burn an item

post

On-chain, this will irreversably transfer the item to the zero address (0x000...), effectively destroying the item.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
itemIdstringRequired
Header parameters
x-mythical-environment-idstring · uuidRequired

Identifier for the environment that this request should interact with

x-idempotency-keystring · max: 64Required

A unique identifier for the request. If the request is repeated with the same idempotency key, the response will be the same as the first request. Recommend using a UUID or ULID

Responses
post
/v1/items/{itemId}/burn
200

Success

Last updated