Skip to main content
Version: 1.2.0-1.3.0

Digital Items

The digital item feature is a group of endpoints to convert products of a partner service into digital items that can be traded in the DOSI Brand Store and to manage them.

In DOSI SDK, converting online products into digital items is called sealing while converting back to online products is called unsealing. With sealing and unsealing features, service users can convert their online products into digital items to fit their purposes.

To seal or unseal the online products in the user's wallet, the proxy must be designated first.

Connection info

Development environmentDOSI SDK base URI
Productionhttps://sdk-api.dosi.world

Issue an item type

Issues a new item type and registers digital items of this type for sale at the DOSI Brand Store.

POST {DOSI SDK base URI}/v1/item/contracts/{contractId}/issue

Path

Name
TypeDescription
contractIdstring

Contract ID of the service that wants to issue a new item type. Contract ID received after applying for DOSI SDK. You can only use the contract ID linked to the DOSI channel provided for Authorization in the request header.

Query

None

Body

Name
TypeDescription
Required
txIdstring

Identifier provided to track the API request. Use the UUID string (case-insensitive) defined by RFC 9562.

The identifier is used to check the transaction after sending a request to the DOSI SDK server. If not specified, the DOSI SDK server generates an identifier and returns it in the response.

Specify this value if you want to check the result even if you do not receive a server response due to network issues.

namestring

Name of the digital item (token) type. Must be at least 3 characters long and not exceed 20 characters. Only alphabets or numbers are allowed. (No space, special characters, Korean characters, Japanese characters, Chinese characters or Thai characters are allowed.)

metastring

Metadata to record in Finschia, provided as an array of key-value object pairs in string up to 1,000 characters. Refer to metadata guidelines.

partnerIdnumber

Partner ID received during DOSI Biz Onboarding

ownerSecretstring

Secret of SO (Service owner) wallet, which can be received after applying for DOSI SDK

categorystring

Category of the digital item. Must be one of the following:

  • "Art"
  • "Character"
  • "Game"
  • "Music"
  • "Sports"
  • "Celebrity"
  • "Metaverse"
  • "Generative"
  • "Avatar"
  • "App Membership"
  • "Voucher"
pfpboolean

Indicate whether to allow setting the digital item as a DOSI user profile

  • true: Allow setting the issued digital item as a user profile
  • false: Don't allow setting the issued digital item as a user profile
descriptionstring

Description of the digital item displayed on the digital item page in the DOSI Brand Store. Up to 3,000 characters are allowed, including English, Korean, Japanese, Chinese (Traditional), and Thai characters, numbers, spaces, and some special characters (!, ,, /, @) only.

resaleAvailableboolean

Indicate whether C2C (customers to customers) sales are allowed in the DOSI Brand Store. If not provided, it’s set as true.

  • true: Allow to register C2C sales (Default)
  • false: Do not allow to register C2C sales
Headers
  • Authorization: Basic <Base64-encoded 'DOSI channel ID:secret'>
  • Request-Id: UUID randomly created to check duplication
  • Content-Type: application/json

The following error is returned for duplicated Request-Id.

{ 
   "responseCode": "BAD_REQUEST",
   "errorMessage": "Duplicated request has been detected"
}

Request examples

curl --request POST 'https://sdk-api.dosi.world/v1/item/contracts/xx...ss/issue' \
--header 'Authorization: Basic xxxxxxxx' \
--header 'Request-Id: 550e8400-e29b-41d4-a716-446655440000' \
--header 'Content-Type: application/json' \
--data-raw '{
"name":"itemTypeName",
"meta":"{\"Property A\":\"Value A\"}",
"partnerId": 100012,
"category": "Game",
"pfp": true,
"description": "Awesome description of your digital item",
"resaleAvailable": true
}'

Update Item type

Change the name and meta information of the issued digital item type.

PUT {DOSI SDK base URI}/v1/item/contracts/{contractId}/item-types/{itemType}

Path

Name
TypeDescription
contractIdstring

Contract ID of the service received after applying for the DOSI SDK. You can only use the contract ID linked to the DOSI channel provided for authorization in the request header.

itemTypestring

Item type of the digital item. Represented by an 8-digit hexadecimal code.

Query

None

Body

Name
TypeDescription
Required
txIdstring

Identifier provided to track the API request. Use the UUID string (case-insensitive) defined by RFC 9562.

The identifier is used to check the transaction after sending a request to the DOSI SDK server. If not specified, the DOSI SDK server generates an identifier and returns it in the response.

Specify this value if you want to check the result even if you do not receive a server response due to network issues.

namestring

New name with at least 3 letters up to 20 letters. Alphabets, Korean, Japanese, Chinese (traditional), Thai, numbers, spaces and some special characters (!, ,, /, @) allowed.

Enter null if you do not want to change it.

If both name and meta are null, it returns the BAD_REQUEST error.

metastring

Metadata (property) to be updated. Change the metadata of the digital item set during sealing. Refer to the Metadata Guidelines for more information.

Enter null if you do not want to change it.

If both name and meta are null, it returns the BAD_REQUEST error.

Headers
  • Authorization: Basic <Base64-encoded 'DOSI channel ID:secret'>
  • Request-Id: UUID randomly created to check duplication
  • Content-Type: application/json

The following error is returned for duplicated Request-Id.

{ 
   "responseCode": "BAD_REQUEST",
   "errorMessage": "Duplicated request has been detected"
}

Request examples

curl --request PUT 'https://sdk-api.dosi.world/v1/item/contracts/aaaaaaaa/item-types/bbbbbbbb' \
--header 'Authorization: Basic xxxxxxxx' \
--header 'Request-Id: 00000000-0000-0000-0000-000000000000' \
--header 'Content-Type: application/json' \
--data-raw '{
"name":"newItemTypeName",
"meta":"{\"Property A\":\"Value A\"}"
}'

Upload the media file for the item type

Uploads the media file (image or video) to the issued item type.

POST {DOSI SDK base URI}/v1/item/contracts/{contractId}/media/token-type

  • Media file can't be uploaded to the item type that wasn't issued with the endpoint for issuing an item type.
  • Check the type or size of files that can be uploaded in the media file upload guidelines.
  • If you're using HTTP client library to upload media files, you must send it as multipart/form-data. It may be different for each library, but the general rule is to set Content-Type in the request header as "multipart/form-data".

Path

Name
TypeDescription
contractIdstring

Contract ID received after applying for DOSI SDK. It must be linked to the DOSI channel in the request header Authorization.

Query

None

Body

Name
TypeDescription
Required
mediafile

Media file (image/video) to be uploaded

tokenTypestring

Item type of the digital item. Represented by an 8-digit hexadecimal code, given when issuing an item type.

Headers
  • Authorization: Basic <Base64-encoded 'DOSI channel ID:secret>
  • Content-Type: multipart/form-data

Request examples

curl --request POST 'https://sdk-api.dosi.world/v1/item/contracts/xx...ss/media/token-type' \
--header 'Authorization: Basic xxxxxxxx' \
--header 'Content-Type: multipart/form-data' \
--form "media=@path/name.png" \
--form "tokenType=00000001"

Get all item types

Gets all item types under the contract ID of a partner.

GET {DOSI SDK base URI}/v1/item/contracts/{contractId}/item-types

Item types that were not created with the endpoint for creating an item type of DOSI SDK can be fetched as well.

Path

Name
TypeDescription
contractIdstring

Contract ID received after applying for DOSI SDK. You can only use the contract ID linked to the DOSI channel provided for Authorization in the request header.

Query

Name
TypeDescription
Required
pageSizenumber

Number of digital items per page

  • Default: 10
  • Minimum: 1
  • Maximum: 100
pageTokenstring

Token for the start of the page (that is, nextPageToken in the response for the previous page). Starts from the first page if not provided.

Body

None

Headers
  • Authorization: Basic <Base64-encoded 'DOSI channel ID:secret>
  • Content-Type: application/json

Request examples

curl --location --request GET 'https://sdk-api.dosi.world/v1/item/contracts/xx...ss/item-types?pageSize=30&pageToken=zz...uu'
--header 'Authorization: Basic xxxxxxxx' \
--header 'Content-Type: application/json'

Get individual item type

Gets the specific item type under the contract ID of a partner.

GET {DOSI SDK base URI}/v1/item/contracts/{contractId}/item-types/{itemType}

Item types that were not created with the endpoint for creating an item type of DOSI SDK can be fetched as well.

Path

Name
TypeDescription
contractIdstring

Contract ID received after applying for DOSI SDK. You can only use the contract ID linked to the DOSI channel provided for Authorization in the request header.

itemTypestring

Identifier of the item type (An 8-digit hexadecimal code)

Query

None

Body

None

Headers
  • Authorization: Basic <Base64-encoded 'DOSI channel ID:secret>
  • Content-Type: application/json

Request examples

curl --location --request GET 'https://sdk-api.dosi.world/v1/item/contracts/xx...ss/item-types/yy...tt'
--header 'Authorization: Basic xxxxxxxx' \
--header 'Content-Type: application/json'

Sealing

Converts partner products into digital items for sale in the DOSI Brand Store. This endpoint can make off-chain products available for on-chain.

POST {DOSI SDK base URI}/v1/item/contracts/{contractId}/sealing

This endpoint can only be used in user accounts that authorize a proxy.

Path

Name
TypeDescription
Required
contractIdstring

Contract ID of the service received after applying for DOSI SDK. You can only use the contract ID linked to the DOSI channel provided for Authorization in the request header.

Query

None

Body

Name
TypeDescription
Required
txIdstring

Identifier provided to track the API request. Use the UUID string (case-insensitive) defined by RFC 9562.

The identifier is used to check the transaction after sending a request to the DOSI SDK server. If not specified, the DOSI SDK server generates an identifier and returns it in the response.

Specify this value if you want to check the result even if you do not receive a server response due to network issues.

tokenTypestring

Item type of the digital item. Represented by an 8-digit hexadecimal code, assigned when issuing an item type

toAddressstring

Wallet address of the user who will receive the sealed digital item

namestring

Name of the digital item. Must be at least 3 characters long and not exceed 20 characters. Alphabets, Korean, Japanese, Chinese (traditional), Thai, numbers, spaces and some special characters (!, ,, /, @) are allowed.

metastring

Metadata to record in Finschia, provided as an array of key-value object pairs in string up to 1,000 characters. Refer to metadata guidelines.

optionobject

Additional task to be handled during sealing. Delete it or enter null if there is no additional task.

Headers
  • Authorization: Basic <Base64-encoded 'DOSI channel ID:secret'>
  • Request-Id: UUID randomly created to check duplication
  • Content-Type: application/json

The following error is returned for duplicated Request-Id.

{ 
   "responseCode": "BAD_REQUEST",
   "errorMessage": "Duplicated request has been detected"
}

Request examples

curl --request POST 'https://sdk-api.dosi.world/v1/item/contracts/xx...ss/sealing' \
--header 'Authorization: Basic xxxxxxxx' \
--header 'Request-Id: 550e8400-e29b-41d4-a716-446655440000' \
--header 'Content-Type: application/json' \
--data-raw '{
"tokenType": "0000001F",
"toAddress": "link1xxxxxxxxxxzzzzzzzzzzxxxxxxxxxxzzzzzzzz",
"name":"item1",
"meta":"{\"Property A\":\"Value A\"}",
"option": {
"mediaUpload": {
"sourceUrl": "https://example.com/example.png"
}
}
}'

Batch sealing

Converts multiple partner products into digital items for sale in the DOSI Brand Store at once.

POST {DOSI SDK base URI}/v1/item/contracts/{contractId}/batch-sealing

This endpoint can only be used in user accounts that authorized a proxy.

Path

Name
TypeDescription
Required
contractIdstring

Contract ID of the service received after applying for the DOSI SDK. You can only use the contract ID linked to the DOSI channel provided for authorization in the request header.

Query

None

Body

Name
TypeDescription
Required
txIdstring

Identifier provided to track the API request. Use the UUID string (case-insensitive) defined by RFC 9562.

The identifier is used to check the transaction after sending a request to the DOSI SDK server. If not specified, the DOSI SDK server generates an identifier and returns it in the response.

Specify this value if you want to check the result even if you do not receive a server response due to network issues.

sealingListarray

List of items to be sealed. The number of items must be at least 1 up to 100 at most.

Headers
  • Authorization: Basic <Base64-encoded 'DOSI channel ID:secret'>
  • Request-Id: UUID randomly created to check duplication
  • Content-Type: application/json

The following error is returned for duplicated Request-Id.

{ 
   "responseCode": "BAD_REQUEST",
   "errorMessage": "Duplicated request has been detected"
}

Request examples

curl --request POST 'https://sdk-api.dosi.world/v1/item/contracts/aaaaaaaa/batch-sealing' \
--header 'Authorization: Basic xxxxxxxx' \
--header 'Request-Id: 00000000-0000-0000-0000-000000000000' \
--header 'Content-Type: application/json' \
--data-raw '{
"txId": "00000000-0000-0000-0000-000000000001",
"sealingList": [
{
"tokenType": "0000001f",
"toAddress": "link1xxxxxxxxxxzzzzzzzzzzxxxxxxxxxxzzzzzzzz",
"name":"item1",
"meta":"{\"Property A\":\"Value A\"}"
}
]
}'

Upload the media file for the digital item

Uploads the media file (image or video) to the digital item sealed with the issued item type.

POST {DOSI SDK base URI}/v1/item/contracts/{contractId}/media/item-token

  • Media file can't be uploaded to the digital items of an item type that wasn't issued with the endpoint for issuing an item type or sealing.
  • Check the type or size of files that can be uploaded in the media file upload guidelines.
  • If you're using HTTP client library to upload media files, you must send it as multipart/form-data. It may be different for each library, but the general rule is to set Content-Type in the request header as "multipart/form-data".

Path

Name
TypeDescription
contractIdstring

Contract ID received after applying for DOSI SDK. It must be linked to the DOSI channel in the request header Authorization.

Query

None

Body

Name
TypeDescription
Required
mediafile

Media file (image/video) to be uploaded

tokenTypestring

Item type of the digital item. Represented by an 8-digit hexadecimal code, given when issuing an item type.

tokenIndexstring

Item index of the digital item. Represented by an 8-digit hexadecimal code.

Headers
  • Authorization: Basic <Base64-encoded 'DOSI channel ID:secret>
  • Content-Type: multipart/form-data

Request examples

curl --request POST 'https://sdk-api.dosi.world/v1/item/contracts/xx...ss/media/item-token' \
--header 'Authorization: Basic xxxxxxxx' \
--header 'Content-Type: multipart/form-data' \
--form "media=@path/name.png" \
--form "tokenType=00000001" \
--form "tokenIndex=00000002"

Replace the media file for the digital item

Replaces the media file (image or video) registered to the digital item. You can replace the media file of the digital item within the issued item type only before selling or sealing the given digital item.

PUT {DOSI SDK base URI}/v1/item/contracts/{contractId}/media/item-token

  • Media file can't be uploaded to the digital items of an item type that wasn't issued with the endpoint for issuing an item type.
  • Media file of those digital items that have been sealed or sold and kept in the user’s wallet can't be replaced.
  • Check the type or size of files that can be uploaded in the media file upload guidelines.
  • If you're using HTTP client library to upload media files, you must send it as multipart/form-data. It may be different for each library, but the general rule is to set Content-Type in the request header as "multipart/form-data".

Path

Name
TypeDescription
contractIdstring

Contract ID received after applying for DOSI SDK. It must be linked to the DOSI channel in the request header Authorization.

Query

None

Body

Name
TypeDescription
Required
Mediafile

Media file (image/video) to be uploaded

tokenTypestring

Item type of the digital item. Represented by an 8-digit hexadecimal code, given when issuing an item type.

tokenIndexstring

Item index of the digital item. Represented by an 8-digit hexadecimal code.

Headers
  • Authorization: Basic <Base64-encoded 'DOSI channel ID:secret>
  • Content-Type: multipart/form-data

Request examples

curl --request PUT 'https://sdk-api.dosi.world/v1/item/contracts/xx...ss/media/item-token' \
--header 'Authorization: Basic xxxxxxxx' \
--header 'Content-Type: multipart/form-data' \
--form "media=@path/name.png" \
--form "tokenType=00000001" \
--form "tokenIndex=00000002"

Unsealing

Reverts sealed items back to off-chain items.

PUT {DOSI SDK base URI}/v1/item/contracts/{contractId}/unsealing

This endpoint can only be used in user accounts that authorize a proxy.

Path

Name
TypeDescription
contractIdstring

Contract ID of the service received after applying for DOSI SDK. You can only use the contract ID linked to the DOSI channel provided for Authorization in the request header.

Query

None

Body

Name
TypeDescription
Required
txIdstring

Identifier provided to track the API request. Use the UUID string (case-insensitive) defined by RFC 9562.

The identifier is used to check the transaction after sending a request to the DOSI SDK server. If not specified, the DOSI SDK server generates an identifier and returns it in the response.

Specify this value if you want to check the result even if you do not receive a server response due to network issues.

tokenTypestring

Item type of the digital item. Represented by an 8-digit hexadecimal code, assigned when issuing an item type

tokenIndexstring

Digital item index in an 8-digit hexadecimal number

fromAddressstring

Address of the user's wallet holding the item for unsealing

Headers
  • Authorization: Basic <Base64-encoded 'DOSI channel ID:secret'>
  • Content-Type: application/json

Request examples

curl --request PUT 'https://sdk-api.dosi.world/v1/item/contracts/xx...ss/unsealing' \
--header 'Authorization: Basic xxxxxxxx' \
--header 'Content-Type: application/json' \
--data-raw '{
"tokenType": "00000001",
"tokenIndex": "0000001F",
"fromAddress": "link1xxxxxxxxxxzzzzzzzzzzxxxxxxxxxxzzzzzzzz"
}'

Batch unsealing

Converts multiple digital items in single user's wallet into off-chain items at once.

PUT {DOSI SDK base URI}/v1/item/contracts/{contractId}/batch-unsealing

This can only be used in user accounts that authorized a proxy.

Path

Name
TypeDescription
contractIdstring

Contract ID received after applying for DOSI SDK. You can only use the contract ID linked to the DOSI channel provided for Authorization in the request header.

Query

None

Body

Name
TypeDescription
Required
txIdstring

Identifier provided to track the API request. Use the UUID string (case-insensitive) defined by RFC 9562.

The identifier is used to check the transaction after sending a request to the DOSI SDK server. If not specified, the DOSI SDK server generates an identifier and returns it in the response.

Specify this value if you want to check the result even if you do not receive a server response due to network issues.

tokenListarray

List of digital items for unsealing

fromAddressstring

User's wallet address with items for unsealing

Headers
  • Authorization: Basic <Base64-encoded 'DOSI channel ID:secret'>
  • Content-Type: application/json

Request examples

curl --request PUT 'https://sdk-api.dosi.world/v1/item/contracts/xx...ss/batch-unsealing' \
--header 'Authorization: Basic xxxxxxxx' \
--header 'Content-Type: application/json' \
--data-raw '{
"tokenList": [
{
"tokenType": "00000001",
"tokenIndex": "0000001F"
},
{
"tokenType": "00000001",
"tokenIndex": "0000001A"
},
],
"fromAddress": "link1xxxxxxxxxxzzzzzzzzzzxxxxxxxxxxzzzzzzzz"
}'

Resealing

Seals a product that has been sealed and unsealed once already. Resealing doesn't change the total issuance volume of digital items on the Finschia chain.

By calling this endpoint and setting name and meta before selling it in the DOSI Brand Store, you can change the existing name and properties of the given digital item.

You can't change the name and properties of a digital item that was not created with the Create an item type endpoint.

POST {DOSI SDK base URI}/v1/item/contracts/{contractId}/resealing

This endpoint can only be used in user accounts that authorized a proxy.

Path

Name
TypeDescription
contractIdstring

Contract ID of the service received after applying for DOSI SDK. You can only use the contract ID linked to the DOSI channel provided for Authorization in the request header.

Query

None

Body

Name
TypeDescription
Required
txIdstring

Identifier provided to track the API request. Use the UUID string (case-insensitive) defined by RFC 9562.

The identifier is used to check the transaction after sending a request to the DOSI SDK server. If not specified, the DOSI SDK server generates an identifier and returns it in the response.

Specify this value if you want to check the result even if you do not receive a server response due to network issues.

tokenTypestring

Item type of the digital item. Represented by an 8-digit hexadecimal code, assigned when issuing an item type

tokenIndexstring

Item index of the digital item. Represented by an 8-digit hexadecimal code.

toAddressstring

Wallet address of the user who will receive the resealed digital item

namestring

New name with at least 3 letters up to 20 letters. Alphabets, Korean, Japanese, Chinese (traditional), Thai, numbers, spaces and some special characters (!, ,, /, @) allowed.

name and meta are used as a pair. They must be provided as a pair or not provided at all. If either name or meta is provided alone, it returns the BAD_REQUEST error.

metastring

Metadata (property) to be updated. Change the metadata of the digital item set during sealing. Refer to the Metadata Guidelines for more information.

name and meta are used as a pair. They must be provided as a pair or not provided at all. If either name or meta is provided alone, it returns the BAD_REQUEST error.

Headers
  • Authorization: Basic <Base64-encoded 'DOSI channel ID:secret'>
  • Content-Type: application/json

Request examples

curl --request PUT 'https://sdk-api.dosi.world/v1/item/contracts/xx...ss/unsealing' \
--header 'Authorization: Basic xxxxxxxx' \
--header 'Content-Type: application/json' \
--data-raw '{
"tokenType": "00000001",
"tokenIndex": "0000001F",
"toAddress": "link1xxxxxxxxxxzzzzzzzzzzxxxxxxxxxxzzzzzzzz",
"name":"item1",
"meta":"{\"Property A\":\"Value A\"}"
}'

Get transaction

Gets the transaction status with the transaction ID.

GET {DOSI SDK base URI}/v1/item/transactions/{txId}

Path

Name
TypeDescription
txIdstring

Target transaction ID, which was received in response after requesting a sealing, unsealing, or resealing transaction

Query

None

Body

None

Headers
  • Authorization: Basic <Base64-encoded 'DOSI channel ID:secret'>
  • Content-Type: application/json

Request examples

curl --location --request GET 'https://sdk-api.dosi.world/v1/item/transactions/{txId}' \
--header 'Authorization: Basic xxxxxxxx' \
--header 'Content-Type: application/json'