---
title: "changeBasketConfig"
slug: "api/basket/operations/changebasketconfig"
sidebar:
  order: 520
---

<a id="ref-77aea9cd5457"></a>
<a id="ref-35f373fe3af5"></a>
<a id="ref-69a05788d959"></a>

```text
void changeBasketConfig(SessionId sessionId, BasketConfig basketConfig)
throws BasketServiceFault;
```

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

This operation can be used to change the basket’s default view or currency[^1].

To change the default view, the attribute `defaultView` must be set to the ID of a current view of the basket. Setting the default view has no immediate effect, but it will be saved as part of the OBK file and applications that honour this information will use it to select the view initially displayed.

To change the basket’s currency the attribute `currency` must be set to a valid and supported currency code.

Operation `changeBasketConfig` ignores field `calculations`, and uses the value of field `defaultCalculation`, if present, to change the currently configured default calculation of the basket. In case of an empty string, the default calculation is removed (the default, not the calculation). Otherwise the value must be equal (after conversion to NFC) to the name of one of the calculations currently maintained by the basket as returned by operation `getBasketConfig` in field `calculations`.

The operation fails without any change to the basket configuration if

A default view ID has been specified that is not a valid UUID or neither the NIL-UUID nor the ID of a current view of the basket.

A currency has been specified that is not a valid currency code (pseudo currencies are not accepted) or, if it is a valid currency code, currencies are not editable or the currency is not supported by the basket’s currency converter.

[^1]: The currency can also be changed with operation `setCurrency`.
