Skip to main content
Version: 5.7.0

SysAddCatalogItem

Create a new catalog item on the server.

ServiceOperation
itemCatalogSYS_ADD_CATALOG_ITEM

Method Parameters

ParameterDescription
defIdUnique ID for new catalog item. Required.
itemDefDataThe data defining the catalog item.

Usage

http://localhost:3000
// S2S call: to view example, switch to the Cloud Code or Raw tab.
JSON Response
{
"data": {
"defId": "sword001",
"name": {
"en": "Crimson Sword"
},
"desc": {
"en": "A sword whose blade was forged in Cherry Kool-aid!"
},
"type": "ITEM",
"category": "sword",
"tags": ["weapon", "pointy"],
"buyPrice": {
"coins": 200
},
"sellPrice": {
"coins": 150
},
"image": "//xxx.jpg",
"resourceGroup": "equipment.asset",
"resourceTag": "sword001",
"meta": {
"speed": 85,
"damage": 12,
"accuracy": 80,
"range": 5
},
"initData": {
"condition": 100,
"bonus": 0
},
"pState": "DRAFT",
"publishedAt": 0,
"createdAt": 1567192113061,
"updatedAt": 1567192113061,
"version": 1,
"stackable": false,
"consumable": false,
"uses": null,
"coolDownSecs": 0,
"recoverySecs": 0,
"activatable": false,
"statusName": null,
"activeSecs": null,
"tradable": false,
"blockchain": false,
"blockchainDefId": null
},
"status": 200
}