---
title: "setItemAppData"
slug: "api/basket/operations/setitemappdata"
sidebar:
  order: 462
---

<a id="ref-4d650aa15b09"></a>
<a id="ref-7600417a96c8"></a>
<a id="ref-7c8c7218e14a"></a>

## Synopsis

```text
void setItemAppData(SessionId sessionId,
    BItemId itemId,
    string appKey,
    string[]  data)
throws BasketServiceFault;
```

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

The `setItemAppData` operation is used to attach application-specific (or client-specific) data to a basket item. This data can be accessed using the `getItemAppData` (§[getItemAppData](/pCon/configuratorOnline/specs/api/basket/operations/getitemappdata#ref-4fffc4147258)) operation and is part of the project file saved and loaded by the `saveSession` (§[saveSession](/pCon/configuratorOnline/specs/api/session/operations/savesession#ref-cc7e4d5d8203)) and `loadSession` (§[loadSession](/pCon/configuratorOnline/specs/api/session/operations/loadsession#ref-dcf6596732bf)) operations. For more information, see §[Application-Specific Data](/pCon/configuratorOnline/specs/guide/web-service-interfaces/application-specific-data#ref-bbab408e669b).

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.

A [`BasketServiceFault`](/pCon/configuratorOnline/specs/api/basket/faults/basketservicefault) is returned if one 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.

- One of the elements of `data` contains an invalid location path, or the location path is not followed by an equals sign (`=`).
