---
title: "getFatherId"
slug: "api/basket/operations/getfatherid"
sidebar:
  order: 424
---

<a id="ref-676b571d4b81"></a>
<a id="ref-30dea8a6591f"></a>
<a id="ref-6e557af17dfc"></a>

## Synopsis

```text
BItemId getFatherId(SessionId sessionId,
    BItemId itemId,
    ViewId viewId)
throws BasketServiceFault;
```

See also: [BItemId](/pCon/configuratorOnline/specs/api/basket/types/bitemid#ref-bccb6c926e5b), [SessionId](/pCon/configuratorOnline/specs/api/session/types/sessionid#ref-02e397c8fdb4), [BasketServiceFault](/pCon/configuratorOnline/specs/api/basket/faults/basketservicefault#ref-d5adb74faa1b)

The `getFatherId` operation returns the basket item ID of the parent item of the basket item identified by the `itemId` parameter.

The `itemId` parameter must identify a basket item that is part of the basket item tree maintained by the basket service for the session identified by the `sessionId` parameter.

If the `itemId` parameter references the root node of the basket item tree then the operation returns the null-UUID (§[UUID](/pCon/configuratorOnline/specs/guide/web-service-interfaces/common-type-definitions/uuid#ref-2a898bc98aaf)).

If the argument `viewId` is present and neither an empty string nor the NIL-UUID then it must be the ID of a current basket view, the `itemId` argument must be the ID of an item of this view, and the returned item IDs will be IDs of items of this view.

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.

- The `itemId` parameter does not represent an UUID.

- The `itemId` parameter does not identify a basket item.
