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 environment | DOSI SDK base URI |
---|---|
Production | https://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.
Path
Name | Type | Description |
---|---|---|
contractId | string | 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 | Type | Description | Required |
---|---|---|---|
txId | string | 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. | |
name | string | 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.) | |
meta | string | 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. | |
partnerId | number | Partner ID received during DOSI Biz Onboarding | |
ownerSecret | string | Secret of SO (Service owner) wallet, which can be received after applying for DOSI SDK | |
category | string | Category of the digital item. Must be one of the following:
| |
pfp | boolean | Indicate whether to allow setting the digital item as a DOSI user profile
| |
description | string | 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 ( | |
resaleAvailable | boolean | Indicate whether C2C (customers to customers) sales are allowed in the DOSI Brand Store. If not provided, it’s set as
|
- 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.
Path
Name | Type | Description |
---|---|---|
contractId | string | 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. |
itemType | string | Item type of the digital item. Represented by an 8-digit hexadecimal code. |
Query
None
Body
Name | Type | Description | Required |
---|---|---|---|
txId | string | 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. | |
name | string | 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.
| |
meta | string | 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.
|
- 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.
- 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 | Type | Description |
---|---|---|
contractId | string | Contract ID received after applying for DOSI SDK. It must be linked to the DOSI channel in the request header |
Query
None
Body
Name | Type | Description | Required |
---|---|---|---|
media | file | Media file (image/video) to be uploaded | |
tokenType | string | Item type of the digital item. Represented by an 8-digit hexadecimal code, given when issuing an item type. |
- 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.
Item types that were not created with the endpoint for creating an item type of DOSI SDK can be fetched as well.
Path
Name | Type | Description |
---|---|---|
contractId | string | 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 | Type | Description | Required |
---|---|---|---|
pageSize | number | Number of digital items per page
| |
pageToken | string | Token for the start of the page (that is, |
Body
None
- 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.
Item types that were not created with the endpoint for creating an item type of DOSI SDK can be fetched as well.
Path
Name | Type | Description |
---|---|---|
contractId | string | 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. |
itemType | string | Identifier of the item type (An 8-digit hexadecimal code) |
Query
None
Body
None
- 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.
This endpoint can only be used in user accounts that authorize a proxy.
Path
Name | Type | Description | Required |
---|---|---|---|
contractId | string | 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 | Type | Description | Required |
---|---|---|---|
txId | string | 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. | |
tokenType | string | Item type of the digital item. Represented by an 8-digit hexadecimal code, assigned when issuing an item type | |
toAddress | string | Wallet address of the user who will receive the sealed digital item | |
name | string | 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 ( | |
meta | string | 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. | |
option | object | Additional task to be handled during sealing. Delete it or enter null if there is no additional task. |
- 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.
This endpoint can only be used in user accounts that authorized a proxy.
Path
Name | Type | Description | Required |
---|---|---|---|
contractId | string | 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 | Type | Description | Required |
---|---|---|---|
txId | string | 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. | |
sealingList | array | List of items to be sealed. The number of items must be at least 1 up to 100 at most. |
- 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.
- 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 | Type | Description |
---|---|---|
contractId | string | Contract ID received after applying for DOSI SDK. It must be linked to the DOSI channel in the request header |
Query
None
Body
Name | Type | Description | Required |
---|---|---|---|
media | file | Media file (image/video) to be uploaded | |
tokenType | string | Item type of the digital item. Represented by an 8-digit hexadecimal code, given when issuing an item type. | |
tokenIndex | string | Item index of the digital item. Represented by an 8-digit hexadecimal code. |
- 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.
- 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 | Type | Description |
---|---|---|
contractId | string | Contract ID received after applying for DOSI SDK. It must be linked to the DOSI channel in the request header |
Query
None
Body
Name | Type | Description | Required |
---|---|---|---|
Media | file | Media file (image/video) to be uploaded | |
tokenType | string | Item type of the digital item. Represented by an 8-digit hexadecimal code, given when issuing an item type. | |
tokenIndex | string | Item index of the digital item. Represented by an 8-digit hexadecimal code. |
- 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.
This endpoint can only be used in user accounts that authorize a proxy.
Path
Name | Type | Description |
---|---|---|
contractId | string | 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 | Type | Description | Required |
---|---|---|---|
txId | string | 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. | |
tokenType | string | Item type of the digital item. Represented by an 8-digit hexadecimal code, assigned when issuing an item type | |
tokenIndex | string | Digital item index in an 8-digit hexadecimal number | |
fromAddress | string | Address of the user's wallet holding the item for unsealing |
- 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.
This can only be used in user accounts that authorized a proxy.
Path
Name | Type | Description |
---|---|---|
contractId | string | 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 | Type | Description | Required |
---|---|---|---|
txId | string | 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. | |
tokenList | array | List of digital items for unsealing | |
fromAddress | string | User's wallet address with items for unsealing |
- 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.
This endpoint can only be used in user accounts that authorized a proxy.
Path
Name | Type | Description |
---|---|---|
contractId | string | 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 | Type | Description | Required |
---|---|---|---|
txId | string | 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. | |
tokenType | string | Item type of the digital item. Represented by an 8-digit hexadecimal code, assigned when issuing an item type | |
tokenIndex | string | Item index of the digital item. Represented by an 8-digit hexadecimal code. | |
toAddress | string | Wallet address of the user who will receive the resealed digital item | |
name | string | New name with at least 3 letters up to 20 letters. Alphabets, Korean, Japanese, Chinese (traditional), Thai, numbers, spaces and some special characters (!, ,, /, @) allowed.
| |
meta | string | Metadata (property) to be updated. Change the metadata of the digital item set during sealing. Refer to the Metadata Guidelines for more information.
|
- 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.
Path
Name | Type | Description |
---|---|---|
txId | string | Target transaction ID, which was received in response after requesting a sealing, unsealing, or resealing transaction |
Query
None
Body
None
- 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'