Update Catalog Items
NOTE: This is a Legacy Economy API, and is in bugfix-only mode. All new Economy features are being developed only for version 2. Updates the catalog configuration for virtual goods in the specified catalog version
Error codes
This operation may return the following PlayFab errors:
| Error | Code |
|---|---|
| InvalidDropTable | 1201 |
| InvalidItemProperties | 1091 |
| InvalidJSONContent | 1200 |
| ProductDisabledForTitle | 1609 |
curl --request POST \
--url https://{titleId}.playfabapi.com/Admin/UpdateCatalogItems \
--header 'Content-Type: application/json' \
--header 'X-SecretKey: <api-key>' \
--data '
{
"CatalogVersion": "5",
"Catalog": [
{
"ItemId": "shield_level_5",
"ItemClass": "shields",
"DisplayName": "Level 5 Shield",
"Description": "Strong defense against projectile attacks",
"VirtualCurrencyPrices": {
"RM": 199,
"GV": 25
},
"RealCurrencyPrices": {
"GBP": 149,
"EUR": 169
}
},
{
"ItemId": "energy_boost_1",
"ItemClass": "boosts",
"DisplayName": "Energy Drink Six-Pack",
"Description": "Get a quick burst of energy whenever you need it",
"VirtualCurrencyPrices": {
"RM": 199,
"GV": 25
}
},
{
"ItemId": "required_item_for_grant_a_1",
"ItemClass": "sets",
"DisplayName": "Grant Set Item 1",
"Description": "Item 1 from the set of items needed to get Granted Item A for free",
"VirtualCurrencyPrices": {
"RM": 249,
"GV": 1500
}
},
{
"ItemId": "required_item_for_grant_a_2",
"ItemClass": "sets",
"DisplayName": "Grant Set Item 2",
"Description": "Item 2 from the set of items needed to get Granted Item A for free",
"VirtualCurrencyPrices": {
"RM": 249,
"GV": 1500
}
},
{
"ItemId": "required_item_for_grant_a_3",
"ItemClass": "sets",
"DisplayName": "Grant Set Item 3",
"Description": "Item 3 from the set of items needed to get Granted Item A for free",
"VirtualCurrencyPrices": {
"RM": 249,
"GV": 1500
}
},
{
"ItemId": "required_item_for_grant_a_4",
"ItemClass": "sets",
"DisplayName": "Grant Set Item 4",
"Description": "Item 4 from the set of items needed to get Granted Item A for free",
"VirtualCurrencyPrices": {
"RM": 249,
"GV": 1500
}
},
{
"ItemId": "granted_item_a",
"ItemClass": "sets",
"DisplayName": "Granted Item A",
"Description": "Bonus item granted for free once the full set of 4 Grant Set items are collected"
},
{
"ItemId": "consumable_item_1",
"ItemClass": "Consumables",
"DisplayName": "Consumable Item 1",
"Description": "Item demonstrating usage-based consumables",
"VirtualCurrencyPrices": {
"GV": 500
},
"Consumable": {
"UsageCount": 3
}
},
{
"ItemId": "consumable_item_2",
"ItemClass": "Consumables",
"DisplayName": "Consumable Item 2",
"Description": "Item demonstrating time-based consumables",
"VirtualCurrencyPrices": {
"GV": 750
},
"Consumable": {
"UsagePeriod": 3600,
"UsagePeriodGroup": "usage_group_1"
}
},
{
"ItemId": "sub_bundle_item_1",
"ItemClass": "Bundles",
"DisplayName": "Bundled Item 1",
"Description": "Item which is added to the user inventory as part of a bundle"
},
{
"ItemId": "sub_bundle_item_2",
"ItemClass": "Bundles",
"DisplayName": "Bundled Item 2",
"Description": "Item which is added to the user inventory as part of a bundle"
},
{
"ItemId": "item_bundle_1",
"ItemClass": "Bundles",
"DisplayName": "Item bundle 1",
"Description": "Item which, when added to the user inventory, also adds other bundled items",
"VirtualCurrencyPrices": {
"RM": 599
},
"Bundle": {
"BundledItems": [
"sub_bundle_item_1",
"sub_bundle_item_2"
],
"BundledResultTables": [
"random_result_1"
],
"BundledVirtualCurrencies": {
"GV": 1000
}
}
},
{
"ItemId": "key_item_1",
"ItemClass": "Containers",
"DisplayName": "Key Item 1",
"Description": "Key used to unlock Container 1",
"VirtualCurrencyPrices": {
"RM": 199
}
},
{
"ItemId": "sub_container_item_1",
"ItemClass": "Containers",
"DisplayName": "Container Item 1",
"Description": "Item which is added to the user inventory as part of opening a container"
},
{
"ItemId": "sub_container_item_2",
"ItemClass": "Containers",
"DisplayName": "Container Item 2",
"Description": "Item which is added to the user inventory as part of opening a container"
},
{
"ItemId": "item_container_1",
"ItemClass": "Containers",
"DisplayName": "Item Container 1",
"Description": "Item which, when opened with Key Item 1, also adds the items it holds to the user inventory",
"VirtualCurrencyPrices": {
"RM": 499
},
"Consumable": {
"UsageCount": 1
},
"Container": {
"KeyItemId": "key_item_1",
"ItemContents": [
"sub_container_item_1",
"sub_container_item_2"
],
"ResultTableContents": [
"random_result_1"
],
"VirtualCurrencyContents": {
"GV": 1000
}
}
},
{
"ItemId": "item_container_2",
"ItemClass": "Containers",
"DisplayName": "Item Container 2",
"Description": "Item which, when opened (no key needed), adds the items it holds to the user inventory",
"VirtualCurrencyPrices": {
"RM": 99
},
"Consumable": {
"UsageCount": 1
},
"Container": {
"VirtualCurrencyContents": {
"GV": 1000
}
}
},
{
"ItemId": "starterpack_1",
"ItemClass": "starterpacks",
"DisplayName": "Super Starter Pack",
"Description": "Everything you need to get started fast track at the right price"
}
]
}
'import requests
url = "https://{titleId}.playfabapi.com/Admin/UpdateCatalogItems"
payload = {
"CatalogVersion": "5",
"Catalog": [
{
"ItemId": "shield_level_5",
"ItemClass": "shields",
"DisplayName": "Level 5 Shield",
"Description": "Strong defense against projectile attacks",
"VirtualCurrencyPrices": {
"RM": 199,
"GV": 25
},
"RealCurrencyPrices": {
"GBP": 149,
"EUR": 169
}
},
{
"ItemId": "energy_boost_1",
"ItemClass": "boosts",
"DisplayName": "Energy Drink Six-Pack",
"Description": "Get a quick burst of energy whenever you need it",
"VirtualCurrencyPrices": {
"RM": 199,
"GV": 25
}
},
{
"ItemId": "required_item_for_grant_a_1",
"ItemClass": "sets",
"DisplayName": "Grant Set Item 1",
"Description": "Item 1 from the set of items needed to get Granted Item A for free",
"VirtualCurrencyPrices": {
"RM": 249,
"GV": 1500
}
},
{
"ItemId": "required_item_for_grant_a_2",
"ItemClass": "sets",
"DisplayName": "Grant Set Item 2",
"Description": "Item 2 from the set of items needed to get Granted Item A for free",
"VirtualCurrencyPrices": {
"RM": 249,
"GV": 1500
}
},
{
"ItemId": "required_item_for_grant_a_3",
"ItemClass": "sets",
"DisplayName": "Grant Set Item 3",
"Description": "Item 3 from the set of items needed to get Granted Item A for free",
"VirtualCurrencyPrices": {
"RM": 249,
"GV": 1500
}
},
{
"ItemId": "required_item_for_grant_a_4",
"ItemClass": "sets",
"DisplayName": "Grant Set Item 4",
"Description": "Item 4 from the set of items needed to get Granted Item A for free",
"VirtualCurrencyPrices": {
"RM": 249,
"GV": 1500
}
},
{
"ItemId": "granted_item_a",
"ItemClass": "sets",
"DisplayName": "Granted Item A",
"Description": "Bonus item granted for free once the full set of 4 Grant Set items are collected"
},
{
"ItemId": "consumable_item_1",
"ItemClass": "Consumables",
"DisplayName": "Consumable Item 1",
"Description": "Item demonstrating usage-based consumables",
"VirtualCurrencyPrices": { "GV": 500 },
"Consumable": { "UsageCount": 3 }
},
{
"ItemId": "consumable_item_2",
"ItemClass": "Consumables",
"DisplayName": "Consumable Item 2",
"Description": "Item demonstrating time-based consumables",
"VirtualCurrencyPrices": { "GV": 750 },
"Consumable": {
"UsagePeriod": 3600,
"UsagePeriodGroup": "usage_group_1"
}
},
{
"ItemId": "sub_bundle_item_1",
"ItemClass": "Bundles",
"DisplayName": "Bundled Item 1",
"Description": "Item which is added to the user inventory as part of a bundle"
},
{
"ItemId": "sub_bundle_item_2",
"ItemClass": "Bundles",
"DisplayName": "Bundled Item 2",
"Description": "Item which is added to the user inventory as part of a bundle"
},
{
"ItemId": "item_bundle_1",
"ItemClass": "Bundles",
"DisplayName": "Item bundle 1",
"Description": "Item which, when added to the user inventory, also adds other bundled items",
"VirtualCurrencyPrices": { "RM": 599 },
"Bundle": {
"BundledItems": ["sub_bundle_item_1", "sub_bundle_item_2"],
"BundledResultTables": ["random_result_1"],
"BundledVirtualCurrencies": { "GV": 1000 }
}
},
{
"ItemId": "key_item_1",
"ItemClass": "Containers",
"DisplayName": "Key Item 1",
"Description": "Key used to unlock Container 1",
"VirtualCurrencyPrices": { "RM": 199 }
},
{
"ItemId": "sub_container_item_1",
"ItemClass": "Containers",
"DisplayName": "Container Item 1",
"Description": "Item which is added to the user inventory as part of opening a container"
},
{
"ItemId": "sub_container_item_2",
"ItemClass": "Containers",
"DisplayName": "Container Item 2",
"Description": "Item which is added to the user inventory as part of opening a container"
},
{
"ItemId": "item_container_1",
"ItemClass": "Containers",
"DisplayName": "Item Container 1",
"Description": "Item which, when opened with Key Item 1, also adds the items it holds to the user inventory",
"VirtualCurrencyPrices": { "RM": 499 },
"Consumable": { "UsageCount": 1 },
"Container": {
"KeyItemId": "key_item_1",
"ItemContents": ["sub_container_item_1", "sub_container_item_2"],
"ResultTableContents": ["random_result_1"],
"VirtualCurrencyContents": { "GV": 1000 }
}
},
{
"ItemId": "item_container_2",
"ItemClass": "Containers",
"DisplayName": "Item Container 2",
"Description": "Item which, when opened (no key needed), adds the items it holds to the user inventory",
"VirtualCurrencyPrices": { "RM": 99 },
"Consumable": { "UsageCount": 1 },
"Container": { "VirtualCurrencyContents": { "GV": 1000 } }
},
{
"ItemId": "starterpack_1",
"ItemClass": "starterpacks",
"DisplayName": "Super Starter Pack",
"Description": "Everything you need to get started fast track at the right price"
}
]
}
headers = {
"X-SecretKey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-SecretKey': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
CatalogVersion: '5',
Catalog: [
{
ItemId: 'shield_level_5',
ItemClass: 'shields',
DisplayName: 'Level 5 Shield',
Description: 'Strong defense against projectile attacks',
VirtualCurrencyPrices: {RM: 199, GV: 25},
RealCurrencyPrices: {GBP: 149, EUR: 169}
},
{
ItemId: 'energy_boost_1',
ItemClass: 'boosts',
DisplayName: 'Energy Drink Six-Pack',
Description: 'Get a quick burst of energy whenever you need it',
VirtualCurrencyPrices: {RM: 199, GV: 25}
},
{
ItemId: 'required_item_for_grant_a_1',
ItemClass: 'sets',
DisplayName: 'Grant Set Item 1',
Description: 'Item 1 from the set of items needed to get Granted Item A for free',
VirtualCurrencyPrices: {RM: 249, GV: 1500}
},
{
ItemId: 'required_item_for_grant_a_2',
ItemClass: 'sets',
DisplayName: 'Grant Set Item 2',
Description: 'Item 2 from the set of items needed to get Granted Item A for free',
VirtualCurrencyPrices: {RM: 249, GV: 1500}
},
{
ItemId: 'required_item_for_grant_a_3',
ItemClass: 'sets',
DisplayName: 'Grant Set Item 3',
Description: 'Item 3 from the set of items needed to get Granted Item A for free',
VirtualCurrencyPrices: {RM: 249, GV: 1500}
},
{
ItemId: 'required_item_for_grant_a_4',
ItemClass: 'sets',
DisplayName: 'Grant Set Item 4',
Description: 'Item 4 from the set of items needed to get Granted Item A for free',
VirtualCurrencyPrices: {RM: 249, GV: 1500}
},
{
ItemId: 'granted_item_a',
ItemClass: 'sets',
DisplayName: 'Granted Item A',
Description: 'Bonus item granted for free once the full set of 4 Grant Set items are collected'
},
{
ItemId: 'consumable_item_1',
ItemClass: 'Consumables',
DisplayName: 'Consumable Item 1',
Description: 'Item demonstrating usage-based consumables',
VirtualCurrencyPrices: {GV: 500},
Consumable: {UsageCount: 3}
},
{
ItemId: 'consumable_item_2',
ItemClass: 'Consumables',
DisplayName: 'Consumable Item 2',
Description: 'Item demonstrating time-based consumables',
VirtualCurrencyPrices: {GV: 750},
Consumable: {UsagePeriod: 3600, UsagePeriodGroup: 'usage_group_1'}
},
{
ItemId: 'sub_bundle_item_1',
ItemClass: 'Bundles',
DisplayName: 'Bundled Item 1',
Description: 'Item which is added to the user inventory as part of a bundle'
},
{
ItemId: 'sub_bundle_item_2',
ItemClass: 'Bundles',
DisplayName: 'Bundled Item 2',
Description: 'Item which is added to the user inventory as part of a bundle'
},
{
ItemId: 'item_bundle_1',
ItemClass: 'Bundles',
DisplayName: 'Item bundle 1',
Description: 'Item which, when added to the user inventory, also adds other bundled items',
VirtualCurrencyPrices: {RM: 599},
Bundle: {
BundledItems: ['sub_bundle_item_1', 'sub_bundle_item_2'],
BundledResultTables: ['random_result_1'],
BundledVirtualCurrencies: {GV: 1000}
}
},
{
ItemId: 'key_item_1',
ItemClass: 'Containers',
DisplayName: 'Key Item 1',
Description: 'Key used to unlock Container 1',
VirtualCurrencyPrices: {RM: 199}
},
{
ItemId: 'sub_container_item_1',
ItemClass: 'Containers',
DisplayName: 'Container Item 1',
Description: 'Item which is added to the user inventory as part of opening a container'
},
{
ItemId: 'sub_container_item_2',
ItemClass: 'Containers',
DisplayName: 'Container Item 2',
Description: 'Item which is added to the user inventory as part of opening a container'
},
{
ItemId: 'item_container_1',
ItemClass: 'Containers',
DisplayName: 'Item Container 1',
Description: 'Item which, when opened with Key Item 1, also adds the items it holds to the user inventory',
VirtualCurrencyPrices: {RM: 499},
Consumable: {UsageCount: 1},
Container: {
KeyItemId: 'key_item_1',
ItemContents: ['sub_container_item_1', 'sub_container_item_2'],
ResultTableContents: ['random_result_1'],
VirtualCurrencyContents: {GV: 1000}
}
},
{
ItemId: 'item_container_2',
ItemClass: 'Containers',
DisplayName: 'Item Container 2',
Description: 'Item which, when opened (no key needed), adds the items it holds to the user inventory',
VirtualCurrencyPrices: {RM: 99},
Consumable: {UsageCount: 1},
Container: {VirtualCurrencyContents: {GV: 1000}}
},
{
ItemId: 'starterpack_1',
ItemClass: 'starterpacks',
DisplayName: 'Super Starter Pack',
Description: 'Everything you need to get started fast track at the right price'
}
]
})
};
fetch('https://{titleId}.playfabapi.com/Admin/UpdateCatalogItems', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{titleId}.playfabapi.com/Admin/UpdateCatalogItems",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'CatalogVersion' => '5',
'Catalog' => [
[
'ItemId' => 'shield_level_5',
'ItemClass' => 'shields',
'DisplayName' => 'Level 5 Shield',
'Description' => 'Strong defense against projectile attacks',
'VirtualCurrencyPrices' => [
'RM' => 199,
'GV' => 25
],
'RealCurrencyPrices' => [
'GBP' => 149,
'EUR' => 169
]
],
[
'ItemId' => 'energy_boost_1',
'ItemClass' => 'boosts',
'DisplayName' => 'Energy Drink Six-Pack',
'Description' => 'Get a quick burst of energy whenever you need it',
'VirtualCurrencyPrices' => [
'RM' => 199,
'GV' => 25
]
],
[
'ItemId' => 'required_item_for_grant_a_1',
'ItemClass' => 'sets',
'DisplayName' => 'Grant Set Item 1',
'Description' => 'Item 1 from the set of items needed to get Granted Item A for free',
'VirtualCurrencyPrices' => [
'RM' => 249,
'GV' => 1500
]
],
[
'ItemId' => 'required_item_for_grant_a_2',
'ItemClass' => 'sets',
'DisplayName' => 'Grant Set Item 2',
'Description' => 'Item 2 from the set of items needed to get Granted Item A for free',
'VirtualCurrencyPrices' => [
'RM' => 249,
'GV' => 1500
]
],
[
'ItemId' => 'required_item_for_grant_a_3',
'ItemClass' => 'sets',
'DisplayName' => 'Grant Set Item 3',
'Description' => 'Item 3 from the set of items needed to get Granted Item A for free',
'VirtualCurrencyPrices' => [
'RM' => 249,
'GV' => 1500
]
],
[
'ItemId' => 'required_item_for_grant_a_4',
'ItemClass' => 'sets',
'DisplayName' => 'Grant Set Item 4',
'Description' => 'Item 4 from the set of items needed to get Granted Item A for free',
'VirtualCurrencyPrices' => [
'RM' => 249,
'GV' => 1500
]
],
[
'ItemId' => 'granted_item_a',
'ItemClass' => 'sets',
'DisplayName' => 'Granted Item A',
'Description' => 'Bonus item granted for free once the full set of 4 Grant Set items are collected'
],
[
'ItemId' => 'consumable_item_1',
'ItemClass' => 'Consumables',
'DisplayName' => 'Consumable Item 1',
'Description' => 'Item demonstrating usage-based consumables',
'VirtualCurrencyPrices' => [
'GV' => 500
],
'Consumable' => [
'UsageCount' => 3
]
],
[
'ItemId' => 'consumable_item_2',
'ItemClass' => 'Consumables',
'DisplayName' => 'Consumable Item 2',
'Description' => 'Item demonstrating time-based consumables',
'VirtualCurrencyPrices' => [
'GV' => 750
],
'Consumable' => [
'UsagePeriod' => 3600,
'UsagePeriodGroup' => 'usage_group_1'
]
],
[
'ItemId' => 'sub_bundle_item_1',
'ItemClass' => 'Bundles',
'DisplayName' => 'Bundled Item 1',
'Description' => 'Item which is added to the user inventory as part of a bundle'
],
[
'ItemId' => 'sub_bundle_item_2',
'ItemClass' => 'Bundles',
'DisplayName' => 'Bundled Item 2',
'Description' => 'Item which is added to the user inventory as part of a bundle'
],
[
'ItemId' => 'item_bundle_1',
'ItemClass' => 'Bundles',
'DisplayName' => 'Item bundle 1',
'Description' => 'Item which, when added to the user inventory, also adds other bundled items',
'VirtualCurrencyPrices' => [
'RM' => 599
],
'Bundle' => [
'BundledItems' => [
'sub_bundle_item_1',
'sub_bundle_item_2'
],
'BundledResultTables' => [
'random_result_1'
],
'BundledVirtualCurrencies' => [
'GV' => 1000
]
]
],
[
'ItemId' => 'key_item_1',
'ItemClass' => 'Containers',
'DisplayName' => 'Key Item 1',
'Description' => 'Key used to unlock Container 1',
'VirtualCurrencyPrices' => [
'RM' => 199
]
],
[
'ItemId' => 'sub_container_item_1',
'ItemClass' => 'Containers',
'DisplayName' => 'Container Item 1',
'Description' => 'Item which is added to the user inventory as part of opening a container'
],
[
'ItemId' => 'sub_container_item_2',
'ItemClass' => 'Containers',
'DisplayName' => 'Container Item 2',
'Description' => 'Item which is added to the user inventory as part of opening a container'
],
[
'ItemId' => 'item_container_1',
'ItemClass' => 'Containers',
'DisplayName' => 'Item Container 1',
'Description' => 'Item which, when opened with Key Item 1, also adds the items it holds to the user inventory',
'VirtualCurrencyPrices' => [
'RM' => 499
],
'Consumable' => [
'UsageCount' => 1
],
'Container' => [
'KeyItemId' => 'key_item_1',
'ItemContents' => [
'sub_container_item_1',
'sub_container_item_2'
],
'ResultTableContents' => [
'random_result_1'
],
'VirtualCurrencyContents' => [
'GV' => 1000
]
]
],
[
'ItemId' => 'item_container_2',
'ItemClass' => 'Containers',
'DisplayName' => 'Item Container 2',
'Description' => 'Item which, when opened (no key needed), adds the items it holds to the user inventory',
'VirtualCurrencyPrices' => [
'RM' => 99
],
'Consumable' => [
'UsageCount' => 1
],
'Container' => [
'VirtualCurrencyContents' => [
'GV' => 1000
]
]
],
[
'ItemId' => 'starterpack_1',
'ItemClass' => 'starterpacks',
'DisplayName' => 'Super Starter Pack',
'Description' => 'Everything you need to get started fast track at the right price'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-SecretKey: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{titleId}.playfabapi.com/Admin/UpdateCatalogItems"
payload := strings.NewReader("{\n \"CatalogVersion\": \"5\",\n \"Catalog\": [\n {\n \"ItemId\": \"shield_level_5\",\n \"ItemClass\": \"shields\",\n \"DisplayName\": \"Level 5 Shield\",\n \"Description\": \"Strong defense against projectile attacks\",\n \"VirtualCurrencyPrices\": {\n \"RM\": 199,\n \"GV\": 25\n },\n \"RealCurrencyPrices\": {\n \"GBP\": 149,\n \"EUR\": 169\n }\n },\n {\n \"ItemId\": \"energy_boost_1\",\n \"ItemClass\": \"boosts\",\n \"DisplayName\": \"Energy Drink Six-Pack\",\n \"Description\": \"Get a quick burst of energy whenever you need it\",\n \"VirtualCurrencyPrices\": {\n \"RM\": 199,\n \"GV\": 25\n }\n },\n {\n \"ItemId\": \"required_item_for_grant_a_1\",\n \"ItemClass\": \"sets\",\n \"DisplayName\": \"Grant Set Item 1\",\n \"Description\": \"Item 1 from the set of items needed to get Granted Item A for free\",\n \"VirtualCurrencyPrices\": {\n \"RM\": 249,\n \"GV\": 1500\n }\n },\n {\n \"ItemId\": \"required_item_for_grant_a_2\",\n \"ItemClass\": \"sets\",\n \"DisplayName\": \"Grant Set Item 2\",\n \"Description\": \"Item 2 from the set of items needed to get Granted Item A for free\",\n \"VirtualCurrencyPrices\": {\n \"RM\": 249,\n \"GV\": 1500\n }\n },\n {\n \"ItemId\": \"required_item_for_grant_a_3\",\n \"ItemClass\": \"sets\",\n \"DisplayName\": \"Grant Set Item 3\",\n \"Description\": \"Item 3 from the set of items needed to get Granted Item A for free\",\n \"VirtualCurrencyPrices\": {\n \"RM\": 249,\n \"GV\": 1500\n }\n },\n {\n \"ItemId\": \"required_item_for_grant_a_4\",\n \"ItemClass\": \"sets\",\n \"DisplayName\": \"Grant Set Item 4\",\n \"Description\": \"Item 4 from the set of items needed to get Granted Item A for free\",\n \"VirtualCurrencyPrices\": {\n \"RM\": 249,\n \"GV\": 1500\n }\n },\n {\n \"ItemId\": \"granted_item_a\",\n \"ItemClass\": \"sets\",\n \"DisplayName\": \"Granted Item A\",\n \"Description\": \"Bonus item granted for free once the full set of 4 Grant Set items are collected\"\n },\n {\n \"ItemId\": \"consumable_item_1\",\n \"ItemClass\": \"Consumables\",\n \"DisplayName\": \"Consumable Item 1\",\n \"Description\": \"Item demonstrating usage-based consumables\",\n \"VirtualCurrencyPrices\": {\n \"GV\": 500\n },\n \"Consumable\": {\n \"UsageCount\": 3\n }\n },\n {\n \"ItemId\": \"consumable_item_2\",\n \"ItemClass\": \"Consumables\",\n \"DisplayName\": \"Consumable Item 2\",\n \"Description\": \"Item demonstrating time-based consumables\",\n \"VirtualCurrencyPrices\": {\n \"GV\": 750\n },\n \"Consumable\": {\n \"UsagePeriod\": 3600,\n \"UsagePeriodGroup\": \"usage_group_1\"\n }\n },\n {\n \"ItemId\": \"sub_bundle_item_1\",\n \"ItemClass\": \"Bundles\",\n \"DisplayName\": \"Bundled Item 1\",\n \"Description\": \"Item which is added to the user inventory as part of a bundle\"\n },\n {\n \"ItemId\": \"sub_bundle_item_2\",\n \"ItemClass\": \"Bundles\",\n \"DisplayName\": \"Bundled Item 2\",\n \"Description\": \"Item which is added to the user inventory as part of a bundle\"\n },\n {\n \"ItemId\": \"item_bundle_1\",\n \"ItemClass\": \"Bundles\",\n \"DisplayName\": \"Item bundle 1\",\n \"Description\": \"Item which, when added to the user inventory, also adds other bundled items\",\n \"VirtualCurrencyPrices\": {\n \"RM\": 599\n },\n \"Bundle\": {\n \"BundledItems\": [\n \"sub_bundle_item_1\",\n \"sub_bundle_item_2\"\n ],\n \"BundledResultTables\": [\n \"random_result_1\"\n ],\n \"BundledVirtualCurrencies\": {\n \"GV\": 1000\n }\n }\n },\n {\n \"ItemId\": \"key_item_1\",\n \"ItemClass\": \"Containers\",\n \"DisplayName\": \"Key Item 1\",\n \"Description\": \"Key used to unlock Container 1\",\n \"VirtualCurrencyPrices\": {\n \"RM\": 199\n }\n },\n {\n \"ItemId\": \"sub_container_item_1\",\n \"ItemClass\": \"Containers\",\n \"DisplayName\": \"Container Item 1\",\n \"Description\": \"Item which is added to the user inventory as part of opening a container\"\n },\n {\n \"ItemId\": \"sub_container_item_2\",\n \"ItemClass\": \"Containers\",\n \"DisplayName\": \"Container Item 2\",\n \"Description\": \"Item which is added to the user inventory as part of opening a container\"\n },\n {\n \"ItemId\": \"item_container_1\",\n \"ItemClass\": \"Containers\",\n \"DisplayName\": \"Item Container 1\",\n \"Description\": \"Item which, when opened with Key Item 1, also adds the items it holds to the user inventory\",\n \"VirtualCurrencyPrices\": {\n \"RM\": 499\n },\n \"Consumable\": {\n \"UsageCount\": 1\n },\n \"Container\": {\n \"KeyItemId\": \"key_item_1\",\n \"ItemContents\": [\n \"sub_container_item_1\",\n \"sub_container_item_2\"\n ],\n \"ResultTableContents\": [\n \"random_result_1\"\n ],\n \"VirtualCurrencyContents\": {\n \"GV\": 1000\n }\n }\n },\n {\n \"ItemId\": \"item_container_2\",\n \"ItemClass\": \"Containers\",\n \"DisplayName\": \"Item Container 2\",\n \"Description\": \"Item which, when opened (no key needed), adds the items it holds to the user inventory\",\n \"VirtualCurrencyPrices\": {\n \"RM\": 99\n },\n \"Consumable\": {\n \"UsageCount\": 1\n },\n \"Container\": {\n \"VirtualCurrencyContents\": {\n \"GV\": 1000\n }\n }\n },\n {\n \"ItemId\": \"starterpack_1\",\n \"ItemClass\": \"starterpacks\",\n \"DisplayName\": \"Super Starter Pack\",\n \"Description\": \"Everything you need to get started fast track at the right price\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-SecretKey", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{titleId}.playfabapi.com/Admin/UpdateCatalogItems")
.header("X-SecretKey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"CatalogVersion\": \"5\",\n \"Catalog\": [\n {\n \"ItemId\": \"shield_level_5\",\n \"ItemClass\": \"shields\",\n \"DisplayName\": \"Level 5 Shield\",\n \"Description\": \"Strong defense against projectile attacks\",\n \"VirtualCurrencyPrices\": {\n \"RM\": 199,\n \"GV\": 25\n },\n \"RealCurrencyPrices\": {\n \"GBP\": 149,\n \"EUR\": 169\n }\n },\n {\n \"ItemId\": \"energy_boost_1\",\n \"ItemClass\": \"boosts\",\n \"DisplayName\": \"Energy Drink Six-Pack\",\n \"Description\": \"Get a quick burst of energy whenever you need it\",\n \"VirtualCurrencyPrices\": {\n \"RM\": 199,\n \"GV\": 25\n }\n },\n {\n \"ItemId\": \"required_item_for_grant_a_1\",\n \"ItemClass\": \"sets\",\n \"DisplayName\": \"Grant Set Item 1\",\n \"Description\": \"Item 1 from the set of items needed to get Granted Item A for free\",\n \"VirtualCurrencyPrices\": {\n \"RM\": 249,\n \"GV\": 1500\n }\n },\n {\n \"ItemId\": \"required_item_for_grant_a_2\",\n \"ItemClass\": \"sets\",\n \"DisplayName\": \"Grant Set Item 2\",\n \"Description\": \"Item 2 from the set of items needed to get Granted Item A for free\",\n \"VirtualCurrencyPrices\": {\n \"RM\": 249,\n \"GV\": 1500\n }\n },\n {\n \"ItemId\": \"required_item_for_grant_a_3\",\n \"ItemClass\": \"sets\",\n \"DisplayName\": \"Grant Set Item 3\",\n \"Description\": \"Item 3 from the set of items needed to get Granted Item A for free\",\n \"VirtualCurrencyPrices\": {\n \"RM\": 249,\n \"GV\": 1500\n }\n },\n {\n \"ItemId\": \"required_item_for_grant_a_4\",\n \"ItemClass\": \"sets\",\n \"DisplayName\": \"Grant Set Item 4\",\n \"Description\": \"Item 4 from the set of items needed to get Granted Item A for free\",\n \"VirtualCurrencyPrices\": {\n \"RM\": 249,\n \"GV\": 1500\n }\n },\n {\n \"ItemId\": \"granted_item_a\",\n \"ItemClass\": \"sets\",\n \"DisplayName\": \"Granted Item A\",\n \"Description\": \"Bonus item granted for free once the full set of 4 Grant Set items are collected\"\n },\n {\n \"ItemId\": \"consumable_item_1\",\n \"ItemClass\": \"Consumables\",\n \"DisplayName\": \"Consumable Item 1\",\n \"Description\": \"Item demonstrating usage-based consumables\",\n \"VirtualCurrencyPrices\": {\n \"GV\": 500\n },\n \"Consumable\": {\n \"UsageCount\": 3\n }\n },\n {\n \"ItemId\": \"consumable_item_2\",\n \"ItemClass\": \"Consumables\",\n \"DisplayName\": \"Consumable Item 2\",\n \"Description\": \"Item demonstrating time-based consumables\",\n \"VirtualCurrencyPrices\": {\n \"GV\": 750\n },\n \"Consumable\": {\n \"UsagePeriod\": 3600,\n \"UsagePeriodGroup\": \"usage_group_1\"\n }\n },\n {\n \"ItemId\": \"sub_bundle_item_1\",\n \"ItemClass\": \"Bundles\",\n \"DisplayName\": \"Bundled Item 1\",\n \"Description\": \"Item which is added to the user inventory as part of a bundle\"\n },\n {\n \"ItemId\": \"sub_bundle_item_2\",\n \"ItemClass\": \"Bundles\",\n \"DisplayName\": \"Bundled Item 2\",\n \"Description\": \"Item which is added to the user inventory as part of a bundle\"\n },\n {\n \"ItemId\": \"item_bundle_1\",\n \"ItemClass\": \"Bundles\",\n \"DisplayName\": \"Item bundle 1\",\n \"Description\": \"Item which, when added to the user inventory, also adds other bundled items\",\n \"VirtualCurrencyPrices\": {\n \"RM\": 599\n },\n \"Bundle\": {\n \"BundledItems\": [\n \"sub_bundle_item_1\",\n \"sub_bundle_item_2\"\n ],\n \"BundledResultTables\": [\n \"random_result_1\"\n ],\n \"BundledVirtualCurrencies\": {\n \"GV\": 1000\n }\n }\n },\n {\n \"ItemId\": \"key_item_1\",\n \"ItemClass\": \"Containers\",\n \"DisplayName\": \"Key Item 1\",\n \"Description\": \"Key used to unlock Container 1\",\n \"VirtualCurrencyPrices\": {\n \"RM\": 199\n }\n },\n {\n \"ItemId\": \"sub_container_item_1\",\n \"ItemClass\": \"Containers\",\n \"DisplayName\": \"Container Item 1\",\n \"Description\": \"Item which is added to the user inventory as part of opening a container\"\n },\n {\n \"ItemId\": \"sub_container_item_2\",\n \"ItemClass\": \"Containers\",\n \"DisplayName\": \"Container Item 2\",\n \"Description\": \"Item which is added to the user inventory as part of opening a container\"\n },\n {\n \"ItemId\": \"item_container_1\",\n \"ItemClass\": \"Containers\",\n \"DisplayName\": \"Item Container 1\",\n \"Description\": \"Item which, when opened with Key Item 1, also adds the items it holds to the user inventory\",\n \"VirtualCurrencyPrices\": {\n \"RM\": 499\n },\n \"Consumable\": {\n \"UsageCount\": 1\n },\n \"Container\": {\n \"KeyItemId\": \"key_item_1\",\n \"ItemContents\": [\n \"sub_container_item_1\",\n \"sub_container_item_2\"\n ],\n \"ResultTableContents\": [\n \"random_result_1\"\n ],\n \"VirtualCurrencyContents\": {\n \"GV\": 1000\n }\n }\n },\n {\n \"ItemId\": \"item_container_2\",\n \"ItemClass\": \"Containers\",\n \"DisplayName\": \"Item Container 2\",\n \"Description\": \"Item which, when opened (no key needed), adds the items it holds to the user inventory\",\n \"VirtualCurrencyPrices\": {\n \"RM\": 99\n },\n \"Consumable\": {\n \"UsageCount\": 1\n },\n \"Container\": {\n \"VirtualCurrencyContents\": {\n \"GV\": 1000\n }\n }\n },\n {\n \"ItemId\": \"starterpack_1\",\n \"ItemClass\": \"starterpacks\",\n \"DisplayName\": \"Super Starter Pack\",\n \"Description\": \"Everything you need to get started fast track at the right price\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{titleId}.playfabapi.com/Admin/UpdateCatalogItems")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-SecretKey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"CatalogVersion\": \"5\",\n \"Catalog\": [\n {\n \"ItemId\": \"shield_level_5\",\n \"ItemClass\": \"shields\",\n \"DisplayName\": \"Level 5 Shield\",\n \"Description\": \"Strong defense against projectile attacks\",\n \"VirtualCurrencyPrices\": {\n \"RM\": 199,\n \"GV\": 25\n },\n \"RealCurrencyPrices\": {\n \"GBP\": 149,\n \"EUR\": 169\n }\n },\n {\n \"ItemId\": \"energy_boost_1\",\n \"ItemClass\": \"boosts\",\n \"DisplayName\": \"Energy Drink Six-Pack\",\n \"Description\": \"Get a quick burst of energy whenever you need it\",\n \"VirtualCurrencyPrices\": {\n \"RM\": 199,\n \"GV\": 25\n }\n },\n {\n \"ItemId\": \"required_item_for_grant_a_1\",\n \"ItemClass\": \"sets\",\n \"DisplayName\": \"Grant Set Item 1\",\n \"Description\": \"Item 1 from the set of items needed to get Granted Item A for free\",\n \"VirtualCurrencyPrices\": {\n \"RM\": 249,\n \"GV\": 1500\n }\n },\n {\n \"ItemId\": \"required_item_for_grant_a_2\",\n \"ItemClass\": \"sets\",\n \"DisplayName\": \"Grant Set Item 2\",\n \"Description\": \"Item 2 from the set of items needed to get Granted Item A for free\",\n \"VirtualCurrencyPrices\": {\n \"RM\": 249,\n \"GV\": 1500\n }\n },\n {\n \"ItemId\": \"required_item_for_grant_a_3\",\n \"ItemClass\": \"sets\",\n \"DisplayName\": \"Grant Set Item 3\",\n \"Description\": \"Item 3 from the set of items needed to get Granted Item A for free\",\n \"VirtualCurrencyPrices\": {\n \"RM\": 249,\n \"GV\": 1500\n }\n },\n {\n \"ItemId\": \"required_item_for_grant_a_4\",\n \"ItemClass\": \"sets\",\n \"DisplayName\": \"Grant Set Item 4\",\n \"Description\": \"Item 4 from the set of items needed to get Granted Item A for free\",\n \"VirtualCurrencyPrices\": {\n \"RM\": 249,\n \"GV\": 1500\n }\n },\n {\n \"ItemId\": \"granted_item_a\",\n \"ItemClass\": \"sets\",\n \"DisplayName\": \"Granted Item A\",\n \"Description\": \"Bonus item granted for free once the full set of 4 Grant Set items are collected\"\n },\n {\n \"ItemId\": \"consumable_item_1\",\n \"ItemClass\": \"Consumables\",\n \"DisplayName\": \"Consumable Item 1\",\n \"Description\": \"Item demonstrating usage-based consumables\",\n \"VirtualCurrencyPrices\": {\n \"GV\": 500\n },\n \"Consumable\": {\n \"UsageCount\": 3\n }\n },\n {\n \"ItemId\": \"consumable_item_2\",\n \"ItemClass\": \"Consumables\",\n \"DisplayName\": \"Consumable Item 2\",\n \"Description\": \"Item demonstrating time-based consumables\",\n \"VirtualCurrencyPrices\": {\n \"GV\": 750\n },\n \"Consumable\": {\n \"UsagePeriod\": 3600,\n \"UsagePeriodGroup\": \"usage_group_1\"\n }\n },\n {\n \"ItemId\": \"sub_bundle_item_1\",\n \"ItemClass\": \"Bundles\",\n \"DisplayName\": \"Bundled Item 1\",\n \"Description\": \"Item which is added to the user inventory as part of a bundle\"\n },\n {\n \"ItemId\": \"sub_bundle_item_2\",\n \"ItemClass\": \"Bundles\",\n \"DisplayName\": \"Bundled Item 2\",\n \"Description\": \"Item which is added to the user inventory as part of a bundle\"\n },\n {\n \"ItemId\": \"item_bundle_1\",\n \"ItemClass\": \"Bundles\",\n \"DisplayName\": \"Item bundle 1\",\n \"Description\": \"Item which, when added to the user inventory, also adds other bundled items\",\n \"VirtualCurrencyPrices\": {\n \"RM\": 599\n },\n \"Bundle\": {\n \"BundledItems\": [\n \"sub_bundle_item_1\",\n \"sub_bundle_item_2\"\n ],\n \"BundledResultTables\": [\n \"random_result_1\"\n ],\n \"BundledVirtualCurrencies\": {\n \"GV\": 1000\n }\n }\n },\n {\n \"ItemId\": \"key_item_1\",\n \"ItemClass\": \"Containers\",\n \"DisplayName\": \"Key Item 1\",\n \"Description\": \"Key used to unlock Container 1\",\n \"VirtualCurrencyPrices\": {\n \"RM\": 199\n }\n },\n {\n \"ItemId\": \"sub_container_item_1\",\n \"ItemClass\": \"Containers\",\n \"DisplayName\": \"Container Item 1\",\n \"Description\": \"Item which is added to the user inventory as part of opening a container\"\n },\n {\n \"ItemId\": \"sub_container_item_2\",\n \"ItemClass\": \"Containers\",\n \"DisplayName\": \"Container Item 2\",\n \"Description\": \"Item which is added to the user inventory as part of opening a container\"\n },\n {\n \"ItemId\": \"item_container_1\",\n \"ItemClass\": \"Containers\",\n \"DisplayName\": \"Item Container 1\",\n \"Description\": \"Item which, when opened with Key Item 1, also adds the items it holds to the user inventory\",\n \"VirtualCurrencyPrices\": {\n \"RM\": 499\n },\n \"Consumable\": {\n \"UsageCount\": 1\n },\n \"Container\": {\n \"KeyItemId\": \"key_item_1\",\n \"ItemContents\": [\n \"sub_container_item_1\",\n \"sub_container_item_2\"\n ],\n \"ResultTableContents\": [\n \"random_result_1\"\n ],\n \"VirtualCurrencyContents\": {\n \"GV\": 1000\n }\n }\n },\n {\n \"ItemId\": \"item_container_2\",\n \"ItemClass\": \"Containers\",\n \"DisplayName\": \"Item Container 2\",\n \"Description\": \"Item which, when opened (no key needed), adds the items it holds to the user inventory\",\n \"VirtualCurrencyPrices\": {\n \"RM\": 99\n },\n \"Consumable\": {\n \"UsageCount\": 1\n },\n \"Container\": {\n \"VirtualCurrencyContents\": {\n \"GV\": 1000\n }\n }\n },\n {\n \"ItemId\": \"starterpack_1\",\n \"ItemClass\": \"starterpacks\",\n \"DisplayName\": \"Super Starter Pack\",\n \"Description\": \"Everything you need to get started fast track at the right price\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"code": 123,
"status": "<string>",
"data": {}
}{
"code": 123,
"errorCode": 123,
"status": "<string>",
"error": "<string>",
"errorMessage": "<string>",
"errorDetails": {}
}Authorizations
This API requires a title secret key, available to title admins, from PlayFab Game Manager.
Body
When used for SetCatalogItems, this operation is not additive. Using it will cause the indicated catalog version to be created from scratch. If there is an existing catalog with the version number in question, it will be deleted and replaced with only the items specified in this call. When used for UpdateCatalogItems, this operation is additive. Items with ItemId values not currently in the catalog will be added, while those with ItemId values matching items currently in the catalog will overwrite those items with the given values.
When used for SetCatalogItems, this operation is not additive. Using it will cause the indicated catalog version to be created from scratch. If there is an existing catalog with the version number in question, it will be deleted and replaced with only the items specified in this call. When used for UpdateCatalogItems, this operation is additive. Items with ItemId values not currently in the catalog will be added, while those with ItemId values matching items currently in the catalog will overwrite those items with the given values.
Array of catalog items to be submitted. Note that while CatalogItem has a parameter for CatalogVersion, it is not required and ignored in this call.
Show child attributes
Show child attributes
Which catalog is being updated. If null, uses the default catalog.
The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
Should this catalog be set as the default catalog. Defaults to true. If there is currently no default catalog, this will always set it.
Was this page helpful?
curl --request POST \
--url https://{titleId}.playfabapi.com/Admin/UpdateCatalogItems \
--header 'Content-Type: application/json' \
--header 'X-SecretKey: <api-key>' \
--data '
{
"CatalogVersion": "5",
"Catalog": [
{
"ItemId": "shield_level_5",
"ItemClass": "shields",
"DisplayName": "Level 5 Shield",
"Description": "Strong defense against projectile attacks",
"VirtualCurrencyPrices": {
"RM": 199,
"GV": 25
},
"RealCurrencyPrices": {
"GBP": 149,
"EUR": 169
}
},
{
"ItemId": "energy_boost_1",
"ItemClass": "boosts",
"DisplayName": "Energy Drink Six-Pack",
"Description": "Get a quick burst of energy whenever you need it",
"VirtualCurrencyPrices": {
"RM": 199,
"GV": 25
}
},
{
"ItemId": "required_item_for_grant_a_1",
"ItemClass": "sets",
"DisplayName": "Grant Set Item 1",
"Description": "Item 1 from the set of items needed to get Granted Item A for free",
"VirtualCurrencyPrices": {
"RM": 249,
"GV": 1500
}
},
{
"ItemId": "required_item_for_grant_a_2",
"ItemClass": "sets",
"DisplayName": "Grant Set Item 2",
"Description": "Item 2 from the set of items needed to get Granted Item A for free",
"VirtualCurrencyPrices": {
"RM": 249,
"GV": 1500
}
},
{
"ItemId": "required_item_for_grant_a_3",
"ItemClass": "sets",
"DisplayName": "Grant Set Item 3",
"Description": "Item 3 from the set of items needed to get Granted Item A for free",
"VirtualCurrencyPrices": {
"RM": 249,
"GV": 1500
}
},
{
"ItemId": "required_item_for_grant_a_4",
"ItemClass": "sets",
"DisplayName": "Grant Set Item 4",
"Description": "Item 4 from the set of items needed to get Granted Item A for free",
"VirtualCurrencyPrices": {
"RM": 249,
"GV": 1500
}
},
{
"ItemId": "granted_item_a",
"ItemClass": "sets",
"DisplayName": "Granted Item A",
"Description": "Bonus item granted for free once the full set of 4 Grant Set items are collected"
},
{
"ItemId": "consumable_item_1",
"ItemClass": "Consumables",
"DisplayName": "Consumable Item 1",
"Description": "Item demonstrating usage-based consumables",
"VirtualCurrencyPrices": {
"GV": 500
},
"Consumable": {
"UsageCount": 3
}
},
{
"ItemId": "consumable_item_2",
"ItemClass": "Consumables",
"DisplayName": "Consumable Item 2",
"Description": "Item demonstrating time-based consumables",
"VirtualCurrencyPrices": {
"GV": 750
},
"Consumable": {
"UsagePeriod": 3600,
"UsagePeriodGroup": "usage_group_1"
}
},
{
"ItemId": "sub_bundle_item_1",
"ItemClass": "Bundles",
"DisplayName": "Bundled Item 1",
"Description": "Item which is added to the user inventory as part of a bundle"
},
{
"ItemId": "sub_bundle_item_2",
"ItemClass": "Bundles",
"DisplayName": "Bundled Item 2",
"Description": "Item which is added to the user inventory as part of a bundle"
},
{
"ItemId": "item_bundle_1",
"ItemClass": "Bundles",
"DisplayName": "Item bundle 1",
"Description": "Item which, when added to the user inventory, also adds other bundled items",
"VirtualCurrencyPrices": {
"RM": 599
},
"Bundle": {
"BundledItems": [
"sub_bundle_item_1",
"sub_bundle_item_2"
],
"BundledResultTables": [
"random_result_1"
],
"BundledVirtualCurrencies": {
"GV": 1000
}
}
},
{
"ItemId": "key_item_1",
"ItemClass": "Containers",
"DisplayName": "Key Item 1",
"Description": "Key used to unlock Container 1",
"VirtualCurrencyPrices": {
"RM": 199
}
},
{
"ItemId": "sub_container_item_1",
"ItemClass": "Containers",
"DisplayName": "Container Item 1",
"Description": "Item which is added to the user inventory as part of opening a container"
},
{
"ItemId": "sub_container_item_2",
"ItemClass": "Containers",
"DisplayName": "Container Item 2",
"Description": "Item which is added to the user inventory as part of opening a container"
},
{
"ItemId": "item_container_1",
"ItemClass": "Containers",
"DisplayName": "Item Container 1",
"Description": "Item which, when opened with Key Item 1, also adds the items it holds to the user inventory",
"VirtualCurrencyPrices": {
"RM": 499
},
"Consumable": {
"UsageCount": 1
},
"Container": {
"KeyItemId": "key_item_1",
"ItemContents": [
"sub_container_item_1",
"sub_container_item_2"
],
"ResultTableContents": [
"random_result_1"
],
"VirtualCurrencyContents": {
"GV": 1000
}
}
},
{
"ItemId": "item_container_2",
"ItemClass": "Containers",
"DisplayName": "Item Container 2",
"Description": "Item which, when opened (no key needed), adds the items it holds to the user inventory",
"VirtualCurrencyPrices": {
"RM": 99
},
"Consumable": {
"UsageCount": 1
},
"Container": {
"VirtualCurrencyContents": {
"GV": 1000
}
}
},
{
"ItemId": "starterpack_1",
"ItemClass": "starterpacks",
"DisplayName": "Super Starter Pack",
"Description": "Everything you need to get started fast track at the right price"
}
]
}
'import requests
url = "https://{titleId}.playfabapi.com/Admin/UpdateCatalogItems"
payload = {
"CatalogVersion": "5",
"Catalog": [
{
"ItemId": "shield_level_5",
"ItemClass": "shields",
"DisplayName": "Level 5 Shield",
"Description": "Strong defense against projectile attacks",
"VirtualCurrencyPrices": {
"RM": 199,
"GV": 25
},
"RealCurrencyPrices": {
"GBP": 149,
"EUR": 169
}
},
{
"ItemId": "energy_boost_1",
"ItemClass": "boosts",
"DisplayName": "Energy Drink Six-Pack",
"Description": "Get a quick burst of energy whenever you need it",
"VirtualCurrencyPrices": {
"RM": 199,
"GV": 25
}
},
{
"ItemId": "required_item_for_grant_a_1",
"ItemClass": "sets",
"DisplayName": "Grant Set Item 1",
"Description": "Item 1 from the set of items needed to get Granted Item A for free",
"VirtualCurrencyPrices": {
"RM": 249,
"GV": 1500
}
},
{
"ItemId": "required_item_for_grant_a_2",
"ItemClass": "sets",
"DisplayName": "Grant Set Item 2",
"Description": "Item 2 from the set of items needed to get Granted Item A for free",
"VirtualCurrencyPrices": {
"RM": 249,
"GV": 1500
}
},
{
"ItemId": "required_item_for_grant_a_3",
"ItemClass": "sets",
"DisplayName": "Grant Set Item 3",
"Description": "Item 3 from the set of items needed to get Granted Item A for free",
"VirtualCurrencyPrices": {
"RM": 249,
"GV": 1500
}
},
{
"ItemId": "required_item_for_grant_a_4",
"ItemClass": "sets",
"DisplayName": "Grant Set Item 4",
"Description": "Item 4 from the set of items needed to get Granted Item A for free",
"VirtualCurrencyPrices": {
"RM": 249,
"GV": 1500
}
},
{
"ItemId": "granted_item_a",
"ItemClass": "sets",
"DisplayName": "Granted Item A",
"Description": "Bonus item granted for free once the full set of 4 Grant Set items are collected"
},
{
"ItemId": "consumable_item_1",
"ItemClass": "Consumables",
"DisplayName": "Consumable Item 1",
"Description": "Item demonstrating usage-based consumables",
"VirtualCurrencyPrices": { "GV": 500 },
"Consumable": { "UsageCount": 3 }
},
{
"ItemId": "consumable_item_2",
"ItemClass": "Consumables",
"DisplayName": "Consumable Item 2",
"Description": "Item demonstrating time-based consumables",
"VirtualCurrencyPrices": { "GV": 750 },
"Consumable": {
"UsagePeriod": 3600,
"UsagePeriodGroup": "usage_group_1"
}
},
{
"ItemId": "sub_bundle_item_1",
"ItemClass": "Bundles",
"DisplayName": "Bundled Item 1",
"Description": "Item which is added to the user inventory as part of a bundle"
},
{
"ItemId": "sub_bundle_item_2",
"ItemClass": "Bundles",
"DisplayName": "Bundled Item 2",
"Description": "Item which is added to the user inventory as part of a bundle"
},
{
"ItemId": "item_bundle_1",
"ItemClass": "Bundles",
"DisplayName": "Item bundle 1",
"Description": "Item which, when added to the user inventory, also adds other bundled items",
"VirtualCurrencyPrices": { "RM": 599 },
"Bundle": {
"BundledItems": ["sub_bundle_item_1", "sub_bundle_item_2"],
"BundledResultTables": ["random_result_1"],
"BundledVirtualCurrencies": { "GV": 1000 }
}
},
{
"ItemId": "key_item_1",
"ItemClass": "Containers",
"DisplayName": "Key Item 1",
"Description": "Key used to unlock Container 1",
"VirtualCurrencyPrices": { "RM": 199 }
},
{
"ItemId": "sub_container_item_1",
"ItemClass": "Containers",
"DisplayName": "Container Item 1",
"Description": "Item which is added to the user inventory as part of opening a container"
},
{
"ItemId": "sub_container_item_2",
"ItemClass": "Containers",
"DisplayName": "Container Item 2",
"Description": "Item which is added to the user inventory as part of opening a container"
},
{
"ItemId": "item_container_1",
"ItemClass": "Containers",
"DisplayName": "Item Container 1",
"Description": "Item which, when opened with Key Item 1, also adds the items it holds to the user inventory",
"VirtualCurrencyPrices": { "RM": 499 },
"Consumable": { "UsageCount": 1 },
"Container": {
"KeyItemId": "key_item_1",
"ItemContents": ["sub_container_item_1", "sub_container_item_2"],
"ResultTableContents": ["random_result_1"],
"VirtualCurrencyContents": { "GV": 1000 }
}
},
{
"ItemId": "item_container_2",
"ItemClass": "Containers",
"DisplayName": "Item Container 2",
"Description": "Item which, when opened (no key needed), adds the items it holds to the user inventory",
"VirtualCurrencyPrices": { "RM": 99 },
"Consumable": { "UsageCount": 1 },
"Container": { "VirtualCurrencyContents": { "GV": 1000 } }
},
{
"ItemId": "starterpack_1",
"ItemClass": "starterpacks",
"DisplayName": "Super Starter Pack",
"Description": "Everything you need to get started fast track at the right price"
}
]
}
headers = {
"X-SecretKey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-SecretKey': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
CatalogVersion: '5',
Catalog: [
{
ItemId: 'shield_level_5',
ItemClass: 'shields',
DisplayName: 'Level 5 Shield',
Description: 'Strong defense against projectile attacks',
VirtualCurrencyPrices: {RM: 199, GV: 25},
RealCurrencyPrices: {GBP: 149, EUR: 169}
},
{
ItemId: 'energy_boost_1',
ItemClass: 'boosts',
DisplayName: 'Energy Drink Six-Pack',
Description: 'Get a quick burst of energy whenever you need it',
VirtualCurrencyPrices: {RM: 199, GV: 25}
},
{
ItemId: 'required_item_for_grant_a_1',
ItemClass: 'sets',
DisplayName: 'Grant Set Item 1',
Description: 'Item 1 from the set of items needed to get Granted Item A for free',
VirtualCurrencyPrices: {RM: 249, GV: 1500}
},
{
ItemId: 'required_item_for_grant_a_2',
ItemClass: 'sets',
DisplayName: 'Grant Set Item 2',
Description: 'Item 2 from the set of items needed to get Granted Item A for free',
VirtualCurrencyPrices: {RM: 249, GV: 1500}
},
{
ItemId: 'required_item_for_grant_a_3',
ItemClass: 'sets',
DisplayName: 'Grant Set Item 3',
Description: 'Item 3 from the set of items needed to get Granted Item A for free',
VirtualCurrencyPrices: {RM: 249, GV: 1500}
},
{
ItemId: 'required_item_for_grant_a_4',
ItemClass: 'sets',
DisplayName: 'Grant Set Item 4',
Description: 'Item 4 from the set of items needed to get Granted Item A for free',
VirtualCurrencyPrices: {RM: 249, GV: 1500}
},
{
ItemId: 'granted_item_a',
ItemClass: 'sets',
DisplayName: 'Granted Item A',
Description: 'Bonus item granted for free once the full set of 4 Grant Set items are collected'
},
{
ItemId: 'consumable_item_1',
ItemClass: 'Consumables',
DisplayName: 'Consumable Item 1',
Description: 'Item demonstrating usage-based consumables',
VirtualCurrencyPrices: {GV: 500},
Consumable: {UsageCount: 3}
},
{
ItemId: 'consumable_item_2',
ItemClass: 'Consumables',
DisplayName: 'Consumable Item 2',
Description: 'Item demonstrating time-based consumables',
VirtualCurrencyPrices: {GV: 750},
Consumable: {UsagePeriod: 3600, UsagePeriodGroup: 'usage_group_1'}
},
{
ItemId: 'sub_bundle_item_1',
ItemClass: 'Bundles',
DisplayName: 'Bundled Item 1',
Description: 'Item which is added to the user inventory as part of a bundle'
},
{
ItemId: 'sub_bundle_item_2',
ItemClass: 'Bundles',
DisplayName: 'Bundled Item 2',
Description: 'Item which is added to the user inventory as part of a bundle'
},
{
ItemId: 'item_bundle_1',
ItemClass: 'Bundles',
DisplayName: 'Item bundle 1',
Description: 'Item which, when added to the user inventory, also adds other bundled items',
VirtualCurrencyPrices: {RM: 599},
Bundle: {
BundledItems: ['sub_bundle_item_1', 'sub_bundle_item_2'],
BundledResultTables: ['random_result_1'],
BundledVirtualCurrencies: {GV: 1000}
}
},
{
ItemId: 'key_item_1',
ItemClass: 'Containers',
DisplayName: 'Key Item 1',
Description: 'Key used to unlock Container 1',
VirtualCurrencyPrices: {RM: 199}
},
{
ItemId: 'sub_container_item_1',
ItemClass: 'Containers',
DisplayName: 'Container Item 1',
Description: 'Item which is added to the user inventory as part of opening a container'
},
{
ItemId: 'sub_container_item_2',
ItemClass: 'Containers',
DisplayName: 'Container Item 2',
Description: 'Item which is added to the user inventory as part of opening a container'
},
{
ItemId: 'item_container_1',
ItemClass: 'Containers',
DisplayName: 'Item Container 1',
Description: 'Item which, when opened with Key Item 1, also adds the items it holds to the user inventory',
VirtualCurrencyPrices: {RM: 499},
Consumable: {UsageCount: 1},
Container: {
KeyItemId: 'key_item_1',
ItemContents: ['sub_container_item_1', 'sub_container_item_2'],
ResultTableContents: ['random_result_1'],
VirtualCurrencyContents: {GV: 1000}
}
},
{
ItemId: 'item_container_2',
ItemClass: 'Containers',
DisplayName: 'Item Container 2',
Description: 'Item which, when opened (no key needed), adds the items it holds to the user inventory',
VirtualCurrencyPrices: {RM: 99},
Consumable: {UsageCount: 1},
Container: {VirtualCurrencyContents: {GV: 1000}}
},
{
ItemId: 'starterpack_1',
ItemClass: 'starterpacks',
DisplayName: 'Super Starter Pack',
Description: 'Everything you need to get started fast track at the right price'
}
]
})
};
fetch('https://{titleId}.playfabapi.com/Admin/UpdateCatalogItems', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{titleId}.playfabapi.com/Admin/UpdateCatalogItems",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'CatalogVersion' => '5',
'Catalog' => [
[
'ItemId' => 'shield_level_5',
'ItemClass' => 'shields',
'DisplayName' => 'Level 5 Shield',
'Description' => 'Strong defense against projectile attacks',
'VirtualCurrencyPrices' => [
'RM' => 199,
'GV' => 25
],
'RealCurrencyPrices' => [
'GBP' => 149,
'EUR' => 169
]
],
[
'ItemId' => 'energy_boost_1',
'ItemClass' => 'boosts',
'DisplayName' => 'Energy Drink Six-Pack',
'Description' => 'Get a quick burst of energy whenever you need it',
'VirtualCurrencyPrices' => [
'RM' => 199,
'GV' => 25
]
],
[
'ItemId' => 'required_item_for_grant_a_1',
'ItemClass' => 'sets',
'DisplayName' => 'Grant Set Item 1',
'Description' => 'Item 1 from the set of items needed to get Granted Item A for free',
'VirtualCurrencyPrices' => [
'RM' => 249,
'GV' => 1500
]
],
[
'ItemId' => 'required_item_for_grant_a_2',
'ItemClass' => 'sets',
'DisplayName' => 'Grant Set Item 2',
'Description' => 'Item 2 from the set of items needed to get Granted Item A for free',
'VirtualCurrencyPrices' => [
'RM' => 249,
'GV' => 1500
]
],
[
'ItemId' => 'required_item_for_grant_a_3',
'ItemClass' => 'sets',
'DisplayName' => 'Grant Set Item 3',
'Description' => 'Item 3 from the set of items needed to get Granted Item A for free',
'VirtualCurrencyPrices' => [
'RM' => 249,
'GV' => 1500
]
],
[
'ItemId' => 'required_item_for_grant_a_4',
'ItemClass' => 'sets',
'DisplayName' => 'Grant Set Item 4',
'Description' => 'Item 4 from the set of items needed to get Granted Item A for free',
'VirtualCurrencyPrices' => [
'RM' => 249,
'GV' => 1500
]
],
[
'ItemId' => 'granted_item_a',
'ItemClass' => 'sets',
'DisplayName' => 'Granted Item A',
'Description' => 'Bonus item granted for free once the full set of 4 Grant Set items are collected'
],
[
'ItemId' => 'consumable_item_1',
'ItemClass' => 'Consumables',
'DisplayName' => 'Consumable Item 1',
'Description' => 'Item demonstrating usage-based consumables',
'VirtualCurrencyPrices' => [
'GV' => 500
],
'Consumable' => [
'UsageCount' => 3
]
],
[
'ItemId' => 'consumable_item_2',
'ItemClass' => 'Consumables',
'DisplayName' => 'Consumable Item 2',
'Description' => 'Item demonstrating time-based consumables',
'VirtualCurrencyPrices' => [
'GV' => 750
],
'Consumable' => [
'UsagePeriod' => 3600,
'UsagePeriodGroup' => 'usage_group_1'
]
],
[
'ItemId' => 'sub_bundle_item_1',
'ItemClass' => 'Bundles',
'DisplayName' => 'Bundled Item 1',
'Description' => 'Item which is added to the user inventory as part of a bundle'
],
[
'ItemId' => 'sub_bundle_item_2',
'ItemClass' => 'Bundles',
'DisplayName' => 'Bundled Item 2',
'Description' => 'Item which is added to the user inventory as part of a bundle'
],
[
'ItemId' => 'item_bundle_1',
'ItemClass' => 'Bundles',
'DisplayName' => 'Item bundle 1',
'Description' => 'Item which, when added to the user inventory, also adds other bundled items',
'VirtualCurrencyPrices' => [
'RM' => 599
],
'Bundle' => [
'BundledItems' => [
'sub_bundle_item_1',
'sub_bundle_item_2'
],
'BundledResultTables' => [
'random_result_1'
],
'BundledVirtualCurrencies' => [
'GV' => 1000
]
]
],
[
'ItemId' => 'key_item_1',
'ItemClass' => 'Containers',
'DisplayName' => 'Key Item 1',
'Description' => 'Key used to unlock Container 1',
'VirtualCurrencyPrices' => [
'RM' => 199
]
],
[
'ItemId' => 'sub_container_item_1',
'ItemClass' => 'Containers',
'DisplayName' => 'Container Item 1',
'Description' => 'Item which is added to the user inventory as part of opening a container'
],
[
'ItemId' => 'sub_container_item_2',
'ItemClass' => 'Containers',
'DisplayName' => 'Container Item 2',
'Description' => 'Item which is added to the user inventory as part of opening a container'
],
[
'ItemId' => 'item_container_1',
'ItemClass' => 'Containers',
'DisplayName' => 'Item Container 1',
'Description' => 'Item which, when opened with Key Item 1, also adds the items it holds to the user inventory',
'VirtualCurrencyPrices' => [
'RM' => 499
],
'Consumable' => [
'UsageCount' => 1
],
'Container' => [
'KeyItemId' => 'key_item_1',
'ItemContents' => [
'sub_container_item_1',
'sub_container_item_2'
],
'ResultTableContents' => [
'random_result_1'
],
'VirtualCurrencyContents' => [
'GV' => 1000
]
]
],
[
'ItemId' => 'item_container_2',
'ItemClass' => 'Containers',
'DisplayName' => 'Item Container 2',
'Description' => 'Item which, when opened (no key needed), adds the items it holds to the user inventory',
'VirtualCurrencyPrices' => [
'RM' => 99
],
'Consumable' => [
'UsageCount' => 1
],
'Container' => [
'VirtualCurrencyContents' => [
'GV' => 1000
]
]
],
[
'ItemId' => 'starterpack_1',
'ItemClass' => 'starterpacks',
'DisplayName' => 'Super Starter Pack',
'Description' => 'Everything you need to get started fast track at the right price'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-SecretKey: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{titleId}.playfabapi.com/Admin/UpdateCatalogItems"
payload := strings.NewReader("{\n \"CatalogVersion\": \"5\",\n \"Catalog\": [\n {\n \"ItemId\": \"shield_level_5\",\n \"ItemClass\": \"shields\",\n \"DisplayName\": \"Level 5 Shield\",\n \"Description\": \"Strong defense against projectile attacks\",\n \"VirtualCurrencyPrices\": {\n \"RM\": 199,\n \"GV\": 25\n },\n \"RealCurrencyPrices\": {\n \"GBP\": 149,\n \"EUR\": 169\n }\n },\n {\n \"ItemId\": \"energy_boost_1\",\n \"ItemClass\": \"boosts\",\n \"DisplayName\": \"Energy Drink Six-Pack\",\n \"Description\": \"Get a quick burst of energy whenever you need it\",\n \"VirtualCurrencyPrices\": {\n \"RM\": 199,\n \"GV\": 25\n }\n },\n {\n \"ItemId\": \"required_item_for_grant_a_1\",\n \"ItemClass\": \"sets\",\n \"DisplayName\": \"Grant Set Item 1\",\n \"Description\": \"Item 1 from the set of items needed to get Granted Item A for free\",\n \"VirtualCurrencyPrices\": {\n \"RM\": 249,\n \"GV\": 1500\n }\n },\n {\n \"ItemId\": \"required_item_for_grant_a_2\",\n \"ItemClass\": \"sets\",\n \"DisplayName\": \"Grant Set Item 2\",\n \"Description\": \"Item 2 from the set of items needed to get Granted Item A for free\",\n \"VirtualCurrencyPrices\": {\n \"RM\": 249,\n \"GV\": 1500\n }\n },\n {\n \"ItemId\": \"required_item_for_grant_a_3\",\n \"ItemClass\": \"sets\",\n \"DisplayName\": \"Grant Set Item 3\",\n \"Description\": \"Item 3 from the set of items needed to get Granted Item A for free\",\n \"VirtualCurrencyPrices\": {\n \"RM\": 249,\n \"GV\": 1500\n }\n },\n {\n \"ItemId\": \"required_item_for_grant_a_4\",\n \"ItemClass\": \"sets\",\n \"DisplayName\": \"Grant Set Item 4\",\n \"Description\": \"Item 4 from the set of items needed to get Granted Item A for free\",\n \"VirtualCurrencyPrices\": {\n \"RM\": 249,\n \"GV\": 1500\n }\n },\n {\n \"ItemId\": \"granted_item_a\",\n \"ItemClass\": \"sets\",\n \"DisplayName\": \"Granted Item A\",\n \"Description\": \"Bonus item granted for free once the full set of 4 Grant Set items are collected\"\n },\n {\n \"ItemId\": \"consumable_item_1\",\n \"ItemClass\": \"Consumables\",\n \"DisplayName\": \"Consumable Item 1\",\n \"Description\": \"Item demonstrating usage-based consumables\",\n \"VirtualCurrencyPrices\": {\n \"GV\": 500\n },\n \"Consumable\": {\n \"UsageCount\": 3\n }\n },\n {\n \"ItemId\": \"consumable_item_2\",\n \"ItemClass\": \"Consumables\",\n \"DisplayName\": \"Consumable Item 2\",\n \"Description\": \"Item demonstrating time-based consumables\",\n \"VirtualCurrencyPrices\": {\n \"GV\": 750\n },\n \"Consumable\": {\n \"UsagePeriod\": 3600,\n \"UsagePeriodGroup\": \"usage_group_1\"\n }\n },\n {\n \"ItemId\": \"sub_bundle_item_1\",\n \"ItemClass\": \"Bundles\",\n \"DisplayName\": \"Bundled Item 1\",\n \"Description\": \"Item which is added to the user inventory as part of a bundle\"\n },\n {\n \"ItemId\": \"sub_bundle_item_2\",\n \"ItemClass\": \"Bundles\",\n \"DisplayName\": \"Bundled Item 2\",\n \"Description\": \"Item which is added to the user inventory as part of a bundle\"\n },\n {\n \"ItemId\": \"item_bundle_1\",\n \"ItemClass\": \"Bundles\",\n \"DisplayName\": \"Item bundle 1\",\n \"Description\": \"Item which, when added to the user inventory, also adds other bundled items\",\n \"VirtualCurrencyPrices\": {\n \"RM\": 599\n },\n \"Bundle\": {\n \"BundledItems\": [\n \"sub_bundle_item_1\",\n \"sub_bundle_item_2\"\n ],\n \"BundledResultTables\": [\n \"random_result_1\"\n ],\n \"BundledVirtualCurrencies\": {\n \"GV\": 1000\n }\n }\n },\n {\n \"ItemId\": \"key_item_1\",\n \"ItemClass\": \"Containers\",\n \"DisplayName\": \"Key Item 1\",\n \"Description\": \"Key used to unlock Container 1\",\n \"VirtualCurrencyPrices\": {\n \"RM\": 199\n }\n },\n {\n \"ItemId\": \"sub_container_item_1\",\n \"ItemClass\": \"Containers\",\n \"DisplayName\": \"Container Item 1\",\n \"Description\": \"Item which is added to the user inventory as part of opening a container\"\n },\n {\n \"ItemId\": \"sub_container_item_2\",\n \"ItemClass\": \"Containers\",\n \"DisplayName\": \"Container Item 2\",\n \"Description\": \"Item which is added to the user inventory as part of opening a container\"\n },\n {\n \"ItemId\": \"item_container_1\",\n \"ItemClass\": \"Containers\",\n \"DisplayName\": \"Item Container 1\",\n \"Description\": \"Item which, when opened with Key Item 1, also adds the items it holds to the user inventory\",\n \"VirtualCurrencyPrices\": {\n \"RM\": 499\n },\n \"Consumable\": {\n \"UsageCount\": 1\n },\n \"Container\": {\n \"KeyItemId\": \"key_item_1\",\n \"ItemContents\": [\n \"sub_container_item_1\",\n \"sub_container_item_2\"\n ],\n \"ResultTableContents\": [\n \"random_result_1\"\n ],\n \"VirtualCurrencyContents\": {\n \"GV\": 1000\n }\n }\n },\n {\n \"ItemId\": \"item_container_2\",\n \"ItemClass\": \"Containers\",\n \"DisplayName\": \"Item Container 2\",\n \"Description\": \"Item which, when opened (no key needed), adds the items it holds to the user inventory\",\n \"VirtualCurrencyPrices\": {\n \"RM\": 99\n },\n \"Consumable\": {\n \"UsageCount\": 1\n },\n \"Container\": {\n \"VirtualCurrencyContents\": {\n \"GV\": 1000\n }\n }\n },\n {\n \"ItemId\": \"starterpack_1\",\n \"ItemClass\": \"starterpacks\",\n \"DisplayName\": \"Super Starter Pack\",\n \"Description\": \"Everything you need to get started fast track at the right price\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-SecretKey", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{titleId}.playfabapi.com/Admin/UpdateCatalogItems")
.header("X-SecretKey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"CatalogVersion\": \"5\",\n \"Catalog\": [\n {\n \"ItemId\": \"shield_level_5\",\n \"ItemClass\": \"shields\",\n \"DisplayName\": \"Level 5 Shield\",\n \"Description\": \"Strong defense against projectile attacks\",\n \"VirtualCurrencyPrices\": {\n \"RM\": 199,\n \"GV\": 25\n },\n \"RealCurrencyPrices\": {\n \"GBP\": 149,\n \"EUR\": 169\n }\n },\n {\n \"ItemId\": \"energy_boost_1\",\n \"ItemClass\": \"boosts\",\n \"DisplayName\": \"Energy Drink Six-Pack\",\n \"Description\": \"Get a quick burst of energy whenever you need it\",\n \"VirtualCurrencyPrices\": {\n \"RM\": 199,\n \"GV\": 25\n }\n },\n {\n \"ItemId\": \"required_item_for_grant_a_1\",\n \"ItemClass\": \"sets\",\n \"DisplayName\": \"Grant Set Item 1\",\n \"Description\": \"Item 1 from the set of items needed to get Granted Item A for free\",\n \"VirtualCurrencyPrices\": {\n \"RM\": 249,\n \"GV\": 1500\n }\n },\n {\n \"ItemId\": \"required_item_for_grant_a_2\",\n \"ItemClass\": \"sets\",\n \"DisplayName\": \"Grant Set Item 2\",\n \"Description\": \"Item 2 from the set of items needed to get Granted Item A for free\",\n \"VirtualCurrencyPrices\": {\n \"RM\": 249,\n \"GV\": 1500\n }\n },\n {\n \"ItemId\": \"required_item_for_grant_a_3\",\n \"ItemClass\": \"sets\",\n \"DisplayName\": \"Grant Set Item 3\",\n \"Description\": \"Item 3 from the set of items needed to get Granted Item A for free\",\n \"VirtualCurrencyPrices\": {\n \"RM\": 249,\n \"GV\": 1500\n }\n },\n {\n \"ItemId\": \"required_item_for_grant_a_4\",\n \"ItemClass\": \"sets\",\n \"DisplayName\": \"Grant Set Item 4\",\n \"Description\": \"Item 4 from the set of items needed to get Granted Item A for free\",\n \"VirtualCurrencyPrices\": {\n \"RM\": 249,\n \"GV\": 1500\n }\n },\n {\n \"ItemId\": \"granted_item_a\",\n \"ItemClass\": \"sets\",\n \"DisplayName\": \"Granted Item A\",\n \"Description\": \"Bonus item granted for free once the full set of 4 Grant Set items are collected\"\n },\n {\n \"ItemId\": \"consumable_item_1\",\n \"ItemClass\": \"Consumables\",\n \"DisplayName\": \"Consumable Item 1\",\n \"Description\": \"Item demonstrating usage-based consumables\",\n \"VirtualCurrencyPrices\": {\n \"GV\": 500\n },\n \"Consumable\": {\n \"UsageCount\": 3\n }\n },\n {\n \"ItemId\": \"consumable_item_2\",\n \"ItemClass\": \"Consumables\",\n \"DisplayName\": \"Consumable Item 2\",\n \"Description\": \"Item demonstrating time-based consumables\",\n \"VirtualCurrencyPrices\": {\n \"GV\": 750\n },\n \"Consumable\": {\n \"UsagePeriod\": 3600,\n \"UsagePeriodGroup\": \"usage_group_1\"\n }\n },\n {\n \"ItemId\": \"sub_bundle_item_1\",\n \"ItemClass\": \"Bundles\",\n \"DisplayName\": \"Bundled Item 1\",\n \"Description\": \"Item which is added to the user inventory as part of a bundle\"\n },\n {\n \"ItemId\": \"sub_bundle_item_2\",\n \"ItemClass\": \"Bundles\",\n \"DisplayName\": \"Bundled Item 2\",\n \"Description\": \"Item which is added to the user inventory as part of a bundle\"\n },\n {\n \"ItemId\": \"item_bundle_1\",\n \"ItemClass\": \"Bundles\",\n \"DisplayName\": \"Item bundle 1\",\n \"Description\": \"Item which, when added to the user inventory, also adds other bundled items\",\n \"VirtualCurrencyPrices\": {\n \"RM\": 599\n },\n \"Bundle\": {\n \"BundledItems\": [\n \"sub_bundle_item_1\",\n \"sub_bundle_item_2\"\n ],\n \"BundledResultTables\": [\n \"random_result_1\"\n ],\n \"BundledVirtualCurrencies\": {\n \"GV\": 1000\n }\n }\n },\n {\n \"ItemId\": \"key_item_1\",\n \"ItemClass\": \"Containers\",\n \"DisplayName\": \"Key Item 1\",\n \"Description\": \"Key used to unlock Container 1\",\n \"VirtualCurrencyPrices\": {\n \"RM\": 199\n }\n },\n {\n \"ItemId\": \"sub_container_item_1\",\n \"ItemClass\": \"Containers\",\n \"DisplayName\": \"Container Item 1\",\n \"Description\": \"Item which is added to the user inventory as part of opening a container\"\n },\n {\n \"ItemId\": \"sub_container_item_2\",\n \"ItemClass\": \"Containers\",\n \"DisplayName\": \"Container Item 2\",\n \"Description\": \"Item which is added to the user inventory as part of opening a container\"\n },\n {\n \"ItemId\": \"item_container_1\",\n \"ItemClass\": \"Containers\",\n \"DisplayName\": \"Item Container 1\",\n \"Description\": \"Item which, when opened with Key Item 1, also adds the items it holds to the user inventory\",\n \"VirtualCurrencyPrices\": {\n \"RM\": 499\n },\n \"Consumable\": {\n \"UsageCount\": 1\n },\n \"Container\": {\n \"KeyItemId\": \"key_item_1\",\n \"ItemContents\": [\n \"sub_container_item_1\",\n \"sub_container_item_2\"\n ],\n \"ResultTableContents\": [\n \"random_result_1\"\n ],\n \"VirtualCurrencyContents\": {\n \"GV\": 1000\n }\n }\n },\n {\n \"ItemId\": \"item_container_2\",\n \"ItemClass\": \"Containers\",\n \"DisplayName\": \"Item Container 2\",\n \"Description\": \"Item which, when opened (no key needed), adds the items it holds to the user inventory\",\n \"VirtualCurrencyPrices\": {\n \"RM\": 99\n },\n \"Consumable\": {\n \"UsageCount\": 1\n },\n \"Container\": {\n \"VirtualCurrencyContents\": {\n \"GV\": 1000\n }\n }\n },\n {\n \"ItemId\": \"starterpack_1\",\n \"ItemClass\": \"starterpacks\",\n \"DisplayName\": \"Super Starter Pack\",\n \"Description\": \"Everything you need to get started fast track at the right price\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{titleId}.playfabapi.com/Admin/UpdateCatalogItems")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-SecretKey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"CatalogVersion\": \"5\",\n \"Catalog\": [\n {\n \"ItemId\": \"shield_level_5\",\n \"ItemClass\": \"shields\",\n \"DisplayName\": \"Level 5 Shield\",\n \"Description\": \"Strong defense against projectile attacks\",\n \"VirtualCurrencyPrices\": {\n \"RM\": 199,\n \"GV\": 25\n },\n \"RealCurrencyPrices\": {\n \"GBP\": 149,\n \"EUR\": 169\n }\n },\n {\n \"ItemId\": \"energy_boost_1\",\n \"ItemClass\": \"boosts\",\n \"DisplayName\": \"Energy Drink Six-Pack\",\n \"Description\": \"Get a quick burst of energy whenever you need it\",\n \"VirtualCurrencyPrices\": {\n \"RM\": 199,\n \"GV\": 25\n }\n },\n {\n \"ItemId\": \"required_item_for_grant_a_1\",\n \"ItemClass\": \"sets\",\n \"DisplayName\": \"Grant Set Item 1\",\n \"Description\": \"Item 1 from the set of items needed to get Granted Item A for free\",\n \"VirtualCurrencyPrices\": {\n \"RM\": 249,\n \"GV\": 1500\n }\n },\n {\n \"ItemId\": \"required_item_for_grant_a_2\",\n \"ItemClass\": \"sets\",\n \"DisplayName\": \"Grant Set Item 2\",\n \"Description\": \"Item 2 from the set of items needed to get Granted Item A for free\",\n \"VirtualCurrencyPrices\": {\n \"RM\": 249,\n \"GV\": 1500\n }\n },\n {\n \"ItemId\": \"required_item_for_grant_a_3\",\n \"ItemClass\": \"sets\",\n \"DisplayName\": \"Grant Set Item 3\",\n \"Description\": \"Item 3 from the set of items needed to get Granted Item A for free\",\n \"VirtualCurrencyPrices\": {\n \"RM\": 249,\n \"GV\": 1500\n }\n },\n {\n \"ItemId\": \"required_item_for_grant_a_4\",\n \"ItemClass\": \"sets\",\n \"DisplayName\": \"Grant Set Item 4\",\n \"Description\": \"Item 4 from the set of items needed to get Granted Item A for free\",\n \"VirtualCurrencyPrices\": {\n \"RM\": 249,\n \"GV\": 1500\n }\n },\n {\n \"ItemId\": \"granted_item_a\",\n \"ItemClass\": \"sets\",\n \"DisplayName\": \"Granted Item A\",\n \"Description\": \"Bonus item granted for free once the full set of 4 Grant Set items are collected\"\n },\n {\n \"ItemId\": \"consumable_item_1\",\n \"ItemClass\": \"Consumables\",\n \"DisplayName\": \"Consumable Item 1\",\n \"Description\": \"Item demonstrating usage-based consumables\",\n \"VirtualCurrencyPrices\": {\n \"GV\": 500\n },\n \"Consumable\": {\n \"UsageCount\": 3\n }\n },\n {\n \"ItemId\": \"consumable_item_2\",\n \"ItemClass\": \"Consumables\",\n \"DisplayName\": \"Consumable Item 2\",\n \"Description\": \"Item demonstrating time-based consumables\",\n \"VirtualCurrencyPrices\": {\n \"GV\": 750\n },\n \"Consumable\": {\n \"UsagePeriod\": 3600,\n \"UsagePeriodGroup\": \"usage_group_1\"\n }\n },\n {\n \"ItemId\": \"sub_bundle_item_1\",\n \"ItemClass\": \"Bundles\",\n \"DisplayName\": \"Bundled Item 1\",\n \"Description\": \"Item which is added to the user inventory as part of a bundle\"\n },\n {\n \"ItemId\": \"sub_bundle_item_2\",\n \"ItemClass\": \"Bundles\",\n \"DisplayName\": \"Bundled Item 2\",\n \"Description\": \"Item which is added to the user inventory as part of a bundle\"\n },\n {\n \"ItemId\": \"item_bundle_1\",\n \"ItemClass\": \"Bundles\",\n \"DisplayName\": \"Item bundle 1\",\n \"Description\": \"Item which, when added to the user inventory, also adds other bundled items\",\n \"VirtualCurrencyPrices\": {\n \"RM\": 599\n },\n \"Bundle\": {\n \"BundledItems\": [\n \"sub_bundle_item_1\",\n \"sub_bundle_item_2\"\n ],\n \"BundledResultTables\": [\n \"random_result_1\"\n ],\n \"BundledVirtualCurrencies\": {\n \"GV\": 1000\n }\n }\n },\n {\n \"ItemId\": \"key_item_1\",\n \"ItemClass\": \"Containers\",\n \"DisplayName\": \"Key Item 1\",\n \"Description\": \"Key used to unlock Container 1\",\n \"VirtualCurrencyPrices\": {\n \"RM\": 199\n }\n },\n {\n \"ItemId\": \"sub_container_item_1\",\n \"ItemClass\": \"Containers\",\n \"DisplayName\": \"Container Item 1\",\n \"Description\": \"Item which is added to the user inventory as part of opening a container\"\n },\n {\n \"ItemId\": \"sub_container_item_2\",\n \"ItemClass\": \"Containers\",\n \"DisplayName\": \"Container Item 2\",\n \"Description\": \"Item which is added to the user inventory as part of opening a container\"\n },\n {\n \"ItemId\": \"item_container_1\",\n \"ItemClass\": \"Containers\",\n \"DisplayName\": \"Item Container 1\",\n \"Description\": \"Item which, when opened with Key Item 1, also adds the items it holds to the user inventory\",\n \"VirtualCurrencyPrices\": {\n \"RM\": 499\n },\n \"Consumable\": {\n \"UsageCount\": 1\n },\n \"Container\": {\n \"KeyItemId\": \"key_item_1\",\n \"ItemContents\": [\n \"sub_container_item_1\",\n \"sub_container_item_2\"\n ],\n \"ResultTableContents\": [\n \"random_result_1\"\n ],\n \"VirtualCurrencyContents\": {\n \"GV\": 1000\n }\n }\n },\n {\n \"ItemId\": \"item_container_2\",\n \"ItemClass\": \"Containers\",\n \"DisplayName\": \"Item Container 2\",\n \"Description\": \"Item which, when opened (no key needed), adds the items it holds to the user inventory\",\n \"VirtualCurrencyPrices\": {\n \"RM\": 99\n },\n \"Consumable\": {\n \"UsageCount\": 1\n },\n \"Container\": {\n \"VirtualCurrencyContents\": {\n \"GV\": 1000\n }\n }\n },\n {\n \"ItemId\": \"starterpack_1\",\n \"ItemClass\": \"starterpacks\",\n \"DisplayName\": \"Super Starter Pack\",\n \"Description\": \"Everything you need to get started fast track at the right price\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"code": 123,
"status": "<string>",
"data": {}
}{
"code": 123,
"errorCode": 123,
"status": "<string>",
"error": "<string>",
"errorMessage": "<string>",
"errorDetails": {}
}