Issue & Transfer

to issue or issue+transfer SRR

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

Please replace <base_url> as explained here.

Precaution

Multiple issuance

issue to issuer

If payload[*].to is not given, your SRR will be issued to your luw address

Headers

Name
Type
Description

commerce-api-key*

string

Commerce API Key

issuer-address*

string

Contract Address of API Key owner

Request Body

Name
Type
Description

requestId

string

A requestId given by the caller, to ensure requests are only processed once. If the requestId is known and processed before, api will not process this call again, and respond with an error. A good practice is using random UUID.

*requestId must be unique for a given issuer-address. As a result any duplicate combination of requestId and issuer-address is instantly rejected with no impact on either.

payload*

array

Array of issue requests. Further constraints explained above.

payload[*].externalId*

string

An ID to identify the record in your system. We recommend to use UUID, but it can use any string as long it is unique in your system.

payload[*].metadata*

object

The metadata to be issued as a complex object. Detailed schema specification can be found here.

The API accepts versions 2.0 and higher.

payload[*].artistAddress*

string

The ethereum address of the artist of the artwork.

payload[*].isPrimaryIssuer*

boolean

If you are the primary issuer of this NFT, set this to true.

payload[*].lockExternalTransfer*

boolean

If you want to prevent your NFTs to be transferred on decentralized marketplaces, set this to true.

payload[*].to

string

Ethereum address target the NFT should be sent to after minting (Issue on Buyer).

If none is given the NFT will be minted into your LUW by default.

payload[*].attachmentFiles

Array<object>

Attachment files that will be included in SRR.

payload[*].attachmentFiles[*].name

string

The name of file.

This is used for when the file is downloaded or shown. The extension is recommended to be the same as the actual uploaded file.

payload[*].attachmentFiles[*].category

string

Please refer to this page to understand the difference among the categories.

Please note that contract terms and thumbnail are NOT attachment files. The URL for contract terms and thumbnail are needed for metadata. (See metadata attribute)

payload[*].attachmentFiles[*].url

string

The URL must be under Startbahn's GCS bucket. Use the finalUrl field returned by the signed URL endpoint, or a URL that Startbahn has pre-provisioned for you. Any other URL is rejected without issuing the SRR.

For each attachmentFiles entry, the API resolves the URL to its GCS path, reads the precomputed SHA-256 from the storage object metadata, and folds {category, hash} entries into metadata.digitalComponents (artwork category) or metadata.attachmentFiles (other categories) before issuance. You do not need to populate those metadata sub-fields yourself.

payload[*].collectionAddress

string

The address of collection that the SRR will belong to. This collection must be owned by the caller issuer-address.

payload[*].externalUrls

Array<string>

Deprecated. Use the external_url field in metadata.

To remain backward compatible the external URLs is still allowed and is simply passing the first string in the array to the metadata as external_url). This mapping is redundant and will be removed.

The API responds with 201. see Response Body results[*].status for details of each entry.

Body Attribute
Description
Format

results

results of the request

Array

results[*].srr

Minimal identifying details of the issued SRR. Richer information (issuer, artist, collection details, on-chain metadata, history, ownership) must be queried from the subgraph once the transaction is mined.

object

results[*].srr.tokenId

NFT token ID of the SRR.

string

results[*].srr.metadataCID

IPFS CID of the SRR metadata. Resolve via the Startrail IPFS CDN gateway: https://cdn.startrail.io/ipfs/<cid>. See IPFS CDN gateway.

string

results[*].srr.metadataURL

Convenience HTTPS URL that resolves the SRR metadata via the Startrail IPFS CDN gateway. Same content as metadataCID resolved through https://cdn.startrail.io/ipfs/.

string

results[*].srr.collectionContractAddress

Collection contract address the SRR belongs to. null if the SRR was not issued under a custom collection.

string | null

results[*].externalId

ID to identify the SRR. Defined by the client when calling.

string

results[*].status

waiting_for_mining – wait for completion of blockchain mining. The status (and any further SRR data) can then be confirmed via the subgraph or less favorably via the Get SRR by Token Id REST endpoint.

string

Response shape change

The response intentionally returns only the minimum identifiers needed to track the issued SRR (tokenId, metadataCID, metadataURL, collectionContractAddress). Fields previously returned by this endpoint such as srr.issuer, srr.artist, srr.collection.{name,symbol}, srr.isPrimaryIssuer, srr.issuedAt, srr.metadata.{json,originalJson,digest}, srr.createdAt and srr.updatedAt are no longer part of the issuance response.

To read SRR data after issuance:

  • Use the subgraph for issuer, artist, collection, ownership, history and provenance information (authoritative source).

  • Use the Startrail IPFS CDN gateway (https://cdn.startrail.io/ipfs/<cid>) to fetch the SRR metadata JSON, attachment files and images by their CID.

Swagger Endpoint (Test Environment)

Swagger to test

Required Permissions

Check the parent page.

Request Body Example

Code Example

Check parent page.

Last updated

Was this helpful?