# C_CatalogShop: 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_CatalogShop

## Functions

### C_CatalogShop.BulkPurchaseProducts

```lua
canPurchaseProducts = C_CatalogShop.BulkPurchaseProducts(productIDs)
```

Arguments:
- `productIDs`: number[]

Returns:
- `canPurchaseProducts`: bool

### C_CatalogShop.BulkRefundDecors

```lua
C_CatalogShop.BulkRefundDecors(decorGUIDs)
```

Arguments:
- `decorGUIDs`: WOWGUID[]

### C_CatalogShop.CloseCatalogShopInteraction

```lua
C_CatalogShop.CloseCatalogShopInteraction()
```

### C_CatalogShop.ConfirmHousingPurchase

```lua
C_CatalogShop.ConfirmHousingPurchase(productIDs)
```

Arguments:
- `productIDs`: number[]

### C_CatalogShop.FindBestCurrencyProductForNeededAmount

```lua
vcProductID = C_CatalogShop.FindBestCurrencyProductForNeededAmount(vcCurrencyCode, amountNeeded)
```

Arguments:
- `vcCurrencyCode`: string
- `amountNeeded`: number

Returns:
- `vcProductID`: number, may be nil

### C_CatalogShop.GetAvailableCategoryIDs

```lua
categoryIDs = C_CatalogShop.GetAvailableCategoryIDs()
```

Returns:
- `categoryIDs`: number[]

### C_CatalogShop.GetAvailableTransmogRaceInfos

```lua
raceIDs = C_CatalogShop.GetAvailableTransmogRaceInfos()
```

Returns:
- `raceIDs`: AvailableRaceInfo[]

### C_CatalogShop.GetCatalogShopProductDisplayInfo

```lua
item = C_CatalogShop.GetCatalogShopProductDisplayInfo(catalogShopProductID)
```

Arguments:
- `catalogShopProductID`: number

Returns:
- `item`: CatalogShopProductDisplayInfo

### C_CatalogShop.GetCategoryInfo

```lua
categoryInfo = C_CatalogShop.GetCategoryInfo(categoryID)
```

Arguments:
- `categoryID`: number

Returns:
- `categoryInfo`: CatalogShopCategoryInfo

### C_CatalogShop.GetCategorySectionInfo

```lua
sectionInfo = C_CatalogShop.GetCategorySectionInfo(categoryID, sectionID)
```

Arguments:
- `categoryID`: number
- `sectionID`: number

Returns:
- `sectionInfo`: CatalogShopSectionInfo

### C_CatalogShop.GetFailureInfo

```lua
errorResultEnum, errorResultRaw = C_CatalogShop.GetFailureInfo()
```

Returns:
- `errorResultEnum`: StoreError, may be nil
- `errorResultRaw`: number, may be nil

### C_CatalogShop.GetFirstCategoryByProductID

```lua
categoryInfo = C_CatalogShop.GetFirstCategoryByProductID(productID)
```

Arguments:
- `productID`: number

Returns:
- `categoryInfo`: CatalogShopCategoryInfo, may be nil

### C_CatalogShop.GetNewProducts

```lua
newProducts = C_CatalogShop.GetNewProducts()
```

Returns:
- `newProducts`: number[]

### C_CatalogShop.GetProductAvailabilityTimeRemainingSecs

```lua
timeRemainingSecs = C_CatalogShop.GetProductAvailabilityTimeRemainingSecs(catalogShopProductID)
```

Arguments:
- `catalogShopProductID`: number

Returns:
- `timeRemainingSecs`: number, may be nil

### C_CatalogShop.GetProductIDsForBundle

```lua
childIDs = C_CatalogShop.GetProductIDsForBundle(bundleProductID)
```

Arguments:
- `bundleProductID`: number

Returns:
- `childIDs`: CatalogShopBundleChildInfo[]

### C_CatalogShop.GetProductIDsForCategory

```lua
productIDs = C_CatalogShop.GetProductIDsForCategory(categoryID)
```

Arguments:
- `categoryID`: number

Returns:
- `productIDs`: number[]

### C_CatalogShop.GetProductIDsForCategorySection

```lua
productIDs = C_CatalogShop.GetProductIDsForCategorySection(categoryID, sectionID)
```

Arguments:
- `categoryID`: number
- `sectionID`: number

Returns:
- `productIDs`: number[]

### C_CatalogShop.GetProductInfo

```lua
productInfo = C_CatalogShop.GetProductInfo(productID)
```

Arguments:
- `productID`: number

Returns:
- `productInfo`: CatalogShopProductInfo, may be nil

### C_CatalogShop.GetProductSortOrder

```lua
sortOrder = C_CatalogShop.GetProductSortOrder(categoryID, sectionID, productID)
```

Arguments:
- `categoryID`: number
- `sectionID`: number
- `productID`: number

Returns:
- `sortOrder`: number, may be nil

### C_CatalogShop.GetRefundableDecors

```lua
refundableDecorInfos, minTimeRemainingSeconds = C_CatalogShop.GetRefundableDecors([productIdFilterOpt])
```

Arguments:
- `productIdFilterOpt`: number, may be nil

Returns:
- `refundableDecorInfos`: RefundableDecorInfo[]
- `minTimeRemainingSeconds`: time_t

### C_CatalogShop.GetSectionIDsForCategory

```lua
sectionIDs = C_CatalogShop.GetSectionIDsForCategory(categoryID)
```

Arguments:
- `categoryID`: number

Returns:
- `sectionIDs`: number[]

### C_CatalogShop.GetSpellVisualInfoForMount

```lua
spellVisualInfo = C_CatalogShop.GetSpellVisualInfoForMount(spellVisualID)
```

Arguments:
- `spellVisualID`: number

Returns:
- `spellVisualInfo`: CatalogShopSpellVisualInfo

### C_CatalogShop.GetVCProductInfos

```lua
vcProductInfos = C_CatalogShop.GetVCProductInfos()
```

Returns:
- `vcProductInfos`: CatalogShopVCProductInfo[]

### C_CatalogShop.GetVirtualCurrencyBalance

```lua
balance = C_CatalogShop.GetVirtualCurrencyBalance(currencyCode)
```

Arguments:
- `currencyCode`: string

Returns:
- `balance`: string, may be nil

### C_CatalogShop.HasNewProducts

```lua
hasNewProducts = C_CatalogShop.HasNewProducts()
```

Returns:
- `hasNewProducts`: bool

### C_CatalogShop.IsProductIncludedInAnyBundle

```lua
isIncludedInAnyBundle = C_CatalogShop.IsProductIncludedInAnyBundle(productID)
```

Arguments:
- `productID`: number

Returns:
- `isIncludedInAnyBundle`: bool

### C_CatalogShop.IsShop2Enabled

```lua
value = C_CatalogShop.IsShop2Enabled()
```

Returns:
- `value`: bool, may be nil

### C_CatalogShop.OnLegalDisclaimerClicked

```lua
C_CatalogShop.OnLegalDisclaimerClicked(catalogShopProductID)
```

Arguments:
- `catalogShopProductID`: number

### C_CatalogShop.OnLegalPersonalizedOptOutClicked

```lua
C_CatalogShop.OnLegalPersonalizedOptOutClicked()
```

### C_CatalogShop.OpenCatalogShopInteractionFromHouse

```lua
shoppingSessionUUIDStr = C_CatalogShop.OpenCatalogShopInteractionFromHouse()
```

Returns:
- `shoppingSessionUUIDStr`: string

### C_CatalogShop.OpenCatalogShopInteractionFromShop

```lua
shoppingSessionUUIDStr = C_CatalogShop.OpenCatalogShopInteractionFromShop()
```

Returns:
- `shoppingSessionUUIDStr`: string

### C_CatalogShop.ProductDisplayedTelemetry

```lua
C_CatalogShop.ProductDisplayedTelemetry(categoryId, sectionId, catalogShopProductID)
```

Arguments:
- `categoryId`: number
- `sectionId`: number
- `catalogShopProductID`: number

### C_CatalogShop.ProductSelectedTelemetry

```lua
C_CatalogShop.ProductSelectedTelemetry(categoryId, sectionId, catalogShopProductID, wasCodeSelection)
```

Arguments:
- `categoryId`: number
- `sectionId`: number
- `catalogShopProductID`: number
- `wasCodeSelection`: bool

### C_CatalogShop.PurchaseProduct

```lua
canPurchase = C_CatalogShop.PurchaseProduct(productID)
```

Arguments:
- `productID`: number

Returns:
- `canPurchase`: bool

### C_CatalogShop.RefreshRefundableDecors

```lua
C_CatalogShop.RefreshRefundableDecors()
```

### C_CatalogShop.RefreshVirtualCurrencyBalance

```lua
C_CatalogShop.RefreshVirtualCurrencyBalance(currencyCode)
```

Arguments:
- `currencyCode`: string

### C_CatalogShop.ShouldShowHousingWarning

```lua
shouldShowHousingWarning = C_CatalogShop.ShouldShowHousingWarning()
```

Returns:
- `shouldShowHousingWarning`: bool

### C_CatalogShop.StartHousingVCPurchaseConfirmation

```lua
C_CatalogShop.StartHousingVCPurchaseConfirmation(productID)
```

Arguments:
- `productID`: number

## Events

### BULK_PURCHASE_RESULT_RECEIVED

Payload, after the event's name:
- `result`: BulkPurchaseResult
- `productResults`: BulkPurchaseIndividualProductResult[]
- `bestTopUpProductID`: number, may be nil
- `totalCost`: number, may be nil

### BULK_REFUND_RESULT_RECEIVED

Payload, after the event's name:
- `result`: BulkRefundResult

### CATALOG_SHOP_ADD_PENDING_PRODUCT

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

### CATALOG_SHOP_DATA_REFRESH

Payload, after the event's name:
- `shoppingSessionUUIDStr`: string, may be nil

### CATALOG_SHOP_DISABLED

No payload.

### CATALOG_SHOP_FETCH_FAILURE

Payload, after the event's name:
- `shoppingSessionUUIDStr`: string, may be nil

### CATALOG_SHOP_FETCH_SUCCESS

Payload, after the event's name:
- `shoppingSessionUUIDStr`: string, may be nil

### CATALOG_SHOP_OPEN_SIMPLE_CHECKOUT

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

### CATALOG_SHOP_PURCHASE_SUCCESS

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

### CATALOG_SHOP_REBUILD_SCROLL_BOX

No payload.

### CATALOG_SHOP_REFUNDABLE_DECORS_UPDATED

No payload.

### CATALOG_SHOP_REMOVE_PENDING_PRODUCT

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

### CATALOG_SHOP_RESULT_ERROR

No payload.

### CATALOG_SHOP_SPECIFIC_PRODUCT_REFRESH

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

### CATALOG_SHOP_VIRTUAL_CURRENCY_BALANCE_UPDATE

Payload, after the event's name:
- `currencyCode`: string
- `balance`: string

### CATALOG_SHOP_VIRTUAL_CURRENCY_BALANCE_UPDATE_FAILURE

Payload, after the event's name:
- `currencyCode`: string

### SET_SEEN_PRODUCTS

Payload, after the event's name:
- `productIds`: number[]

### SHOW_NEW_PRODUCT_NOTIFICATION

No payload.

## Tables

### AvailableRaceInfo (structure)

- `raceID`: number
- `displayName`: string

### BulkPurchaseIndividualProductResult (structure)

- `recordId`: number
- `parentProductId`: number, may be nil
- `entitlementId`: string
- `externalTransactionId`: string
- `status`: SimpleOrderStatus

### CatalogShopBundleChildInfo (structure)

- `childProductID`: number
- `displayOrder`: number
- `quantityInBundle`: number

### CatalogShopCategoryInfo (structure)

- `ID`: number
- `displayName`: string
- `iconTexture`: string
- `linkTag`: string
- `isDisabled`: bool
- `showPersistentRefundButton`: bool

### CatalogShopProductDisplayInfo (structure)

- `defaultPreviewModelSceneID`: number
- `defaultCardModelSceneID`: number
- `defaultWideCardModelSceneID`: number
- `itemID`: number
- `overridePreviewModelSceneID`: number, may be nil
- `overrideCardModelSceneID`: number, may be nil
- `overrideWideCardModelSceneID`: number, may be nil
- `creatureDisplayInfoIDs`: number[]
- `spellVisualIDs`: number[]
- `mainHandItemModifiedAppearanceID`: number, may be nil
- `offHandItemModifiedAppearanceID`: number, may be nil
- `itemModifiedAppearanceIDs`: number[]
- `iconFileDataID`: number, may be nil
- `iconTextureKit`: textureKit, may be nil
- `productType`: string, may be nil
- `itemDescription`: string, may be nil
- `hasUnknownLicense`: bool
- `productPMTURL`: string, may be nil
- `additionalProductPMTURLs`: string[]
- `otherProductImageAtlasName`: string, may be nil
- `otherProductGameTitleBaseTag`: string, may be nil
- `otherProductGameType`: string, may be nil
- `customLoopingSoundStart`: number, may be nil
- `customLoopingSoundMiddle`: number, may be nil
- `customLoopingSoundEnd`: number, may be nil
- `specialActorID_1`: string, may be nil
- `specialActorID_2`: string, may be nil
- `specialActorID_3`: string, may be nil
- `specialActorID_4`: string, may be nil
- `specialActorID_5`: string, may be nil
- `gameFlavorID`: number, may be nil
- `decorFileDataID`: number, may be nil
- `quantity`: number, may be nil
- `houseTextureAtlas`: textureAtlas, may be nil

### CatalogShopProductInfo (structure)

- `catalogShopProductID`: number
- `name`: string
- `type`: string, may be nil
- `description`: string
- `iconTexture`: string
- `isFullyOwned`: bool
- `isPurchasePending`: bool
- `refundable`: bool
- `price`: string
- `originalPrice`: string
- `discountPercentage`: number
- `itemID`: number
- `mountID`: number
- `mountTypeName`: string
- `speciesID`: number
- `transmogSetID`: number
- `itemModifiedAppearanceID`: number
- `subItems`: CatalogShopSubItemInfo[]
- `subItemsLoaded`: bool
- `backgroundTexture`: string
- `foregroundTexture`: string, may be nil
- `smallCardBGTexture`: string, may be nil
- `smallCardFGTexture`: string, may be nil
- `wideCardBGTexture`: string, may be nil
- `wideCardFGTexture`: string, may be nil
- `previewIconTexture`: string, may be nil
- `optionalWideCardBackgroundTexture`: string, may be nil
- `isBundle`: bool
- `bundleChildrenSize`: number
- `licenseTermType`: number
- `licenseTermDuration`: number
- `virtualCurrencies`: CatalogShopVirtualCurrency[]
- `isHidden`: bool
- `isMystery`: bool
- `hasPendingOrders`: bool
- `numBundleDetailCards`: number
- `isDynamicallyDiscounted`: bool
- `shouldShowOriginalPrice`: bool
- `wideCardBGOverrideProductURL`: string, may be nil
- `previewBGOverrideProductURL`: string, may be nil
- `previewSmallBGOverrideProductURL`: string, may be nil
- `decorQuantity`: DecorQuantity, may be nil
- `isVCProduct`: bool
- `containsHousingItem`: bool
- `deferredGameTimeDays`: number

### CatalogShopSectionInfo (structure)

- `ID`: number
- `displayName`: string
- `parentCatalogShopCategoryInfoID`: number, may be nil
- `cardType`: string, may be nil
- `scrollGridSize`: number, may be nil
- `shouldShowRecommendationOptOutDisclaimer`: bool

### CatalogShopSpellVisualInfo (structure)

- `animID`: number, may be nil
- `spellVisualKitID`: number, may be nil

### CatalogShopSubItemInfo (structure)

- `name`: string
- `itemID`: number
- `itemAppearanceID`: number
- `invType`: string
- `quality`: ItemQuality

### CatalogShopVCProductInfo (structure)

- `vcProductID`: number

### CatalogShopVirtualCurrency (structure)

- `amount`: number
- `currencyCode`: string

### DecorQuantity (structure)

- `placedQuantity`: number
- `storedQuantity`: number

### RefundableDecorInfo (structure)

- `decorGUID`: WOWGUID
- `timeRemainingSeconds`: time_t
- `name`: string
- `price`: string

---
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."
