---
title: "paste"
slug: "api/basket/operations/paste"
sidebar:
  order: 466
---

<a id="ref-a2c183d5a12a"></a>
<a id="ref-46da4a6e0762"></a>
<a id="ref-f7a8941d9bd3"></a>

## Synopsis

```text
string[] paste(SessionId sessionId,
    BItemId fatherId,
    BItemId beforeId,
    string uri,
    PasteOptions options)
throws BasketServiceFault;
```

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

The `paste` operation of the basket web service is used to de-serialize the items contained in an OBX stream and insert them into the current basket at the position specified by the `fatherId` and `beforeId` parameters.

In general, OBX streams contain a forest of items. The root items are inserted as children of the parent item specified by `fatherId`, or the top folder if `fatherId` is the `NIL` ID.

If `beforeId` is the `NIL` ID, or if the item specified by `beforeId` is not a descendant of the parent item, they are  inserted at the end the list of children of the parent item. Otherwise, they are inserted into the list of child items immediately before the child item which is either the item specified by `beforeId`, or one of its ancestors.

If the value of the `uri` parameter must be an URI returned by the `copy` operation, an URL returned by the [getUploadURL](/pCon/configuratorOnline/specs/api/session/operations/getuploadurl#ref-5c73e4ded431) operation of the session service, or a file URL for a local file that can be accessed by EAIWS (depends on the configuration of EAIWS).

The `paste` operation of the basket service returns the item IDs of all pasted items.

The operation operation `paste` fails with a basket service fault

- if the BSK/OBX stream contains a set-article and the application license feature `egr.eai.basket.set_articles` is not enabled.

- if the number of items in the OBX stream, not counting basket sub-article items, is greater than one and the license feature `egr.eai.server.multiple_positions` is not enabled.

- if, after paste, the number of items, not counting the top folder and basket sub-article items, is greater than one and the license feature `egr.eai.server.multiple_positions` is not enabled.
