# C_HousingCatalog: World of Warcraft Forever API

Forever 1.60.1 (70959), Interface 16001, Lua 5.1, from Blizzard's own API documentation. Page: https://wowaddons.gg/forever-api/C_HousingCatalog

## Functions

### C_HousingCatalog.CreateCatalogSearcher

```lua
searcher = C_HousingCatalog.CreateCatalogSearcher()
```

Creates a new instance of a HousingCatalog searcher; This can be used to asynchronously search/filter the HousingCatalog without affecting/being restricted by the filter state of other Housing Catalog UI displays

Returns:
- `searcher`: HousingCatalogSearcher

### C_HousingCatalog.DeletePreviewCartDecor

```lua
C_HousingCatalog.DeletePreviewCartDecor(decorGUID)
```

Arguments:
- `decorGUID`: WOWGUID

### C_HousingCatalog.DestroyEntry

```lua
C_HousingCatalog.DestroyEntry(entryVariantID, destroyAll)
```

Attempt to delete the entry from storage

Arguments:
- `entryVariantID`: HousingCatalogEntryVariantID
- `destroyAll`: bool. If true, deletes all entries within the stack; If false, will only delete one

### C_HousingCatalog.GetAllFilterTagGroups

```lua
filterTagGroups = C_HousingCatalog.GetAllFilterTagGroups()
```

Returns:
- `filterTagGroups`: HousingCatalogFilterTagGroupInfo[]

### C_HousingCatalog.GetAllVariantInfosForEntry

```lua
variantInfos = C_HousingCatalog.GetAllVariantInfosForEntry(entryID)
```

Returns variant info for all variants of a given catalog entry; Variants represent different visual modifications of the same base entry (ex: dyed versions)

Arguments:
- `entryID`: HousingCatalogEntryID

Returns:
- `variantInfos`: HousingCatalogEntryVariantInfo[]

### C_HousingCatalog.GetBundleInfo

```lua
bundleInfo = C_HousingCatalog.GetBundleInfo(bundleCatalogShopProductID)
```

Arguments:
- `bundleCatalogShopProductID`: number

Returns:
- `bundleInfo`: HousingBundleInfo, may be nil

### C_HousingCatalog.GetCartSizeLimit

```lua
cartSizeLimit = C_HousingCatalog.GetCartSizeLimit()
```

Returns:
- `cartSizeLimit`: number

### C_HousingCatalog.GetCatalogCategoryAndSubcategoryNames

```lua
categoryName, subcategoryName = C_HousingCatalog.GetCatalogCategoryAndSubcategoryNames(subcategoryID)
```

If found, returns the names of the parent category and the specified subcategory

May return nothing.

Arguments:
- `subcategoryID`: number

Returns:
- `categoryName`: string
- `subcategoryName`: string

### C_HousingCatalog.GetCatalogCategoryInfo

```lua
info = C_HousingCatalog.GetCatalogCategoryInfo(categoryID)
```

Arguments:
- `categoryID`: number

Returns:
- `info`: HousingCatalogCategoryInfo, may be nil

### C_HousingCatalog.GetCatalogEntryInfo

```lua
info = C_HousingCatalog.GetCatalogEntryInfo(entryID)
```

Arguments:
- `entryID`: HousingCatalogEntryID

Returns:
- `info`: HousingCatalogEntryInfo, may be nil

### C_HousingCatalog.GetCatalogEntryInfoByItem

```lua
info = C_HousingCatalog.GetCatalogEntryInfoByItem(itemInfo)
```

Arguments:
- `itemInfo`: ItemInfo. ItemID, name, or link of an item that grants/corresponds to a particular type of housing catalog object (ex: decor)

Returns:
- `info`: HousingCatalogEntryInfo, may be nil

### C_HousingCatalog.GetCatalogEntryInfoByRecordID

```lua
info = C_HousingCatalog.GetCatalogEntryInfoByRecordID(entryType, recordID)
```

Arguments:
- `entryType`: HousingCatalogEntryType
- `recordID`: number

Returns:
- `info`: HousingCatalogEntryInfo, may be nil

### C_HousingCatalog.GetCatalogEntryRefundTimeStampByRecordID

```lua
refundTimeStamp = C_HousingCatalog.GetCatalogEntryRefundTimeStampByRecordID(entryType, recordID)
```

Arguments:
- `entryType`: HousingCatalogEntryType
- `recordID`: number

Returns:
- `refundTimeStamp`: time_t, may be nil

### C_HousingCatalog.GetCatalogEntryVariantInfo

```lua
info = C_HousingCatalog.GetCatalogEntryVariantInfo(entryVariantID)
```

Arguments:
- `entryVariantID`: HousingCatalogEntryVariantID

Returns:
- `info`: HousingCatalogEntryVariantInfo, may be nil

### C_HousingCatalog.GetCatalogSubcategoryInfo

```lua
info = C_HousingCatalog.GetCatalogSubcategoryInfo(subcategoryID)
```

Arguments:
- `subcategoryID`: number

Returns:
- `info`: HousingCatalogSubcategoryInfo, may be nil

### C_HousingCatalog.GetDecorMaxOwnedCount

```lua
maxOwnedCount = C_HousingCatalog.GetDecorMaxOwnedCount()
```

Returns the maximum total number of decor that can be in storage/in the house chest; Note that not all decor entries in storage count towards this limit (see GetDecorTotalOwnedCount)

Returns:
- `maxOwnedCount`: number

### C_HousingCatalog.GetDecorTotalOwnedCount

```lua
totalOwnedCount, exemptDecorCount = C_HousingCatalog.GetDecorTotalOwnedCount()
```

Returns:
- `totalOwnedCount`: number. The total number of owned decor in storage, including both exempt and non-exempt decor
- `exemptDecorCount`: number. The number of decor that do not count against the max storage limit

### C_HousingCatalog.GetDestroyableInstanceCount

```lua
destroyableInstanceCount = C_HousingCatalog.GetDestroyableInstanceCount(entryVariantID)
```

Returns the number of instances that can be to be destroyed in storage; These instances count towards the max storage limit

Arguments:
- `entryVariantID`: HousingCatalogEntryVariantID

Returns:
- `destroyableInstanceCount`: number

### C_HousingCatalog.GetFeaturedBundles

```lua
bundleInfos = C_HousingCatalog.GetFeaturedBundles()
```

Returns:
- `bundleInfos`: HousingBundleInfo[]

### C_HousingCatalog.GetFeaturedSmallProducts

```lua
infos = C_HousingCatalog.GetFeaturedSmallProducts()
```

Returns:
- `infos`: HousingFeaturedSmallProductInfo[]

### C_HousingCatalog.GetMarketInfoForDecor

```lua
marketInfo = C_HousingCatalog.GetMarketInfoForDecor(decorID)
```

Returns market info for a specific decor. This is decor-only for now but should be extended to support entry type and recordID generically

Arguments:
- `decorID`: number

Returns:
- `marketInfo`: HousingMarketInfo, may be nil

### C_HousingCatalog.HasFeaturedEntries

```lua
hasEntries = C_HousingCatalog.HasFeaturedEntries()
```

Returns:
- `hasEntries`: bool

### C_HousingCatalog.HousingMarketActionAddToCart

```lua
C_HousingCatalog.HousingMarketActionAddToCart(productID, withPreview)
```

Arguments:
- `productID`: number
- `withPreview`: bool

### C_HousingCatalog.HousingMarketActionClearCart

```lua
C_HousingCatalog.HousingMarketActionClearCart()
```

### C_HousingCatalog.HousingMarketActionRemoveFromCart

```lua
C_HousingCatalog.HousingMarketActionRemoveFromCart(productID)
```

Arguments:
- `productID`: number

### C_HousingCatalog.HousingMarketActionViewBundle

```lua
C_HousingCatalog.HousingMarketActionViewBundle(productID)
```

Arguments:
- `productID`: number

### C_HousingCatalog.HousingMarketActionViewInStore

```lua
C_HousingCatalog.HousingMarketActionViewInStore(productID)
```

Arguments:
- `productID`: number

### C_HousingCatalog.IsPreviewCartItemShown

```lua
isShown = C_HousingCatalog.IsPreviewCartItemShown(decorGUID)
```

Arguments:
- `decorGUID`: WOWGUID

Returns:
- `isShown`: bool

### C_HousingCatalog.PromotePreviewDecor

```lua
success = C_HousingCatalog.PromotePreviewDecor(decorID, previewDecorGUID)
```

Arguments:
- `decorID`: number
- `previewDecorGUID`: WOWGUID

Returns:
- `success`: bool

### C_HousingCatalog.RequestHousingMarketInfoRefresh

```lua
C_HousingCatalog.RequestHousingMarketInfoRefresh()
```

### C_HousingCatalog.RequestHousingMarketRefundInfo

```lua
C_HousingCatalog.RequestHousingMarketRefundInfo()
```

### C_HousingCatalog.SearchCatalogCategories

```lua
categoryIDs = C_HousingCatalog.SearchCatalogCategories(searchParams)
```

Arguments:
- `searchParams`: HousingCategorySearchInfo

Returns:
- `categoryIDs`: number[]

### C_HousingCatalog.SearchCatalogSubcategories

```lua
subcategoryIDs = C_HousingCatalog.SearchCatalogSubcategories(searchParams)
```

Arguments:
- `searchParams`: HousingCategorySearchInfo

Returns:
- `subcategoryIDs`: number[]

### C_HousingCatalog.SetPreviewCartItemShown

```lua
C_HousingCatalog.SetPreviewCartItemShown(decorGUID, shown)
```

Arguments:
- `decorGUID`: WOWGUID
- `shown`: bool

## Events

### HOUSING_CATALOG_CATEGORY_UPDATED

Payload, after the event's name:
- `categoryID`: number

### HOUSING_CATALOG_SUBCATEGORY_UPDATED

Payload, after the event's name:
- `subcategoryID`: number

### HOUSING_DECOR_ADD_TO_PREVIEW_LIST

Payload, after the event's name:
- `previewItemData`: HousingPreviewItemData

### HOUSING_DECOR_PREVIEW_LIST_REMOVE_FROM_WORLD

Payload, after the event's name:
- `decorGUID`: WOWGUID

### HOUSING_DECOR_PREVIEW_LIST_UPDATED

No payload.

### HOUSING_REFUND_LIST_UPDATED

No payload.

### HOUSING_STORAGE_ENTRY_UPDATED

Payload, after the event's name:
- `entryVariantID`: HousingCatalogEntryVariantID

### HOUSING_STORAGE_UPDATED

No payload.

## Tables

### HousingBundleDecorEntryInfo (structure)

- `decorID`: number
- `quantity`: number

### HousingBundleInfo (structure)

- `productID`: number
- `price`: number
- `originalPrice`: number, may be nil
- `nonDecorProducts`: number[]
- `decorEntries`: HousingBundleDecorEntryInfo[]
- `canPreview`: bool, default true. Bundles containing non-decor items cannot be previewed

### HousingCatalogCategoryInfo (structure)

- `ID`: number
- `orderIndex`: number
- `name`: cstring, may be nil
- `icon`: textureAtlas, may be nil
- `subcategoryIDs`: number[]
- `anyStoredEntries`: bool. True if the player owns anything that falls under this category

### HousingCatalogEntryInfo (structure)

Base information about an object in the Catalog; For info for a specific owned stack of this object, see HousingCatalogEntryVariantInfo

- `recordID`: number
- `entryType`: HousingCatalogEntryType
- `itemID`: number, may be nil
- `name`: cstring
- `asset`: ModelAsset, may be nil. 3D model asset for displaying in the UI; May be nil if the entry doesn't have a model, or has one that isn't supported by UI model scenes
- `iconTexture`: FileAsset, may be nil. Entry icon in the form of a texture file; Catalog entries should have either this OR an iconAtlas set
- `iconAtlas`: textureAtlas, may be nil. Entry icon in the form a texture atlas element; Catalog entries should have either this OR an iconTexture set
- `uiModelSceneID`: number, may be nil. Specific UI model scene ID to use when previewing this entry's 3D model; If not set, the default catalog model scene is used
- `categoryIDs`: number[]
- `subcategoryIDs`: number[]
- `dataTagsByID`: LuaValueVariant. Simple localized 'tag' strings that are primarily used for things like categorization and filtering
- `size`: HousingCatalogEntrySize
- `placementCost`: number. How much of the applicable budget placing this entry would cost (if any)
- `totalNumStored`: number. The total number of instances of this entry that exist in storage across all variants; Does not include unredeemed instances (see remainingRedeemable)
- `remainingRedeemable`: number. The number of unredeemed instances of this entry that exist in storage; Some auto-awarded housing objects are granted in this 'lazily-instantiated' way, and will be 'redeemed' on first being placed
- `totalNumPlaced`: number. The total number of instances of this entry that have been placed across all of the player's houses and plots, across all variants
- `destroyableInstanceCount`: number. The number of instances that can be destroyed for this entry.
- `isUniqueTrophy`: bool. This decor is flagged to display as a unique trophy item.
- `isAllowedOutdoors`: bool. True if this entry is something that is allowed to be placed outside, within a plot
- `isAllowedIndoors`: bool. True if this entry is something that is allowed to be placed indoors, within a house interior
- `canCustomize`: bool. True if this entry is something that can be customized; Kinds of customization vary depending on the entry type
- `isPrefab`: bool
- `quality`: ItemQuality, may be nil
- `firstAcquisitionBonus`: number. House XP that can be gained upon acquiring this entry for the first time
- `sourceText`: cstring. Describes specific sources this entry may be gained from; Faction-specific sources may or may not be included based on the current player's faction

### HousingCatalogEntryVariantInfo (structure)

Represents a single stack of instances of an object in the Catalog, that are all of a specific variation; For example, a stack of undyed chairs, or blue-dyed tables

- `entryVariantID`: HousingCatalogEntryVariantID
- `numStored`: number. The number of instances of this specific variant that exist in storage
- `dyeSlots`: HousingDecorDyeSlot[]. Dye slot information for this variant; Empty for entries that can't be dyed

### HousingCatalogSubcategoryInfo (structure)

- `ID`: number
- `orderIndex`: number
- `parentCategoryID`: number
- `name`: cstring, may be nil
- `icon`: textureAtlas, may be nil
- `anyStoredEntries`: bool. True if the player owns anything that falls under this subcategory

### HousingCategorySearchInfo (structure)

- `withStoredEntriesOnly`: bool, default false. If true, search will only return categories/subcategories that the player has something stored under
- `includeFeaturedCategory`: bool, default false
- `editorModeContext`: HouseEditorMode, may be nil. If set, will restrict results to only categories associated with/used by this Editor Mode

### HousingFeaturedSmallProductInfo (structure)

- `entryVariantID`: HousingCatalogEntryVariantID, may be nil
- `productID`: number
- `price`: number
- `originalPrice`: number, may be nil
- `canPreview`: bool

### HousingMarketInfo (structure)

- `price`: number
- `productID`: number
- `bundleIDs`: number[]

### HousingPreviewItemData (structure)

- `decorGUID`: WOWGUID, may be nil
- `productID`: number, may be nil
- `bundleCatalogShopProductID`: number, may be nil
- `isBundleParent`: bool
- `isBundleChild`: bool
- `id`: number
- `decorID`: number
- `name`: string
- `icon`: number
- `price`: number
- `salePrice`: number, may be nil

---
Make an addon with your AI: tell it "Read https://wowaddons.gg/agents.md, then make me a World of Warcraft Forever addon that …, try it with me in the game, and publish it."
