Clone a cart

Clones a cart according to the primary lines no. given by the user or else clones the cart creating an exact copy of the entire cart with all its contents. The cloned cart is created in the new status. The cartID parameter is required. Set the price query parameter to true to price the cart.
Clones a cart creating an exact copy of the entire cart with all its contents. The cloned cart is created in the new status. The cartID parameter is required. Set the price query parameter to true to price the cart.
For Price true clones a cart according to the line no. given by the user but if nothing is given then clones the whole cart creating an exact copy of the entire cart with all its contents.

Required Fields:

  • cartId (route) - required

Responses

  • 200 OK: the cloned cart (in New status) is returned.
  • 400 Bad Request: the cart is missing/invalid or cannot be cloned.
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

The cart identifier

Query Params
boolean
Defaults to false

A price query parameter that controls how pricing is handled during the clone operation. If the price parameter is not provided or set to the default value false, the API performs a clone without running pricing logic. This behavior is supported only for carts with cart usetype set to shadow, which are temporary, non-persistent carts used internally by the Digital Commerce. If set to true, the API clones the cart with pricing enabled. This is the preferred option for regular (non-shadow) carts. The pricing logic runs during cloning, and the cloned cart is saved and processed normally. At present, the price: false option is limited to shadow cart scenarios only.

boolean
Defaults to false

The is child object to clone

includes
array of strings

The includes

includes
boolean
Defaults to true

Flag to clone line items

boolean
Defaults to false

Indicate do we need to retain approval status from main cart to clone cart

boolean
Defaults to false

When true, each cloned line item's DerivedFrom field is set to the source line item's Id.

Body Params

The cart fields to copy

Fields that can be overridden on the destination cart when cloning.

string | null

Name of the cloned cart.

Account
object
string | null

Approval status of the cloned cart.

BillingPreference
object
BillToAccount
object
string | null

External business object identifier associated with the cart.

string | null

Type of the external business object associated with the cart.

ShipToAccount
object
date-time | null

Activation date for the cloned cart.

string | null

External identifier for the cloned cart.

string | null

Status of the cloned cart e.g. Draft, Finalized.

string | null

Use type of the cloned cart e.g. Opportunity, Account.

Owner
object
LineNumbers
array of int32s | null

Specific line numbers to clone. If empty, all lines are cloned.

LineNumbers
Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
string
enum
Defaults to application/json

Generated from available request content types

Allowed:
Responses

Language
Credentials
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
text/plain
application/json
text/json