LogoLogo
  • Horizon Network
    • What is Horizon Network?
    • API Document
      • Horizon Network API
      • Quick Start
      • API Reference
        • Assets
        • Collections
        • Orders
        • Offers
        • Events
        • Statistics
        • Categories
        • Chains
        • Request an API key
    • SDKs Document
      • SDKs overview
      • NODE SDK
        • Installation
        • Initialization
        • Basic Example
          • Assets Management
          • Marketplace
        • Reference
          • Assets
          • Collections
          • Offers
          • Orders
          • Categories
          • Events
          • Statistics
          • Blockchain and Layer 2
      • JAVASCRIPT SDK
        • Overview
        • Installation
        • Quickstart
        • Reference
    • Launching NFT Collection
      • Launch A Collection
        • Overview
        • Part 1: Register as a user
        • Part 2: Deploy a smart contract
        • Part 3: Set creator earnings
        • Horizon Example Repository
      • Creating Your NFT Smart Contract
        • Overview
        • Getting Started
        • Setting a basic project
        • Minting from your new contract
        • Add your own NFT contract to Horizon Network
    • Horizon Network's Layer 2 Solution
      • Why Horizon Network?
      • Horizon Network's layer 2 Solutions
      • Basic Concepts
  • Horizon Land Metaverse
    • Feature
      • LAND in the metaverse
      • NFT Avatar
      • Horizon Center
      • Game Center
      • Shopping Center
      • Music Center
      • Play to Earn
      • Social Activities
      • Finance Center
      • Marketplace
      • Experience Mode
      • Zon Token
    • Stake Holder
      • Players
      • Creators
      • Land Owners
      • Partners
      • Investors
    • Economy
      • Revenue Stream
  • Technology
    • Blockchain
    • Product
    • System
    • Wallet
    • Security
    • Token
  • Tokenomic
  • Investor & Partner
  • Roadmap
  • Contact
  • Conclusion
  • Recommendation
  • FAQs
    • Policy
    • Terms of Use
Powered by GitBook
On this page
  1. Horizon Network
  2. API Document
  3. API Reference

Assets

PreviousAPI ReferenceNextCollections

Last updated 2 years ago

Get a list of assets

Get details of an asset

Create an asset

Import CSV to create asset

Asset listing

Update an asset listing

Get list of assets

get

Get list of assets

Query parameters
asset_contractstringOptional

Asset Contract

collection_idstringOptional

Collection ID

owner_idstringOptional

Owner ID

statusstring · enumOptional

Status of these asset

Possible values:
limitintegerOptional

Limit

pagestringOptional

Current page number

order_bystring · enumOptional

Property to sort by

Possible values:
directionstring · enumOptional

Direction to sort

Possible values:
Responses
200
OK
application/json
400
Bad Request
application/json
500
Internal Server Error
application/json
get
GET /v1/assets HTTP/1.1
Host: api.sandbox.horizonland.app
Accept: */*
{
  "cursor": "text",
  "remaining": 1,
  "result": [
    {
      "collection": {
        "image_url": "text",
        "name": "text",
        "contract_address": "text"
      },
      "created_at": "text",
      "description": "text",
      "fees": [
        {
          "address": "text",
          "basis_points": 1,
          "type": "text"
        }
      ],
      "id": "text",
      "image_url": "text",
      "animation_url": "text",
      "external_link": "text",
      "metadata": {},
      "name": "text",
      "listing": {
        "closing_date": "text",
        "fees": [
          {
            "address": "text",
            "basis_points": 1,
            "type": "text"
          }
        ],
        "accept_price": 1,
        "start_price": 1,
        "current_price": 1,
        "name": "text",
        "token_address": "text",
        "token_id": "text",
        "chain": {
          "id": "text",
          "name": "text",
          "symbol": "text"
        }
      },
      "status": "text",
      "token_address": "text",
      "token_id": "text",
      "chain": {
        "id": "text",
        "name": "text",
        "symbol": "text"
      },
      "updated_at": "text",
      "owner": "text"
    }
  ]
}

Get details of an asset

get

Get details of an asset

Path parameters
token_addressstringRequired

Address of the ERC721 contract

token_idstringRequired

Either ERC721 token ID

Responses
200
OK
application/json
404
Not Found
application/json
500
Internal Server Error
application/json
get
GET /v1/assets/{token_address}/{token_id} HTTP/1.1
Host: api.sandbox.horizonland.app
Accept: */*
{
  "collection": {
    "image_url": "text",
    "name": "text",
    "contract_address": "text"
  },
  "created_at": "text",
  "description": "text",
  "fees": [
    {
      "address": "text",
      "basis_points": 1,
      "type": "text"
    }
  ],
  "id": "text",
  "image_url": "text",
  "animation_url": "text",
  "external_link": "text",
  "metadata": {},
  "name": "text",
  "listing": {
    "closing_date": "text",
    "fees": [
      {
        "address": "text",
        "basis_points": 1,
        "type": "text"
      }
    ],
    "accept_price": 1,
    "start_price": 1,
    "current_price": 1,
    "name": "text",
    "token_address": "text",
    "token_id": "text",
    "chain": {
      "id": "text",
      "name": "text",
      "symbol": "text"
    }
  },
  "status": "text",
  "token_address": "text",
  "token_id": "text",
  "chain": {
    "id": "text",
    "name": "text",
    "symbol": "text"
  },
  "updated_at": "text",
  "owner": "text"
}
  • Get a list of assets
  • GETGet list of assets
  • Get details of an asset
  • GETGet details of an asset
  • Create an asset
  • POSTCreate an asset
  • Import CSV to create asset
  • POSTImport assets from a CSV file
  • Asset listing
  • POSTAdd an asset to the marketplace
  • Update an asset listing
  • PUTUpdate an asset listing

Create an asset

post

Create an asset

Body
collection_idstringRequired

Collection ID

descriptionstringRequired

Description of this asset

image_urlstringRequired

URL of the image which should be used for this asset

animation_urlstringOptional

URL of the animation which should be used for this asset

external_linkstringOptional

URL of the external link which should be used for this asset

metadataobjectRequired

Metadata of this asset

namestringRequired

Name of this asset

token_addressstringRequired

Address of the ERC721 contract

chain_idstringRequired

Chain ID of the asset

ownerstringRequired

Address of the user who owns this asset

Responses
200
OK
application/json
400
Bad Request
application/json
401
Unauthorized
application/json
403
Forbidden
application/json
500
Internal Server Error
application/json
post
POST /v1/assets HTTP/1.1
Host: api.sandbox.horizonland.app
Content-Type: application/json
Accept: */*
Content-Length: 194

{
  "collection_id": "text",
  "description": "text",
  "image_url": "text",
  "animation_url": "text",
  "external_link": "text",
  "metadata": {},
  "name": "text",
  "token_address": "text",
  "chain_id": "text",
  "owner": "text"
}
{
  "collection": {
    "image_url": "text",
    "name": "text",
    "contract_address": "text"
  },
  "created_at": "text",
  "description": "text",
  "fees": [
    {
      "address": "text",
      "basis_points": 1,
      "type": "text"
    }
  ],
  "id": "text",
  "image_url": "text",
  "animation_url": "text",
  "external_link": "text",
  "metadata": {},
  "name": "text",
  "listing": {
    "closing_date": "text",
    "fees": [
      {
        "address": "text",
        "basis_points": 1,
        "type": "text"
      }
    ],
    "accept_price": 1,
    "start_price": 1,
    "current_price": 1,
    "name": "text",
    "token_address": "text",
    "token_id": "text",
    "chain": {
      "id": "text",
      "name": "text",
      "symbol": "text"
    }
  },
  "status": "text",
  "token_address": "text",
  "token_id": "text",
  "chain": {
    "id": "text",
    "name": "text",
    "symbol": "text"
  },
  "updated_at": "text",
  "owner": "text"
}

Import assets from a CSV file

post

Create an asset

Body
filestringRequired
collection_idstringRequired
Responses
200
OK
application/json
400
Bad Request
application/json
401
Unauthorized
application/json
403
Forbidden
application/json
500
Internal Server Error
application/json
post
POST /v1/assets/import HTTP/1.1
Host: api.sandbox.horizonland.app
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 38

"file='text'&collection_id='text'"
{
  "data": {},
  "message": "text"
}

Add an asset to the marketplace

post

Add an asset to the marketplace

Body
listing_timestringOptional

Time of asset be listed

expiration_timeobjectOptional

Expiration of asset be listed

maker_feesobjectOptional

Maker fees

order_typestringOptional

Order type

accept_pricenumberOptional

Accept price

start_pricenumberOptional

Start price

current_pricenumberOptional

Current price

signaturestringOptional

Maker signature

Responses
200
OK
application/json
400
Bad Request
application/json
401
Unauthorized
application/json
403
Forbidden
application/json
500
Internal Server Error
application/json
post
POST /v1/assets/listing HTTP/1.1
Host: api.sandbox.horizonland.app
Content-Type: application/json
Accept: */*
Content-Length: 150

{
  "listing_time": "text",
  "expiration_time": {},
  "maker_fees": {},
  "order_type": "text",
  "accept_price": 1,
  "start_price": 1,
  "current_price": 1,
  "signature": "text"
}
{
  "closing_date": "text",
  "fees": [
    {
      "address": "text",
      "basis_points": 1,
      "type": "text"
    }
  ],
  "accept_price": 1,
  "start_price": 1,
  "current_price": 1,
  "name": "text",
  "token_address": "text",
  "token_id": "text",
  "chain": {
    "id": "text",
    "name": "text",
    "symbol": "text"
  }
}

Update an asset listing

put

Update an asset listing

Path parameters
token_addressstringRequired

Address of the ERC721 contract

token_idstringRequired

Either ERC721 token ID

Body
listing_timestringOptional

Time of asset be listed

expiration_timeobjectOptional

Expiration of asset be listed

accept_pricenumberOptional

Accept price

start_pricenumberOptional

Start price

Responses
200
OK
application/json
400
Bad Request
application/json
401
Unauthorized
application/json
403
Forbidden
application/json
500
Internal Server Error
application/json
put
PUT /v1/assets/listing/{token_address}/{token_id} HTTP/1.1
Host: api.sandbox.horizonland.app
Content-Type: application/json
Accept: */*
Content-Length: 77

{
  "listing_time": "text",
  "expiration_time": {},
  "accept_price": 1,
  "start_price": 1
}
{
  "closing_date": "text",
  "fees": [
    {
      "address": "text",
      "basis_points": 1,
      "type": "text"
    }
  ],
  "accept_price": 1,
  "start_price": 1,
  "current_price": 1,
  "name": "text",
  "token_address": "text",
  "token_id": "text",
  "chain": {
    "id": "text",
    "name": "text",
    "symbol": "text"
  }
}