Inventory v2
Reference for the Inventory v2 endpoints on Roblox.
Base URL: https://inventory.roblox.com
Endpoints
Section titled “Endpoints”| Method | Path | Name |
|---|---|---|
GET | /v2/assets/:assetId/owners | getAssetsAssetidOwners |
DELETE | /v2/inventory/asset/:assetId | deleteInventoryAssetAssetid |
GET | /v2/users/:userId/inventory | getUsersUseridInventory |
GET | /v2/users/:userId/inventory/:assetTypeId | getUsersUseridInventoryAssettypeid |
getAssetsAssetidOwners
Section titled “getAssetsAssetidOwners”GET /v2/assets/:assetId/owners
Gets a list of owners of an asset.
Usage
import { fetchApi } from 'rozod';import { getAssetsAssetidOwners } from 'rozod/lib/endpoints/inventoryv2';
const data = await fetchApi(getAssetsAssetidOwners, { assetId: /* integer */, cursor: /* string? */, sortOrder: /* enum */});Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
assetId | integer | Yes | The asset id. |
cursor | string? | No | The paging cursor for the previous or next page. |
sortOrder | enum | Yes | Sorted by userAssetId |
Response
Section titled “Response”| Field | Type | Description |
|---|---|---|
previousPageCursor | string | |
nextPageCursor | string | |
data | object[] | See below |
data[] item fields:
| Field | Type | Description |
|---|---|---|
id | number | |
collectibleItemInstanceId | string | |
serialNumber | number | |
owner | object | See below |
created | string | |
updated | string |
owner fields:
| Field | Type | Description |
|---|---|---|
id | number | |
type | `“User" | "Group”` |
name | string |
Errors
Section titled “Errors”| Status | Description |
|---|---|
| 400 | 1: The asset id is invalid. |
| 403 | 2: You do not have permission to view the owners of this asset. |
deleteInventoryAssetAssetid
Section titled “deleteInventoryAssetAssetid”DELETE /v2/inventory/asset/:assetId
Give up an asset owned by the authenticated user.
Usage
import { fetchApi } from 'rozod';import { deleteInventoryAssetAssetid } from 'rozod/lib/endpoints/inventoryv2';
const data = await fetchApi(deleteInventoryAssetAssetid, { assetId: /* integer */});Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
assetId | integer | Yes | ID of the asset to delete. |
Response
Section titled “Response”Type: unknown
Errors
Section titled “Errors”| Status | Description |
|---|---|
| 401 | 0: Authorization has been denied for this request. 4: You are not authorized. |
| 403 | 0: Token Validation Failed 2: You don’t own the specified item. 3: The item is not allowed to be deleted. |
| 404 | 1: The item does not exist. |
| 500 | 0: An unknown error occured. |
getUsersUseridInventory
Section titled “getUsersUseridInventory”GET /v2/users/:userId/inventory
Get user’s inventory by multiple Roblox.Platform.Assets.AssetType.
Usage
import { fetchApi } from 'rozod';import { getUsersUseridInventory } from 'rozod/lib/endpoints/inventoryv2';
const data = await fetchApi(getUsersUseridInventory, { userId: /* integer */, assetTypes: /* array */});Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
userId | integer | Yes | The inventory owner’s userId. |
assetTypes | array | Yes | The asset types to query. |
Response
Section titled “Response”| Field | Type | Description |
|---|---|---|
previousPageCursor | string | |
nextPageCursor | string | |
data | object[] | See below |
data[] item fields:
| Field | Type | Description |
|---|---|---|
assetId | number | |
name | string | |
assetType | `“Image" | "TShirt" |
created | string |
Errors
Section titled “Errors”| Status | Description |
|---|---|
| 400 | 1: Invalid user Id. 2: Invalid asset type Id. |
| 403 | 3: Insufficient permission. 4: You are not authorized to view this user’s inventory. |
getUsersUseridInventoryAssettypeid
Section titled “getUsersUseridInventoryAssettypeid”GET /v2/users/:userId/inventory/:assetTypeId
Gets user’s inventory based on specific asset type
Usage
import { fetchApi } from 'rozod';import { getUsersUseridInventoryAssettypeid } from 'rozod/lib/endpoints/inventoryv2';
const data = await fetchApi(getUsersUseridInventoryAssettypeid, { userId: /* integer */, assetTypeId: /* integer */, cursor: /* string? */, sortOrder: /* enum */});Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
userId | integer | Yes | The user Id of the inventory owner |
assetTypeId | integer | Yes | The asset type Id of the items to get |
cursor | string? | No | The paging cursor for the previous or next page. |
sortOrder | enum | Yes | The order the results are sorted in. |
Response
Section titled “Response”| Field | Type | Description |
|---|---|---|
previousPageCursor | string | |
nextPageCursor | string | |
data | object[] | See below |
data[] item fields:
| Field | Type | Description |
|---|---|---|
expireAt | string | |
userAssetId | number | |
assetId | number | |
assetName | string | |
collectibleItemId | string | |
collectibleItemInstanceId | string | |
serialNumber | number | |
owner | object | See below |
created | string | |
updated | string |
owner fields:
| Field | Type | Description |
|---|---|---|
userId | number | |
username | string | |
buildersClubMembershipType | `“None" | "BC" |
Errors
Section titled “Errors”| Status | Description |
|---|---|
| 400 | 1: Invalid user Id. 2: Invalid asset type Id. |
| 403 | 3: Insufficient permission. 4: You are not authorized to view this user’s inventory. |