Playdapp Developers V2
  • Introduction
  • Prerequisites
  • QuickStart
  • API Guide
    • Overview
    • Authentication
    • HTTP Status Code
    • Diagrams
      • Basic
      • Shop in Shop
  • API Reference
    • APIs Overview
    • Basic
    • Shop in Shop
      • Base
      • P2E
Powered by GitBook
On this page
  • Get Browser Token
  • Get an authentication token to open a browser.
  • Mapping Item
  • Mapping item to be NFT-fy to users.
  • List Mapped Items
  • List mapped item info
  • Un-mapping Mapped Item
  • This API is called when a burned NFT item is re-itemized in the service(ex> game)
  1. API Reference
  2. Shop in Shop

Base

Describes APIs provided to partners who want to use Item Manager of PlayDapp's Shop in Shop service that supports wallet linkage, management of items issued to users, NFT Mint / Burn, etc.

PreviousShop in ShopNextP2E

Last updated 2 years ago

Get Browser Token

Get an authentication token to open a browser.

Refer to diagram

Get an authentication token to open a browser.

POST https://{shopInShopHost}/v1/browser/token

Get an authentication token (One-time Token) to open the Item Manager browser in the partner service app or web.

The oneTimeToken received as a response value can be used only once when accessing Item Manager through a browser, and a 401 response is received when accessing with the same token afterwards.

Headers

Name
Type
Description

sis-api-key*

String

This is the API KEY granted to the partner.

Request Body

Name
Type
Description

partnerUserId*

String

User ID managed by the partner

If the user is logged in on partner service, userId must be passed.

{
  "result": true,
  "data": {
    "oneTimeToken": "xxxxxxxxx"
  }
}

Mapping Item

Mapping item to be NFT-fy to user.

Mapping item to be NFT-fy to users.

POST https://{itemManagerHost}/v1/items

This is the process of mapping item information that the user can issue with NFT to the user.

After this process, the status value of the item must not be changed, so some games call it sealing.

Headers

Name
Type
Description

svc-api-key*

String

svc-api-key is issued for each registered service(ex> game) of partner.

signature*

String

timestamp*

String

The time at which the request was sent, set to a Unix Epoch Timestamp value.

nonce*

String

Random string of 8 characters, composed of uppercase or lowercase alphabets and numbers. A nonce can't be reused within 20 seconds after the successful request.

Request Body

Name
Type
Description

itemId*

String

Item ID managed by the service(ex> game) server. ItemCode is a value that identifies the Item's Type. ItemId is a unique ID given to each item for ItemCode.

userId*

String

User ID managed by the service(ex> game) server

serviceContractId*

Number

The contract ID registered for the item transaction for the registered service(ex> game) of partner

itemCode*

String

Code of item registered in PlayDapp Developers Console. ItemCode is a value that identifies the Item's Type. ItemId is a unique ID given to each item for ItemCode.

metadata*

Object

{

name?: String

image?: String

description?: String

attributes!: Array<Attribute>

}

name (optional)

: The name for the item. If omitted, the name entered when registering the item on the PlayDapp Developers Console is used.

image (optional)

: The image url for the item. If omitted, the image url entered when registering the item on the PlayDapp Developers Console is used.

description (optional)

: The description for the item. If omitted, the description entered when registering the item on the PlayDapp Developers Console is used.

attributes (required)

: Define attributes (skills, levels, etc.) to be given to items registered through PlayDapp Developers Console. These attributes are used as metadata for the NFT.

{
  "result": true,
  "data": {
    "userId": "1",  // User ID managed by the service(ex> game) server
    "serviceContractId": 1,  // The contract ID registered for the item transaction for the registered service(ex> game) of partner
    "itemCode": "1",  // Code of item registered in PlayDapp Developers Console
    "itemId": "9988",  // Item ID managed by the service(ex> game) server
    "metadata": {
      "name": "BRAM SR",  // Name of item registered in PlayDapp Developers Console
      "image": "https://presale-asset.playdapp.com/token_thumb/playz_bram_sr.png",  // Image of item registered in PlayDapp Developers Console
      "description": "this item is BRAM SR for pet!",  // Description of item registered in PlayDapp Developers Console
      "attributes": [  // Attributes to be used as NFT metadata 
        {
          "trait_type": "Base", 
          "value": "Starfish"
        }
      ]
    }
    "status": "mapping"
  }
}

List Mapped Items

List item information mapped to the user via service.

List mapped item info

GET https://{itemManagerHost}/v1/items

Query Parameters

Name
Type
Description

userId

String

User ID managed by the service(ex> game) server

status

Enum

Default: "burned" [Available enum values] - "burned" (Currently, only items in burn state can be searched for.)

offset

number

Default: 0

limit

number

Default: 100

Headers

Name
Type
Description

svc-api-key*

String

svc-api-key is issued for each registered service(ex> game) of partner.

signature*

String

timestamp*

String

The time at which the request was sent, set to a Unix Epoch Timestamp value.

nonce*

String

Random string of 8 characters, composed of uppercase or lowercase alphabets and numbers. A nonce can't be reused within 20 seconds after the successful request.

{
  "result": true,
  "data": {
    "total": 2,
    "list": [
      {
        "userId": "1",  // User ID managed by the service(ex> game) server
        "serviceContractId": 1,  // The contract ID registered for the item transaction for the registered service(ex> game) of partner
        "itemCode": "1",  // Code of item registered in PlayDapp Developers Console
        "itemId": "9988",  // Item ID managed by the service(ex> game) server
        "metadata": {
          "name": "BRAM SR",  // Name of item registered in PlayDapp Developers Console
          "image": "https://presale-asset.playdapp.com/token_thumb/playz_bram_sr.png",  // Image of item registered in PlayDapp Developers Console
          "description": "this item is BRAM SR for pet!",  // Description of item registered in PlayDapp Developers Console
          "attributes": [  // Attributes to be used as NFT metadata 
            {
              "trait_type": "Base", 
              "value": "Starfish"
            }
          ]
        }
        "status": "burned",
        "type": "item"
      },
      {
        "userId": "2",  // User ID managed by the service(ex> game) server
        "serviceContractId": 7,  // The contract ID registered for the item transaction for the registered service(ex> game) of partner
        "itemCode": "200000123",  // Code of item registered in PlayDapp Developers Console
        "itemId": "1-1000000004-1670397050832",  // Item ID managed by the service(ex> game) server
        "metadata": {
          "name": "Drops item",  // Name of item registered in PlayDapp Developers Console
          "image": "https://presale-asset.playdapp.com/token_thumb/playz_bram_sr_2.png",  // Image of item registered in PlayDapp Developers Console
          "description": "this item is Drops item",  // Description of item registered in PlayDapp Developers Console
          "attributes": [  // Attributes to be used as NFT metadata 
            {
              "trait_type": "Base", 
              "value": "Starfish"
            }
          ]
        }
        "status": "burned",
        "type": "drops"
      }
    ],
  }
}

Un-mapping Mapped Item

This API is called when a burned NFT item mapped to the user is re-itemized in the service(ex> game) of partner.

This API is called when a burned NFT item is re-itemized in the service(ex> game)

DELETE https://{itemManagerHost}/v1/items

If the API responds normally, the status of the item is changed to "item".

Afterwards, to issue the item to a specific user again, the Mapping Item API must be called.

Query Parameters

Name
Type
Description

userId*

String

User ID managed by the service(ex> game) server

serviceContractId*

Number

The contract ID registered for the item transaction for the registered service(ex> game) of partner

itemCode*

String

Code of item registered in PlayDapp Developers Console. ItemCode is a value that identifies the Item's Type. ItemId is a unique ID given to each item for ItemCode.

itemId*

String

Item ID managed by the service(ex> game) server. ItemCode is a value that identifies the Item's Type. ItemId is a unique ID given to each item for ItemCode.

Headers

Name
Type
Description

svc-api-key*

String

svc-api-key is issued for each registered service(ex> game) of partner.

signature*

String

timestamp*

String

The time at which the request was sent, set to a Unix Epoch Timestamp value.

nonce*

String

Random string of 8 characters, composed of uppercase or lowercase alphabets and numbers. A nonce can't be reused within 20 seconds after the successful request.

{
  "result": true,
  "data": {
    "userId": "1",  // User ID managed by the service(ex> game) server
    "serviceContractId": 1,  // The contract ID registered for the item transaction for the registered service(ex> game) of partner
    "itemCode": "1",  // Code of item registered in PlayDapp Developers Console
    "itemId": "9988",  // Item ID managed by the service(ex> game) server
    "metadata": {
      "name": "BRAM SR",  // Name of item registered in PlayDapp Developers Console
      "image": "https://presale-asset.playdapp.com/token_thumb/playz_bram_sr.png",  // Image of item registered in PlayDapp Developers Console
      "description": "this item is BRAM SR for pet!",  // Description of item registered in PlayDapp Developers Console
      "attributes": [  // Attributes to be used as NFT metadata 
        {
            "trait_type": "Base", 
            "value": "Starfish"
        }
      ]
    }
    "status": "item"
  }
}

Refer to diagram

The result of an API request signed by a secret key issued per registered service(ex> game) of partner. For more details, refer to .

Metadata follows OpenSea standard type, please refer to

The result of an API request signed by a secret key issued per registered service(ex> game) of partner. For more details, refer to .

Refer to diagram

The result of an API request signed by a secret key issued per registered service(ex> game) of partner. For more details, refer to .

Authentication
Attributes topic in the OpenSea Metadata document.
Authentication
Authentication
Mapping Item & Mint NFT
Mapping Item & Mint NFT
Burn NFT & Convert to In-Game Item