Integration
  • Overview
  • Getting Started
  • SDK Integration
    • Standard
    • Advanced
  • Game API
    • Overview
    • Games
    • Collections
    • Tokens
    • Marketplace
    • Transactions
    • Users
  • Misc
    • FAQ
    • Best Practices
    • Staging Environment
    • Account Management
    • Webhooks
    • IAP Setup
      • Android. How to create IAP Vessel Product
        • How to find Product ID
        • How to get Public Key
        • How to setup Google Service Account and get Credentials JSON File
      • iOS. How to create IAP Vessel Product
        • How to find Product ID
Powered by GitBook
On this page

Was this helpful?

  1. Game API

Games

PreviousOverviewNextCollections

Last updated 2 years ago

Was this helpful?

* is a required field

Make sure to use your X-Auth-Token when making a POST request. Your X-Auth-Token is the private key associated to your ERC-20 wallet.

Create Game

Create a new game

Create a new game multipart

create vs create-multipart

You need to upload the image somewhere and post the URL when you use /games/manage/create API. Once it is created, we store image data in our DB.

On the other hand, you can post the image binary directly to us if you use /game/manage/create-multipart API.

Game Metadata

Update game metadata

Update game metadata multipart

Game Lookup

Lookup the game by fqGn

You can get the game details by fqGn.

Lookup the game by platform and package name

You can get the game details by platform and package name.

get
Path parameters
fqGnstringRequired
Responses
200
OK
*/*
400
Bad Request
*/*
401
Unauthorized
*/*
403
Forbidden
*/*
404
Not Found
*/*
405
Method Not Allowed
*/*
409
Conflict
*/*
429
Too Many Requests
*/*
500
Internal Server Error
*/*
get
GET /games/{fqGn} HTTP/1.1
Host: game-api.openvessel.io
Accept: */*
{
  "response": {
    "fqGn": "text",
    "createdAt": 1,
    "displayName": "text",
    "displayInDiscovery": true,
    "description": "text",
    "contractAddress": "text",
    "owner": "text",
    "imageUrl": "text",
    "backgroundImageUrl": "text",
    "appInfoList": [
      {
        "packageName": "text",
        "publicKey": "text",
        "platform": "iOS"
      }
    ]
  }
}
get
Path parameters
platformstringRequired
packageNamestringRequired
Responses
200
OK
*/*
400
Bad Request
*/*
401
Unauthorized
*/*
403
Forbidden
*/*
404
Not Found
*/*
405
Method Not Allowed
*/*
409
Conflict
*/*
429
Too Many Requests
*/*
500
Internal Server Error
*/*
get
GET /games/{platform}/{packageName} HTTP/1.1
Host: game-api.openvessel.io
Accept: */*
{
  "response": {
    "fqGn": "text",
    "createdAt": 1,
    "displayName": "text",
    "displayInDiscovery": true,
    "description": "text",
    "contractAddress": "text",
    "owner": "text",
    "imageUrl": "text",
    "backgroundImageUrl": "text",
    "appInfoList": [
      {
        "packageName": "text",
        "publicKey": "text",
        "platform": "iOS"
      }
    ]
  }
}
  • Create Game
  • Create a new game
  • POSTCreate a new game with images url
  • Create a new game multipart
  • POSTCreate a new game with images upload
  • create vs create-multipart
  • Game Metadata
  • Update game metadata
  • POSTUpdate metadata
  • Update game metadata multipart
  • POSTUpdate metadata with image upload
  • Game Lookup
  • Lookup the game by fqGn
  • GET/games/{fqGn}
  • Lookup the game by platform and package name
  • GET/games/{platform}/{packageName}

Create a new game with images url

post
Header parameters
X-Auth-KeystringRequiredExample: ababa71162175e6867058b271eea7b5b279326eaf646188ab5e37365f32bb353Pattern: [0-9a-fA-F]{64}
X-OpenVessel-Request-IdanyOptional

Unique Request Id that makes APIs idempotent. If two requests have the same ID, one of them will fail.

Example: ab62663d-1645-4026-ba2d-d888b9634de9
Body
fqGnstring · max: 255Required

Fully Qualified Game Name

Example: com.studio.gamePattern: ^[a-z]{2,6}\.(\b[a-z0-9-]{1,59}\b)\.(\b[a-z0-9-]{1,59}\b)
ownerstringRequired

Owner address

Example: 0xcafe000102030405060708090a0b0c0d0e0fbeefPattern: ^0x[a-fA-F0-9]{40}$
displayNamestring · max: 255Required

Display name

Example: Super Game
displayInDiscoverybooleanOptional

The flag that controls display in the Discovery

Default: trueExample: true
gameTypestringOptional

The type of the game

Default: GAMEExample: GAMEPattern: GAME|APP
descriptionstring · max: 2000Required

Game description

Example: Super Game for everyone and everywhere
imageUrlstring · max: 255Required

Main image

Example: Game imagePattern: ^(http|https)://[-a-zA-Z0-9+&@#/%?=~_|,!:.;]*[-a-zA-Z0-9+@#/%=&_|]\.(?:jpg|jpeg|png)$
backgroundImageUrlstring · max: 255Required

Background image

Example: Game background imagePattern: ^(http|https)://[-a-zA-Z0-9+&@#/%?=~_|,!:.;]*[-a-zA-Z0-9+@#/%=&_|]\.(?:jpg|jpeg|png)$
Responses
200
OK
*/*
400
Bad Request
*/*
401
Unauthorized
*/*
403
Forbidden
*/*
404
Not Found
*/*
405
Method Not Allowed
*/*
409
Conflict
*/*
429
Too Many Requests
*/*
500
Internal Server Error
*/*
post
POST /games/manage/create HTTP/1.1
Host: game-api.openvessel.io
X-Auth-Key: text
Content-Type: application/json
Accept: */*
Content-Length: 415

{
  "fqGn": "com.studio.game",
  "owner": "0xcafe000102030405060708090a0b0c0d0e0fbeef",
  "displayName": "Super Game",
  "displayInDiscovery": true,
  "gameType": "GAME",
  "description": "Super Game for everyone and everywhere",
  "appInfoSet": [
    {
      "packageName": "text",
      "publicKey": "text",
      "platform": "iOS"
    }
  ],
  "beneficiaries": {
    "0xcafe000102030405060708090a0b0c0d0e0fbeef": 100
  },
  "imageUrl": "Game image",
  "backgroundImageUrl": "Game background image"
}
{
  "response": {
    "txHash": "text",
    "description": "text",
    "details": {
      "fqGn": "text",
      "createdAt": 1,
      "displayName": "text",
      "displayInDiscovery": true,
      "description": "text",
      "contractAddress": "text",
      "owner": "text",
      "imageUrl": "text",
      "backgroundImageUrl": "text",
      "appInfoList": [
        {
          "packageName": "text",
          "publicKey": "text",
          "platform": "iOS"
        }
      ]
    }
  }
}

Create a new game with images upload

post
Header parameters
X-Auth-KeystringRequiredExample: ababa71162175e6867058b271eea7b5b279326eaf646188ab5e37365f32bb353Pattern: [0-9a-fA-F]{64}
X-OpenVessel-Request-IdanyOptional

Unique Request Id that makes APIs idempotent. If two requests have the same ID, one of them will fail.

Example: ab62663d-1645-4026-ba2d-d888b9634de9
Body
imagestring · binaryRequired
backgroundImagestring · binaryRequired
Responses
200
OK
*/*
400
Bad Request
*/*
401
Unauthorized
*/*
403
Forbidden
*/*
404
Not Found
*/*
405
Method Not Allowed
*/*
409
Conflict
*/*
429
Too Many Requests
*/*
500
Internal Server Error
*/*
post
POST /games/manage/create-multipart HTTP/1.1
Host: game-api.openvessel.io
X-Auth-Key: text
Content-Type: multipart/form-data
Accept: */*
Content-Length: 399

{
  "data": {
    "fqGn": "com.studio.game",
    "owner": "0xcafe000102030405060708090a0b0c0d0e0fbeef",
    "displayName": "Super Game",
    "displayInDiscovery": true,
    "gameType": "GAME",
    "description": "Super Game for everyone and everywhere",
    "appInfoSet": [
      {
        "packageName": "text",
        "publicKey": "text",
        "platform": "iOS"
      }
    ],
    "beneficiaries": {
      "0xcafe000102030405060708090a0b0c0d0e0fbeef": 100
    }
  },
  "image": "binary",
  "backgroundImage": "binary"
}
{
  "response": {
    "txHash": "text",
    "description": "text",
    "details": {
      "fqGn": "text",
      "createdAt": 1,
      "displayName": "text",
      "displayInDiscovery": true,
      "description": "text",
      "contractAddress": "text",
      "owner": "text",
      "imageUrl": "text",
      "backgroundImageUrl": "text",
      "appInfoList": [
        {
          "packageName": "text",
          "publicKey": "text",
          "platform": "iOS"
        }
      ]
    }
  }
}

Update metadata

post
Path parameters
fqCnstringRequired

Fully Qualified Collection Name

Example: com.studio.game.collection
Header parameters
X-Auth-KeystringRequiredExample: ababa71162175e6867058b271eea7b5b279326eaf646188ab5e37365f32bb353Pattern: [0-9a-fA-F]{64}
Body
displayNamestringOptional

New display name

descriptionstringOptional

New description

imageUrlstringOptional

New image URL

Responses
200
OK
400
Bad Request
*/*
401
Unauthorized
*/*
403
Forbidden
*/*
404
Not Found
*/*
405
Method Not Allowed
*/*
409
Conflict
*/*
429
Too Many Requests
*/*
500
Internal Server Error
*/*
post
POST /collections/manage/{fqCn}/update-metadata HTTP/1.1
Host: game-api.openvessel.io
X-Auth-Key: text
Content-Type: application/json
Accept: */*
Content-Length: 61

{
  "displayName": "text",
  "description": "text",
  "imageUrl": "text"
}

No content

Update metadata with image upload

post
Path parameters
fqGnstringRequired

Fully Qualified Game Name

Example: com.studio.game
Header parameters
X-Auth-KeystringRequiredExample: ababa71162175e6867058b271eea7b5b279326eaf646188ab5e37365f32bb353Pattern: [0-9a-fA-F]{64}
Body
imagestring · binaryRequired
backgroundImagestring · binaryRequired
Responses
200
OK
400
Bad Request
*/*
401
Unauthorized
*/*
403
Forbidden
*/*
404
Not Found
*/*
405
Method Not Allowed
*/*
409
Conflict
*/*
429
Too Many Requests
*/*
500
Internal Server Error
*/*
post
POST /games/manage/{fqGn}/update-metadata-multipart HTTP/1.1
Host: game-api.openvessel.io
X-Auth-Key: text
Content-Type: multipart/form-data
Accept: */*
Content-Length: 96

{
  "data": {
    "displayName": "text",
    "description": "text"
  },
  "image": "binary",
  "backgroundImage": "binary"
}

No content