Mythical Platform
Mythical Platform
  • The Mythical Platform API
  • Quick start
    • Authenticate
    • Create a guest player
    • Create an item type
    • Grant an item to a player
    • Update item metadata
    • Use webhooks for real time messages
    • Buy a listed item
  • API Reference
    • Players
    • Item Types
    • Items
    • Marketplace
      • Listings
      • Offers
      • Quick trade
      • Transaction history
      • Exchange rate
    • Webhook management
    • System
Powered by GitBook
On this page
  1. API Reference

Players

PreviousBuy a listed itemNextItem Types

Last updated 7 months ago

Create a player for the title_id

post

Allows a player to be created without having gone through registration, enabling a frictionless first time user experience including asset ownership.

Authorizations
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
201
Success
application/json
post
POST /v1/players HTTP/1.1
Host: 
Authorization: Bearer JWT
x-mythical-environment-id: 123e4567-e89b-12d3-a456-426614174000
x-idempotency-key: text
Accept: */*
201

Success

{
  "id": "9779f02d-5193-4ab1-ae15-f18e091f38e1"
}

Get a player

get

Retrieve a single player by their id.

Authorizations
Path parameters
playerIdstringRequired
Header parameters
x-mythical-environment-idstring · uuidRequired

Identifier for the environment that this request should interact with

Responses
200
Player
application/json
404
Player not found
application/json
get
GET /v1/players/{playerId} HTTP/1.1
Host: 
Authorization: Bearer JWT
x-mythical-environment-id: 123e4567-e89b-12d3-a456-426614174000
Accept: */*
{
  "id": "9779f02d-5193-4ab1-ae15-f18e091f38e1"
}

Get player inventory

get

Retrieves a list of items owned by a given player.

Authorizations
Path parameters
playerIdstringRequired
Header parameters
x-mythical-environment-idstring · uuidRequired

Identifier for the environment that this request should interact with

Responses
200
Success
application/json
get
GET /v1/players/{playerId}/items HTTP/1.1
Host: 
Authorization: Bearer JWT
x-mythical-environment-id: 123e4567-e89b-12d3-a456-426614174000
Accept: */*
200

Success

[
  {
    "id": "text",
    "itemTypeId": "text",
    "ownerPlayerId": "text",
    "tokenId": 1,
    "state": "pending",
    "metadataUrl": "http://url.com/1",
    "metadata": {
      "name": "text",
      "description": "text",
      "image": "text",
      "attributes": [
        {
          "type": "attributeName",
          "value": "attrValue",
          "displayType": "number, boolean, string",
          "maxValue": 255
        }
      ]
    },
    "tags": [
      "text"
    ]
  }
]
  • POSTCreate a player for the title_id
  • GETGet a player
  • POSTLink a player to a registered Mythical account
  • GETGet player inventory

Link a player to a registered Mythical account

post

Player linking allows a player to be connected to a Mythical account and wallet. This allows players to progress and acquire on-chain assets and then link those to a Mythical account for marketplace trading. Linking a player is a one time operation that cannot be reversed. Only one player (per environment) can be linked to a Mythical account.

Authorizations
Path parameters
playerIdstringRequired

The identifier of the player to be linked.

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
registeredAccountJwtstringRequired

bearer token for the registered Mythical account

Responses
204
Player linked
401
Unauthorized
application/json
post
POST /v1/players/{playerId}/link HTTP/1.1
Host: 
Authorization: Bearer JWT
x-mythical-environment-id: 123e4567-e89b-12d3-a456-426614174000
x-idempotency-key: text
Content-Type: application/json
Accept: */*
Content-Length: 30

{
  "registeredAccountJwt": "jwt"
}

No content