question

mounajistudio avatar image
mounajistudio asked

Catalog - Delete Item API problem

Hello !,
I am trying to delete items from the Catalog trough DeteteItem API, but i get an error with this message: "Catalog is not enabled for this title. Update catalog configuration to enable.". But not finding the way to enable it in the GameManager. There is something i am missing ?

The code for the call is like this, may i am missing some parameter in the Request maybe ?

async function DeleteItem(){
  return await new Promise((resolve, reject) => {
    PlayFab.settings.developerSecretKey = PlayFabDevKey;
  var deleteItemReq = {
    Entity: {
      Id: "", // he should the Title ID ?
      Type: "title"
        },
    Id: '2'
  }
    PlayFabEconomy.DeleteItem(deleteItemReq, (error, result) =>{
    if (error) {
        reject(error)
        console.log("Something went wrong DeleteItem call");
        console.log("Here's some debug information:");
        console.log(error)
        console.log(CompileErrorReport(error));
        return error    }
    else {
        resolve(result)
   }
        return result
    });
});
}
Thanks !
Lucilo del Castillo
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Gosen Gao avatar image
Gosen Gao answered

DeleteItem is design for deleting UGC items(Catalog (V2)), if you want to delete items from common catalogs, you can use Admin API SetCatalogItems. Please note that this API will overwrite the original catalog with the catalog in its request. So if you want to delete some items, please get the original catalog with API GetCatalogItems and remove the items you want to delete from the catalog. Then you can use it as a parameter to delete those items.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.