Collections
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 Collection
Create a new collection
Fully Qualified Game Name
com.studio.game
[0-9a-fA-F]{64}
Unique Request Id that makes APIs idempotent. If two requests have the same ID, one of them will fail.
ab62663d-1645-4026-ba2d-d888b9634de9
Collection display name
New year cards
Collection description
Super game new year cards
The flag that controls display in the Discovery
true
Example: true
Main image
Collection image
Pattern: ^(http|https)://[-a-zA-Z0-9+&@#/%?=~_|,!:.;]*[-a-zA-Z0-9+@#/%=&_|]\.(?:jpg|jpeg|png)$
Qualified Collection Name
cards
Pattern: (\b[a-z0-9-]{1,20}\b)(:[1-9][0-9]{0,10})?
POST /collections/manage/{fqGn}/create HTTP/1.1
Host: game-api.openvessel.io
X-Auth-Key: text
Content-Type: application/json
Accept: */*
Content-Length: 144
{
"displayName": "New year cards",
"description": "Super game new year cards",
"displayInDiscovery": true,
"imageUrl": "Collection image",
"qCn": "cards"
}
{
"response": {
"txHash": "text",
"description": "text",
"details": {}
}
}
Create a new collection multipart
Fully Qualified Game Name
com.studio.game
[0-9a-fA-F]{64}
Unique Request Id that makes APIs idempotent. If two requests have the same ID, one of them will fail.
ab62663d-1645-4026-ba2d-d888b9634de9
POST /collections/manage/{fqGn}/create-multipart HTTP/1.1
Host: game-api.openvessel.io
X-Auth-Key: text
Content-Type: multipart/form-data
Accept: */*
Content-Length: 140
{
"data": {
"displayName": "New year cards",
"description": "Super game new year cards",
"displayInDiscovery": true,
"qCn": "cards"
},
"image": "binary"
}
{
"response": {
"txHash": "text",
"description": "text",
"details": {}
}
}
create vs create-multipart
You need to upload the image somewhere and post the URL when you use /collections/manage/{gqGn}/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 /collections/manage/{fqGn}/create-multipart
API.
Collection Metadata
Update collection metadata
Fully Qualified Collection Name
com.studio.game.collection
ababa71162175e6867058b271eea7b5b279326eaf646188ab5e37365f32bb353
Pattern: [0-9a-fA-F]{64}
New display name
New description
New image URL
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 collection metadata multipart
Fully Qualified Collection Name
com.studio.game.collection
ababa71162175e6867058b271eea7b5b279326eaf646188ab5e37365f32bb353
Pattern: [0-9a-fA-F]{64}
POST /collections/manage/{fqCn}/update-metadata-multipart HTTP/1.1
Host: game-api.openvessel.io
X-Auth-Key: text
Content-Type: multipart/form-data
Accept: */*
Content-Length: 69
{
"data": {
"displayName": "text",
"description": "text"
},
"image": "binary"
}
No content
Collection Details
List game collections
Fully qualified game name
com.studio.game
GET /collections/{fqGn}/ HTTP/1.1
Host: game-api.openvessel.io
Accept: */*
{
"response": [
{
"address": "text",
"fqCn": "text",
"displayName": "text",
"createdAt": 1
}
]
}
Collection Object
displayName
string
User-friendly name of the collection
address
string
Blockchain address of the contract backing this collection
createdAt
number
Unix timestamp of the collection creation time
Fully Qualified Game Name
com.studio.game
Qualified Collection Name
armor01
GET /collections/{fqGn}/{qcn}/ HTTP/1.1
Host: game-api.openvessel.io
Accept: */*
{
"response": {
"address": "0x25e4aeeb291b9c73e726ab8ba2dec86ebe467144",
"fqCn": "com.develop.game.new-year-cards",
"displayName": "New year cards",
"createdAt": 1653407651,
"totalSupply": {
"ANY_ADDITIONAL_PROPERTY": 1
},
"description": "Super game new year cards",
"imageUrl": "https://static.openvessel.io/com.develop/game/new-year-cards/collection_image.png",
"status": "ACTIVE"
}
}
Collection Details Object
address
string
Blockchain address of the contract backing this collection
displayName
string
User-friendly name of the collection
createdAt
number
Unix timestamp of the collection creation time
totalSupply
object
Total supply of each qTn under the collection
description
string
Description of this collection
imageUrl
string
Image URL for this collection
status
string
ACTIVE
or PAUSED
Last updated
Was this helpful?