---
title: "getAllItems"
slug: "api/basket/operations/getallitems"
sidebar:
  order: 427
---

<a id="ref-12b6a38a4746"></a>
<a id="ref-83a76f1dbaff"></a>
<a id="ref-94f9a215915e"></a>

## Synopsis

```text
BasketItem[] getAllItems(SessionId sessionId,
    BItemId itemIds,
    GetAllItemsOptions options)
throws BasketServiceFault;
```

See also: [BasketItem](/pCon/configuratorOnline/specs/api/basket/types/basketitem#ref-1e1fbe880650), [SessionId](/pCon/configuratorOnline/specs/api/session/types/sessionid#ref-02e397c8fdb4), [BItemId](/pCon/configuratorOnline/specs/api/basket/types/bitemid#ref-bccb6c926e5b), [ItemSelectionOptions](/pCon/configuratorOnline/specs/api/basket/types/itemselectionoptions#ref-96d714d65dbc), [GetAllItemsOptions](/pCon/configuratorOnline/specs/api/basket/types/getallitemsoptions#ref-04fe4e1e21d1), [BasketServiceFault](/pCon/configuratorOnline/specs/api/basket/faults/basketservicefault#ref-d5adb74faa1b)

The `getAllItems` operation returns basic information about all items of the basket item tree maintained by the basket service for the session identified by the `sessionId` parameter and the items specified in the `itemIds` parameter. Return value is a list of `BasketItem` structures in the same order as produced by a pre-order traversal of the basket item hierarchy, starting with the (invisible) top folder. See section [BasketItem](/pCon/configuratorOnline/specs/api/basket/types/basketitem#ref-1e1fbe880650) for more information.

The final order of selected items is determined by a pre-order traversal of the basket item hierarchy.

The option `viewId` of [`ItemSelectionOptions`](/pCon/configuratorOnline/specs/api/basket/types/itemselectionoptions) is supported by this operation. If it contains the ID of a view then the behavior of the operation is changed as follows:

- Item IDs passed with parameter `itemIds` are interpreted as IDs of items within this view.

- The<a id="ref-38d1a8a183ec"></a> options `parentItems` and `subItems`, if set, affect the selection of additional view items.

Instances of [`BasketItem`](/pCon/configuratorOnline/specs/api/basket/types/basketitem) returned for view items do not contain fields `mainArticleId`, `subArticleIds`, `setArticleId`, `setArticlePartIds` and `geometryId`. Instances of `BasketItem` returned for referenced basket items (field `basketItems`) contain or may contain (depending on options `setArticleIds` and `geometryIds`) these fields.

A [`BasketServiceFault`](/pCon/configuratorOnline/specs/api/basket/faults/basketservicefault) is returned if any of the following conditions occurs:

- The `sessionId` parameter is not a valid string representation of an UUID or does not represent an open session.

- If the options parameter is present and duplicate item Ids occur.
