Create Collection

to create a new collection

POST <base_url>/port/api/v1/commerce/collection

Please replace <base_url> as explained here.

Headers

NameTypeDescription

commerce-api-key*

string

Commerce API Key

issuer-address*

string

Contract Address of API Key owner

Request Body

NameTypeDescription

payload*

object

Single object of collection detail that will be created.

payload.name*

string

Name of the collection

payload.symbol*

string

Collection symbol based on ERC721Metadata symbol.

payload.salt

string

Salt used in Collection creation.

If provided: it must be a random keccak256 hash like 0xea9369d265ddf31c12231b2aeb90662018499cb62117f30cf722bc1b76c62c46

otherwise, if not provided: it will be randomly generated.

The API responds with 201 when the collection transaction is sent to the blockchain network.

Body AttributeDescriptionFormat

result

Single object of collection creation result

object

result.name

The value will be the same as the parameter sent in the request

string

result.symbol

The value will be the same as the parameter sent in the request.

string

result.collectionAddress

collection address that is generated by create2, like 0x4412Ba95BEC0CDB4562D97CB9149575Ea5B514A5

string

result.status

The status of the collection creation transaction.

  • waiting_for_mining : Mining is in progress.

  • failed: Collection creation transaction is failed.

string

Request Body Example

{
  "payload": {
    "name": "some nft collection name",
    "symbol": "T22",
    "salt": "0xea9369d265ddf31c12231b2aeb90662018499cb62117f30cf722bc1b76c62c46"
  }
}

Last updated

©2023 Startbahn, Inc.