> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Inventory Items

> Get current inventory items.

Allowed entity token types: title, master_player_account, title_player_account

## Error codes

This operation may return the following PlayFab errors:

| Error | Code |
| --- | --- |
| AccountDeleted | 1322 |
| DatabaseThroughputExceeded | 1113 |
| PreconditionFailed | 1610 |
| ResourceNotModified | 1606 |




## OpenAPI

````yaml /services/playfab/api-references/rest/economy/economy.openapi.json post /Inventory/GetInventoryItems
openapi: 3.0.0
info:
  version: '260922'
  title: PlayFab Economy API
  description: >-
    API methods for managing the catalog. Inventory manages in-game assets for
    any given entity. API methods for managing the versioned catalogs.
  termsOfService: https://playfab.com/terms/
  contact:
    url: https://community.playfab.com/index.html
  license:
    name: Apache 2.0
    url: https://github.com/PlayFab/API_Specs/blob/master/LICENSE
servers:
  - url: https://{titleId}.playfabapi.com
    description: PlayFab title endpoint
    variables:
      titleId:
        default: your_title_id
        description: Your PlayFab title ID (hex).
security: []
tags:
  - name: Catalog
    description: |-
      Catalog Management APIs. In general for Catalog APIs, 
                          Read APIs are limited to 100 requests in 60 seconds 
                          for Player Entities while Title Entities are limited to 10000 requests
                          in 10 seconds. For Write APIs, Player Entities are limited to 10 requests 
                          in 30 seconds and Title Entities are limited to 1000 requests in 10 seconds.
  - name: Inventory
    description: |-
      Player Inventory Management APIs. Inventory operations work on an 
                          eventually consistent system against a cache of the Catalog. It can take a few moments for 
                          changes to propagate. In general for Inventory APIs, Read APIs are limited to 100 requests 
                          in 60 seconds for Player Entities while Title Entities are limited to 10000 requests
                          in 10 seconds. For Write APIs, Player Entities are limited to 30 requests 
                          in 90 seconds and Title Entities are limited to 1000 requests in 10 seconds.
  - name: VersionedCatalog
    description: ''
paths:
  /Inventory/GetInventoryItems:
    post:
      tags:
        - Inventory
      summary: Get Inventory Items
      description: >
        Get current inventory items.


        Allowed entity token types: title, master_player_account,
        title_player_account


        ## Error codes


        This operation may return the following PlayFab errors:


        | Error | Code |

        | --- | --- |

        | AccountDeleted | 1322 |

        | DatabaseThroughputExceeded | 1113 |

        | PreconditionFailed | 1610 |

        | ResourceNotModified | 1606 |
      operationId: GetInventoryItems
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetInventoryItemsRequest'
        description: >-
          Given an entity type, entity identifier and container details, will
          get the entity's inventory items. 
      responses:
        '200':
          $ref: '#/components/responses/GetInventoryItemsResponse'
        '400':
          $ref: '#/components/responses/ApiErrorWrapper'
      security:
        - EntityToken: []
components:
  schemas:
    GetInventoryItemsRequest:
      description: >-
        Given an entity type, entity identifier and container details, will get
        the entity's inventory items. 
      type: object
      properties:
        CollectionId:
          description: >-
            The id of the entity's collection to perform this action on.
            (Default="default")
          type: string
        ContinuationToken:
          description: >-
            An opaque token used to retrieve the next page of items in the
            inventory, if any are available. Should be null on initial request.
          type: string
        Count:
          description: >-
            Number of items to retrieve. This value is optional. Maximum page
            size is 50. The default value is 10
          type: number
          x-actualtype: int32
        CustomTags:
          description: >-
            The optional custom tags associated with the request (e.g. build
            number, external trace identifiers, etc.).
          type: object
        Entity:
          allOf:
            - $ref: '#/components/schemas/EntityKey'
          description: The entity to perform this action on.
        Filter:
          description: >-
            OData Filter to refine the items returned. InventoryItem properties
            'type', 'id', and 'stackId' can be used in the filter. For example:
            "type eq 'currency'"
          type: string
      required:
        - Count
      example:
        Count: 5
    EntityKey:
      description: >-
        Combined entity type and ID structure which uniquely identifies a single
        entity.
      type: object
      properties:
        Id:
          description: Unique ID of the entity.
          type: string
        Type:
          description: >-
            Entity type. See
            https://learn.microsoft.com/gaming/playfab/features/data/entities/available-built-in-entity-types
          type: string
      required:
        - Id
    GetInventoryItemsResponse:
      type: object
      properties:
        ContinuationToken:
          description: >-
            An opaque token used to retrieve the next page of items, if any are
            available.
          type: string
        ETag:
          description: >-
            ETags are used for concurrency checking when updating resources.
            More information about using ETags can be found here:
            https://learn.microsoft.com/en-us/gaming/playfab/features/economy-v2/catalog/etags
          type: string
        Items:
          description: The requested inventory items.
          type: array
          items:
            $ref: '#/components/schemas/InventoryItem'
          x-isclass: true
      example:
        Items:
          - Id: 11111111-1111-1111-1111-111111111111
            StackId: default
            Amount: 5
            Type: catalogItem
          - Id: 22222222-2222-2222-2222-222222222222
            StackId: default
            Amount: 5
            Type: catalogItem
    ApiErrorWrapper:
      description: The basic wrapper around every failed API response
      type: object
      properties:
        code:
          description: Numerical HTTP code
          type: integer
        status:
          description: String HTTP code
          type: string
        error:
          description: Playfab error code
          type: string
        errorCode:
          description: Numerical PlayFab error code
          type: integer
        errorMessage:
          description: Description for the PlayFab errorCode
          type: string
        errorDetails:
          description: Detailed description of individual issues with the request object
          type: object
      required:
        - code
        - errorCode
    InventoryItem:
      type: object
      properties:
        Amount:
          description: The amount of the item.
          type: number
          x-actualtype: int32
        DisplayProperties:
          description: >-
            Game specific properties for display purposes. This is an arbitrary
            JSON blob. The Display Properties field has a 1000 byte limit.
          type: object
        ExpirationDate:
          description: >-
            Only used for subscriptions. The date of when the item will expire
            in UTC.
          type: string
        Id:
          description: >-
            The id of the item. This should correspond to the item id in the
            catalog.
          type: string
        StackId:
          description: The stack id of the item.
          type: string
        StartDate:
          description: >-
            Only used for subscriptions. The date of when the item started in
            UTC.
          type: string
        Type:
          description: >-
            The type of the item. This should correspond to the item type in the
            catalog.
          type: string
  responses:
    GetInventoryItemsResponse:
      description: ''
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                type: integer
                description: >-
                  The Http status code. If X-ReportErrorAsSuccess header is set
                  to true, this will report the actual http error code.
              status:
                type: string
                description: The Http status code as a string.
              data:
                $ref: '#/components/schemas/GetInventoryItemsResponse'
            example:
              code: 200
              status: OK
              data:
                Items:
                  - Id: 11111111-1111-1111-1111-111111111111
                    StackId: default
                    Amount: 5
                    Type: catalogItem
                  - Id: 22222222-2222-2222-2222-222222222222
                    StackId: default
                    Amount: 5
                    Type: catalogItem
    ApiErrorWrapper:
      description: This is the outer wrapper for all responses with errors
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorWrapper'
  securitySchemes:
    EntityToken:
      type: apiKey
      in: header
      name: X-EntityToken
      description: >-
        This API requires an Entity Session Token, available from the Entity
        GetEntityToken method.

````

## Related topics

- [Get Inventory Items](/services/playfab/api-references/rest/economy/inventory/get-inventory-items.md)
- [PFInventoryGetInventoryItemsAsync](/services/playfab/api-references/c/pfinventory/functions/pfinventorygetinventoryitemsasync.md)
- [Items and Inventory Overview](/services/playfab/economy-monetization/economy-v2/inventory/items-and-inventory-overview.md)
- [PFInventoryGetInventoryItemsRequest](/services/playfab/api-references/c/pfinventorytypes/structs/pfinventorygetinventoryitemsrequest.md)
- [PFInventoryGetInventoryItemsResponse](/services/playfab/api-references/c/pfinventorytypes/structs/pfinventorygetinventoryitemsresponse.md)
