Retrieve a specific template

Fetch the details of a specific template by providing its unique ID.

GET

Parameters

Path Parameters

TemplateId
REQUIRED
Unique identifier of the template
Status codeDescription
200Successfully retrieved the template details.
400Bad request error - the request contains invalid parameters or malformed data
404Resource not found - the requested resource does not exist
500Internal server error - an unexpected error occurred on the server
cURL
curl -L \
"https://blockv-labs.io/templates/{templateId}" \
-H 'Accept: application/json'
Response
{
"id": "string",
"name": "string",
"fqdn": "string",
"object": {
"metadata": {
"name": "string",
"description": "string",
"category": "string",
"image": {
"id": "string",
"name": "string",
"type": "string",
"url": "string",
"hash": "string",
"is_public": false,
"when_created": "2024-01-01T00:00:00Z"
},
"edition": 0
},
"assets": [
{
"id": "string",
"name": "string",
"type": "string",
"url": "string",
"hash": "string",
"is_public": false,
"when_created": "2024-01-01T00:00:00Z"
}
]
},
"factory": {
"max_supply": 0,
"minted_count": 0,
"start_time": "2024-01-01T00:00:00Z",
"end_time": "2024-01-01T00:00:00Z",
"whitelist": [
"string"
]
},
"public_access": {
"custom": [
"string"
]
},
"actions": [
{
"name": "mint",
"alias": "string",
"access": {
"type": "public"
},
"url": "string"
}
],
"face_id": "string",
"when_created": "2024-01-01T00:00:00Z",
"when_modified": "2024-01-01T00:00:00Z"
}
json
{
"type": "object",
"description": "Template entity defining the structure and behavior for creating smart objects",
"required": [
"id",
"name",
"fqdn",
"object",
"actions",
"when_created",
"when_modified"
],
"properties": {
"id": {
"type": "string",
"description": "Unique identifier for the template",
"x-oapi-codegen-extra-tags": {
"bson": "_id",
"json": "id"
},
"x-go-type": "id.ID",
"x-go-type-import": {
"path": "github.com/vlabsio/smarttoken/pkg/types/id"
},
"x-go-type-skip-optional-pointer": true
},
"name": {
"type": "string",
"description": "Name of the object",
"x-oapi-codegen-extra-tags": {
"bson": "name",
"validate": "required,max=255"
}
},
"fqdn": {
"type": "string",
"description": "Fully Qualified Domain Name (FQDN) of the object",
"x-oapi-codegen-extra-tags": {
"bson": "fqdn"
}
},
"object": {
"description": "Reference to the object schema",
"x-oapi-codegen-extra-tags": {
"bson": "object"
},
"type": "object",
"required": [
"metadata"
],
"properties": {
"custom": {
"type": "object",
"description": "Custom properties of the object",
"x-go-type-skip-optional-pointer": true,
"x-oapi-codegen-extra-tags": {
"bson": "custom,omitempty"
}
},
"metadata": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Name of the object",
"x-go-type-skip-optional-pointer": true,
"x-oapi-codegen-extra-tags": {
"bson": "name,omitempty"
}
},
"description": {
"type": "string",
"description": "Description of the object",
"x-go-type-skip-optional-pointer": true,
"x-oapi-codegen-extra-tags": {
"bson": "description,omitempty"
}
},
"category": {
"type": "string",
"description": "Category of the object",
"x-go-type-skip-optional-pointer": true,
"x-oapi-codegen-extra-tags": {
"bson": "category,omitempty"
}
},
"image": {
"type": "object",
"description": "Represents a file or media asset stored in the platform",
"required": [
"id",
"url"
],
"properties": {
"id": {
"type": "string",
"description": "Unique identifier for the asset",
"x-oapi-codegen-extra-tags": {
"bson": "id,omitempty"
}
},
"name": {
"type": "string",
"description": "Human-readable name of the asset",
"x-oapi-codegen-extra-tags": {
"bson": "name,omitempty"
}
},
"type": {
"type": "string",
"description": "MIME type of the asset (e.g., image/jpeg, application/pdf)",
"x-oapi-codegen-extra-tags": {
"bson": "type,omitempty"
}
},
"url": {
"type": "string",
"description": "Public URL where the asset can be accessed",
"x-oapi-codegen-extra-tags": {
"bson": "url,omitempty"
}
},
"hash": {
"type": "string",
"description": "Cryptographic hash of the asset content for integrity verification",
"x-oapi-codegen-extra-tags": {
"bson": "hash,omitempty"
}
},
"is_public": {
"type": "boolean",
"description": "Whether the asset is publicly accessible without authentication",
"x-oapi-codegen-extra-tags": {
"bson": "is_public,omitempty"
}
},
"when_created": {
"type": "string",
"format": "date-time",
"description": "Timestamp when the asset was uploaded",
"x-oapi-codegen-extra-tags": {
"bson": "when_created,omitempty"
}
}
}
},
"edition": {
"type": "integer",
"description": "Edition number of the object",
"x-go-type-skip-optional-pointer": true,
"x-oapi-codegen-extra-tags": {
"bson": "edition,omitempty"
}
}
},
"x-oapi-codegen-extra-tags": {
"bson": "metadata,omitempty"
}
},
"assets": {
"type": "array",
"items": {
"type": "object",
"description": "Represents a file or media asset stored in the platform",
"required": [
"id",
"url"
],
"properties": {
"id": {
"type": "string",
"description": "Unique identifier for the asset",
"x-oapi-codegen-extra-tags": {
"bson": "id,omitempty"
}
},
"name": {
"type": "string",
"description": "Human-readable name of the asset",
"x-oapi-codegen-extra-tags": {
"bson": "name,omitempty"
}
},
"type": {
"type": "string",
"description": "MIME type of the asset (e.g., image/jpeg, application/pdf)",
"x-oapi-codegen-extra-tags": {
"bson": "type,omitempty"
}
},
"url": {
"type": "string",
"description": "Public URL where the asset can be accessed",
"x-oapi-codegen-extra-tags": {
"bson": "url,omitempty"
}
},
"hash": {
"type": "string",
"description": "Cryptographic hash of the asset content for integrity verification",
"x-oapi-codegen-extra-tags": {
"bson": "hash,omitempty"
}
},
"is_public": {
"type": "boolean",
"description": "Whether the asset is publicly accessible without authentication",
"x-oapi-codegen-extra-tags": {
"bson": "is_public,omitempty"
}
},
"when_created": {
"type": "string",
"format": "date-time",
"description": "Timestamp when the asset was uploaded",
"x-oapi-codegen-extra-tags": {
"bson": "when_created,omitempty"
}
}
}
},
"x-go-type-skip-optional-pointer": true,
"x-oapi-codegen-extra-tags": {
"bson": "assets,omitempty"
}
}
}
},
"factory": {
"description": "Reference to the factory schema",
"x-oapi-codegen-extra-tags": {
"bson": "factory"
},
"type": "object",
"required": [
"max_supply",
"minted_count"
],
"properties": {
"max_supply": {
"type": "integer",
"x-oapi-codegen-extra-tags": {
"bson": "max_supply"
}
},
"minted_count": {
"type": "integer",
"default": 0,
"x-oapi-codegen-extra-tags": {
"bson": "minted_count"
}
},
"start_time": {
"type": "string",
"format": "date-time",
"x-oapi-codegen-extra-tags": {
"bson": "start_time"
}
},
"end_time": {
"type": "string",
"format": "date-time",
"x-oapi-codegen-extra-tags": {
"bson": "end_time"
}
},
"whitelist": {
"type": "array",
"items": {
"type": "string"
},
"x-go-type-skip-optional-pointer": true,
"x-oapi-codegen-extra-tags": {
"bson": "whitelist"
}
}
}
},
"public_access": {
"type": "object",
"description": "Public access configuration for the template",
"x-oapi-codegen-extra-tags": {
"bson": "public_access"
},
"properties": {
"custom": {
"type": "array",
"items": {
"type": "string"
},
"x-oapi-codegen-extra-tags": {
"bson": "custom"
},
"x-go-type-skip-optional-pointer": true
}
}
},
"actions": {
"description": "Available actions that can be performed on objects created from this template",
"type": "array",
"items": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"description": "Name of the action",
"enum": [
"mint",
"burn",
"transfer",
"drop",
"pickup",
"update",
"redeem",
"bridgeNFT",
"connect",
"remote"
],
"x-oapi-codegen-extra-tags": {
"bson": "name",
"validate": "required"
}
},
"alias": {
"type": "string",
"description": "Optional alias for the action",
"x-oapi-codegen-extra-tags": {
"bson": "alias"
}
},
"access": {
"type": "object",
"description": "Access control for the action",
"x-oapi-codegen-extra-tags": {
"bson": "access"
},
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"description": "Type of access",
"enum": [
"public",
"private",
"whitelist",
"token"
],
"x-oapi-codegen-extra-tags": {
"bson": "type",
"validate": "required"
}
},
"tokens": {
"type": "object",
"additionalProperties": {
"type": "integer",
"format": "int64"
},
"x-go-type-skip-optional-pointer": true,
"x-oapi-codegen-extra-tags": {
"bson": "tokens"
}
}
}
},
"config": {
"type": "object",
"description": "Configuration for the action",
"x-oapi-codegen-extra-tags": {
"bson": "config"
},
"x-go-type-skip-optional-pointer": true
},
"url": {
"type": "string",
"description": "URL for the action, if applicable",
"x-oapi-codegen-extra-tags": {
"bson": "url"
},
"x-go-type-skip-optional-pointer": true
}
}
},
"x-oapi-codegen-extra-tags": {
"bson": "actions"
}
},
"face_id": {
"type": "string",
"description": "Face identifier for the visual representation of objects created from this template",
"x-go-type": "id.ID",
"x-go-type-import": {
"path": "github.com/vlabsio/smarttoken/pkg/types/id"
},
"x-oapi-codegen-extra-tags": {
"bson": "face_id"
}
},
"when_created": {
"type": "string",
"format": "date-time",
"description": "Timestamp of when the object was created",
"x-oapi-codegen-extra-tags": {
"bson": "when_created"
}
},
"when_modified": {
"type": "string",
"format": "date-time",
"description": "Timestamp of when the object was last modified",
"x-oapi-codegen-extra-tags": {
"bson": "when_modified"
}
}
}
}