copyOrder

post

/ccstore/v1/orders/copyOrder

Copy Order. Duplicates given order. 1. The cloned order will always be in INCOMPLETE state 2. PaymentGroups and coupons/promotions if any would not be copied 3. If there is an already existing incomplete order it would be merged with newly created clone order. Optionally takes X-CCOrganization header which is a JSON field with organization ID as value. If this header is not provided, then the endPoint will consider first active organization as the current organization for a B2B user.

Request

Supported Media Types
Header Parameters
Body ()
Root Schema : copyOrder_request
Type: object
Show Source
Example:
{
    "orderId":"o30411",
    "incompleteOrderId":"o30413",
    "exclude":{
        "commerceItem":[
            "priceInfo",
            "externalPriceDetails"
        ],
        "order":[
            "approverMessages",
            "quoteInfo",
            "approverIds",
            "submittedDate",
            "originOfOrder",
            "createdByOrderId",
            "priceInfo",
            "externalOrderPriceDetails",
            "cancelReason"
        ]
    },
    "mergeShippingGroups":true
}
Nested Schema : exclude
Type: object
Properties to exclude at the time of copy order. Key is item descriptor name. Value is the aray of properties which we want to exclude
Show Source
Nested Schema : commerceItems
Type: array
Item descriptor name
Show Source
Nested Schema : order
Type: array
Item descriptor name
Show Source
Back to Top

Response

Supported Media Types

200 Response

Following model is returned when operation succeeds.
Body ()
Root Schema : copyOrder_response
Type: object
Show Source
Nested Schema : discountInfo
Type: object
The discount information.
Show Source
Nested Schema : dynamicProperties
Type: array
Read-only list of dynamic properties for the order along with meta-data.
Show Source
Nested Schema : giftWithPurchaseOrderMarkers
Type: array
gift with purchase order marker information
Show Source
Nested Schema : payments
Type: object
Payment details for the order, including additional properties specific to the payment type. This should be an empty array for request of a quote.
Show Source
Nested Schema : priceInfo
Type: object
The price information.
Show Source
Nested Schema : priceListGroup
Type: object
The price list group object.
Show Source
Nested Schema : quoteInfo
Type: object
the quote information of the order
Show Source
Nested Schema : recurringChargePriceInfo
Type: object
Recurring charge price information.
Show Source
Nested Schema : shippingAddress
Type: object
The shipping address details.
Show Source
Nested Schema : shippingGroups
Type: array
The shipping groups for the order.
Show Source
Nested Schema : shippingMethod
Type: object
The shipping method details for the order.
Show Source
Nested Schema : shoppingCart
Type: object
The shopping cart contents of the current order.
Show Source
Nested Schema : taxPriceInfo
Type: object
tax price information for the order
Show Source
Nested Schema : orderDiscountDescList
Type: array
The list of all the order discounts.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : errorInfo
Type: array
the array of errors, if any
Show Source
Nested Schema : notes
Type: array
the notes (history) for the order
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : frequencyAmountTotals
Type: array
The total for each recurring charge frequency
Show Source
Nested Schema : frequencyTaxTotals
Type: array
The tax for each recurring charge frequency
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: array
The array of products in the shipping group.
Show Source
Nested Schema : priceInfo
Type: object
The price information.
Show Source
Nested Schema : recurringChargePriceInfo
Type: object
Recurring charge price information.
Show Source
Nested Schema : shippingAddress
Type: object
The shipping address details.
Show Source
Nested Schema : shippingMethod
Type: object
The shipping method details for the order.
Show Source
Nested Schema : store
Type: object
Information about the Store from which items are being picked up from (if shipping group type is inStorePickupShippingGroup)
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : detailedRecurringChargeInfo
Type: object
Detailed Item Price Information.
Show Source
Nested Schema : discountInfo
Type: array
The discount information.
Show Source
Nested Schema : dynamicProperties
Type: array
Array of custom properties at order line item level.
Show Source
Nested Schema : externalData
Type: array
External data to be associated with a commerce item, provided by a configurator system.
Show Source
Nested Schema : variant
Type: array
List of variants for the product.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : values
Type: object
The array of values associated with an externalData item.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : frequencyAmountTotals
Type: array
The total for each recurring charge frequency
Show Source
Nested Schema : frequencyTaxTotals
Type: array
The tax for each recurring charge frequency
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: array
The array of products in the shopping cart.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : childItems
Type: array
The array of child items in the item, if the item is a configurable item. A child item can itself contain a child item array if it is a configurable product in itself.
Show Source
Nested Schema : detailedRecurringChargeInfo
Type: object
Detailed Item Price Information.
Show Source
Nested Schema : discountInfo
Type: array
The discount information.
Show Source
Nested Schema : dynamicProperties
Type: array
Array of custom properties at order line item level.
Show Source
Nested Schema : externalData
Type: array
External data to be associated with a commerce item, provided by a configurator system.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : externalData
Type: array
External data to be associated with a commerce item, provided by a configurator system.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : values
Type: object
The array of values associated with an externalData item.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : values
Type: object
The array of values associated with an externalData item.
Show Source
Example Response (application/json)
{
    "taxPriceInfo":{
        "cityTax":0,
        "secondaryCurrencyTaxAmount":0,
        "amount":0,
        "valueAddedTax":0,
        "countyTax":0,
        "isTaxIncluded":false,
        "miscTax":0,
        "districtTax":0,
        "stateTax":0,
        "countryTax":0
    },
    "shippingGroups":[
        {
            "shippingMethod":{
                "secondaryCurrencyTaxAmount":0,
                "shippingTax":0,
                "cost":0,
                "taxIncluded":true,
                "taxCode":"",
                "value":"hardgoodShippingGroup",
                "shippingMethodDescription":"hardgoodShippingGroup"
            },
            "shippingGroupId":"sg50411",
            "type":"hardgoodShippingGroup",
            "submittedDate":null,
            "priceInfo":{
                "amount":94.99,
                "total":94.99,
                "lkpValExcludingFreeShip":null,
                "shipping":0,
                "shippingSurchargeValue":0,
                "tax":0,
                "subTotal":94.99,
                "currencyCode":"USD",
                "totalWithoutTax":94.99
            },
            "discountInfo":{
                "orderDiscount":0,
                "shippingDiscount":0,
                "discountDescList":[
                ]
            },
            "shipOnDate":null,
            "trackingInfo":[
            ],
            "actualShipDate":null,
            "shippingAddress":{
                "lastName":null,
                "country":null,
                "address3":null,
                "address2":null,
                "city":null,
                "prefix":null,
                "address1":null,
                "postalCode":null,
                "companyName":null,
                "jobTitle":null,
                "county":null,
                "suffix":null,
                "firstName":null,
                "phoneNumber":null,
                "faxNumber":null,
                "alias":null,
                "middleName":null,
                "state":null,
                "email":null
            },
            "items":[
                {
                    "primaryThumbImageURL":"/ccstore/v1/images/?source=/file/v2677677363527107716/products/the-blind-side_LARGE.jpg&height=100&width=100",
                    "rawTotalPrice":19.99,
                    "returnedQuantity":0,
                    "dynamicProperties":[
                    ],
                    "displayName":"The Blind Side",
                    "shippingSurchargeValue":0,
                    "availabilityDate":null,
                    "externalData":[
                    ],
                    "discountAmount":0,
                    "preOrderQuantity":0,
                    "commerceItemId":"ci4000411",
                    "price":19.99,
                    "variant":[
                    ],
                    "onSale":false,
                    "primaryImageAltText":"The Blind Side",
                    "stateDetailsAsUser":"The item has been initialized within the shipping group",
                    "commerceId":"ci4000411",
                    "unitPrice":19.99,
                    "primaryImageTitle":"The Blind Side",
                    "amount":19.99,
                    "quantity":1,
                    "pointOfNoRevision":false,
                    "relationshipType":"SHIPPINGQUANTITYREMAINING",
                    "productId":"Product_5Dxy",
                    "salePrice":0,
                    "detailedItemPriceInfo":[
                        {
                            "discounted":false,
                            "secondaryCurrencyTaxAmount":0,
                            "amount":19.99,
                            "quantity":1,
                            "configurationDiscountShare":0,
                            "tax":0,
                            "orderDiscountShare":0,
                            "detailedUnitPrice":19.99,
                            "currencyCode":"USD"
                        }
                    ],
                    "active":true,
                    "catRefId":"Sku_5Exy",
                    "skuProperties":[
                        {
                            "propertyType":"sku-base",
                            "name":"listingSKUId",
                            "id":"listingSKUId",
                            "value":null
                        },
                        {
                            "propertyType":"sku-base",
                            "name":"Not Returnable",
                            "id":"nonreturnable",
                            "value":false
                        },
                        {
                            "propertyType":"sku-base",
                            "name":"Name",
                            "id":"displayName",
                            "value":null
                        },
                        {
                            "propertyType":"sku-base",
                            "name":"Active",
                            "id":"active",
                            "value":true
                        },
                        {
                            "propertyType":"sku-base",
                            "name":"Id",
                            "id":"id",
                            "value":"Sku_5Exy"
                        },
                        {
                            "propertyType":"sku-base",
                            "name":"Discountable",
                            "id":"discountable",
                            "value":true
                        }
                    ],
                    "discountInfo":[
                    ],
                    "route":"/the-blind-side/product/Product_5Dxy",
                    "siteId":"siteUS",
                    "shopperInput":{
                    },
                    "asset":false,
                    "backOrderQuantity":0,
                    "listPrice":19.99,
                    "status":"INITIAL"
                },
                {
                    "primaryThumbImageURL":"/ccstore/v1/images/?source=/file/v3905539225823433327/products/ps1_LARGE.jpg&height=100&width=100",
                    "rawTotalPrice":299.97,
                    "returnedQuantity":0,
                    "dynamicProperties":[
                    ],
                    "displayName":"Playstation",
                    "shippingSurchargeValue":0,
                    "availabilityDate":null,
                    "externalData":[
                    ],
                    "discountAmount":0,
                    "preOrderQuantity":0,
                    "commerceItemId":null,
                    "price":75,
                    "variant":[
                    ],
                    "onSale":true,
                    "primaryImageAltText":"Playstation",
                    "stateDetailsAsUser":"The item has been initialized within the shipping group",
                    "commerceId":"ci4000413",
                    "unitPrice":25,
                    "primaryImageTitle":"Playstation",
                    "amount":75,
                    "quantity":3,
                    "pointOfNoRevision":false,
                    "relationshipType":"SHIPPINGQUANTITY",
                    "productId":"prod10013",
                    "salePrice":25,
                    "detailedItemPriceInfo":[
                        {
                            "discounted":false,
                            "secondaryCurrencyTaxAmount":0,
                            "amount":75,
                            "quantity":3,
                            "configurationDiscountShare":0,
                            "tax":0,
                            "orderDiscountShare":0,
                            "detailedUnitPrice":25,
                            "currencyCode":"USD"
                        }
                    ],
                    "active":true,
                    "catRefId":"sku10030",
                    "skuProperties":[
                        {
                            "propertyType":"sku-base",
                            "name":"listingSKUId",
                            "id":"listingSKUId",
                            "value":null
                        },
                        {
                            "propertyType":"sku-base",
                            "name":"Not Returnable",
                            "id":"nonreturnable",
                            "value":false
                        },
                        {
                            "propertyType":"sku-base",
                            "name":"Name",
                            "id":"displayName",
                            "value":null
                        },
                        {
                            "propertyType":"sku-base",
                            "name":"Active",
                            "id":"active",
                            "value":true
                        },
                        {
                            "propertyType":"sku-base",
                            "name":"Id",
                            "id":"id",
                            "value":"sku10030"
                        },
                        {
                            "propertyType":"sku-base",
                            "name":"Discountable",
                            "id":"discountable",
                            "value":true
                        }
                    ],
                    "discountInfo":[
                    ],
                    "route":"/playstation/product/prod10013",
                    "siteId":"siteUS",
                    "shopperInput":{
                    },
                    "asset":false,
                    "backOrderQuantity":0,
                    "listPrice":99.99,
                    "status":"INITIAL"
                }
            ],
            "trackingNumber":null,
            "status":"INITIAL"
        }
    ],
    "creationTime":1.612902215705E12,
    "lastModifiedDate":"2021-02-09T20:24:40.980Z",
    "creationSiteId":"siteUS",
    "sourceSystem":"Cloud Commerce",
    "dynamicProperties":[
    ],
    "allowAlternateCurrency":false,
    "approvalSystemMessages":[
    ],
    "payments":[
    ],
    "priceListGroup":{
        "repositoryId":"defaultPriceGroup"
    },
    "creationDate":"2021-02-09T20:23:35.705Z",
    "orderProfileId":"se-570031",
    "orderAction":"order",
    "priceInfo":{
        "amount":94.99,
        "total":94.99,
        "shipping":0,
        "shippingSurchargeValue":0,
        "tax":0,
        "subTotal":94.99,
        "currencyCode":"USD",
        "totalWithoutTax":94.99
    },
    "discountInfo":{
        "orderDiscount":0,
        "orderDiscountDescList":[
        ],
        "shippingDiscount":0
    },
    "trackingInfo":[
    ],
    "shoppingCart":{
        "items":[
            {
                "rawTotalPrice":19.99,
                "displayName":"The Blind Side",
                "dynamicProperties":[
                ],
                "shippingSurchargeValue":0,
                "discountAmount":0,
                "externalData":[
                ],
                "itemDiscountInfos":[
                ],
                "commerceItemId":"ci4000411",
                "price":19.99,
                "variant":[
                ],
                "id":"ci4000411",
                "state":"Added to order",
                "stateKey":"INITIAL",
                "unitPrice":19.99,
                "amount":19.99,
                "quantity":1,
                "productId":"Product_5Dxy",
                "pointOfNoRevision":false,
                "salePrice":0,
                "orderDiscountInfos":[
                ],
                "detailedItemPriceInfo":[
                    {
                        "discounted":false,
                        "secondaryCurrencyTaxAmount":0,
                        "amount":19.99,
                        "quantity":1,
                        "configurationDiscountShare":0,
                        "tax":0,
                        "orderDiscountShare":0,
                        "detailedUnitPrice":19.99,
                        "currencyCode":"USD"
                    }
                ],
                "giftWithPurchaseCommerceItemMarkers":[
                ],
                "originalCommerceItemId":null,
                "catRefId":"Sku_5Exy",
                "skuProperties":[
                    {
                        "propertyType":"sku-base",
                        "name":"listingSKUId",
                        "id":"listingSKUId",
                        "value":null
                    },
                    {
                        "propertyType":"sku-base",
                        "name":"Not Returnable",
                        "id":"nonreturnable",
                        "value":false
                    },
                    {
                        "propertyType":"sku-base",
                        "name":"Name",
                        "id":"displayName",
                        "value":null
                    },
                    {
                        "propertyType":"sku-base",
                        "name":"Active",
                        "id":"active",
                        "value":true
                    },
                    {
                        "propertyType":"sku-base",
                        "name":"Id",
                        "id":"id",
                        "value":"Sku_5Exy"
                    },
                    {
                        "propertyType":"sku-base",
                        "name":"Discountable",
                        "id":"discountable",
                        "value":true
                    }
                ],
                "discountInfo":[
                ],
                "siteId":"siteUS",
                "shopperInput":{
                },
                "asset":false,
                "listPrice":19.99
            },
            {
                "rawTotalPrice":299.97,
                "displayName":"Playstation",
                "dynamicProperties":[
                ],
                "shippingSurchargeValue":0,
                "discountAmount":0,
                "externalData":[
                ],
                "itemDiscountInfos":[
                ],
                "commerceItemId":null,
                "price":75,
                "variant":[
                ],
                "id":"ci4000413",
                "state":"Added to order",
                "stateKey":"INITIAL",
                "unitPrice":25,
                "amount":75,
                "quantity":3,
                "productId":"prod10013",
                "pointOfNoRevision":false,
                "salePrice":25,
                "orderDiscountInfos":[
                ],
                "detailedItemPriceInfo":[
                    {
                        "discounted":false,
                        "secondaryCurrencyTaxAmount":0,
                        "amount":75,
                        "quantity":3,
                        "configurationDiscountShare":0,
                        "tax":0,
                        "orderDiscountShare":0,
                        "detailedUnitPrice":25,
                        "currencyCode":"USD"
                    }
                ],
                "giftWithPurchaseCommerceItemMarkers":[
                ],
                "originalCommerceItemId":null,
                "catRefId":"sku10030",
                "skuProperties":[
                    {
                        "propertyType":"sku-base",
                        "name":"listingSKUId",
                        "id":"listingSKUId",
                        "value":null
                    },
                    {
                        "propertyType":"sku-base",
                        "name":"Not Returnable",
                        "id":"nonreturnable",
                        "value":false
                    },
                    {
                        "propertyType":"sku-base",
                        "name":"Name",
                        "id":"displayName",
                        "value":null
                    },
                    {
                        "propertyType":"sku-base",
                        "name":"Active",
                        "id":"active",
                        "value":true
                    },
                    {
                        "propertyType":"sku-base",
                        "name":"Id",
                        "id":"id",
                        "value":"sku10030"
                    },
                    {
                        "propertyType":"sku-base",
                        "name":"Discountable",
                        "id":"discountable",
                        "value":true
                    }
                ],
                "discountInfo":[
                ],
                "siteId":"siteUS",
                "shopperInput":{
                },
                "asset":false,
                "listPrice":99.99
            }
        ]
    },
    "orderLocale":"en",
    "siteId":"siteUS",
    "links":[
        {
            "rel":"self",
            "href":"http://localhost:8080/ccstoreui/v1/orders/copyOrder"
        }
    ],
    "id":"o40411",
    "state":"INCOMPLETE",
    "giftWithPurchaseOrderMarkers":[
    ]
}

Default Response

The error response. The following are the internal error codes thrown by this API when the request processing fails in Oracle Commerce Cloud: |Error Code|Description| |------------------|------------------| |28320|Order duplication failed.| |100094|Organization passed in the header is currently inactive| |100095|The order or return request does not belong to the current organization of the shopper profile| |100096|The organization associated to the order or return request was deleted / does not exist| |100097|The organization associated to the order or return request is currently inactive| |28321|No Order id specified| |100098|Current operation is being performed in an organization context and the shopper profile is not associated to any organization| |100099|Current operation is being performed in an organization context and the order or return request does not belong to any organization| |100101|The shopper profile does not belong to organization passed in the header|
Body ()
Root Schema : errorModel
Type: object
Show Source
Nested Schema : errors
Type: array
An optional list of errors if multiple errors were encountered
Show Source
Nested Schema : items
Type: object
Show Source
Back to Top