copyOrder

post

/ccagent/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",
            "shippingGroups",
            "relationships",
            "paymentGroups"
        ]
    }
}
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 : approvalSystemMessages
Type: array
The array of messages which are stored during order processing
Show Source
Nested Schema : billingMethod
Type: object
billing Method information of the order.
Show Source
Nested Schema : discountInfo
Type: object
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 : giftWithPurchaseInfo
Type: array
Gift Selection Information
Show Source
Nested Schema : giftWithPurchaseOrderMarkers
Type: array
Gift With Purchase order markers information
Show Source
Nested Schema : orderComments
Type: array
The list of all logged comments for the order.
Show Source
Nested Schema : paymentGroup
Type: object
Payment Group for the order.
Show Source
Nested Schema : paymentGroups
Type: array
List of payment Groups for the order.
Show Source
Nested Schema : priceInfo
Type: object
Price information of the order.
Show Source
Nested Schema : priceListGroup
Type: object
PriceList group of the order.
Show Source
Nested Schema : pricingMessages
Type: object
The Pricing messages information.
Show Source
Nested Schema : profile
Type: object
Profile Information for the order.
Show Source
Nested Schema : returnRequests
Type: array
The list of the requests raised for the order.
Show Source
Nested Schema : shippingAddress
Type: object
shipping address for the order.
Show Source
Nested Schema : shippingGroups
Type: array
Shipping Group information
Show Source
Nested Schema : shippingMethod
Type: object
Shipping method information.
Show Source
Nested Schema : shoppingCart
Type: object
Shopping cart information.
Show Source
Nested Schema : submissionErrorCodes
Type: array
Set of error codes recorded during each unsuccessful retry of queued orders.
Show Source
Nested Schema : submissionErrorMessages
Type: array
List of failure reasons recorded during each unsuccessful retry of queued orders.
Show Source
Nested Schema : submissionProgress
Type: array
Checkpoints crossed successfully during each unsuccessful retry of queued orders.
Show Source
Nested Schema : taxPriceInfo
Type: object
The tax pricing details for the order.
Show Source
Nested Schema : orderCouponsMap
Type: array
Map of coupons.
Show Source
Nested Schema : orderImplicitDiscountList
Type: array
List of discounts.
Show Source
Nested Schema : unclaimedCouponsMap
Type: array
Map of unclaimed coupons.
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 : couponInfo
Type: array
The coupon Info.
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: object
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : billingAddress
Type: object
Billing address for the order.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : billingAddress
Type: object
Billing address for the order.
Show Source
Nested Schema : currency
Type: object
Currency of the PriceList group.
Show Source
Nested Schema : promotionUpsellMessages
Type: array
The promotion upsell messages.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : tags
Type: array
The tags the promotion upsell message is associated with.
Show Source
Nested Schema : organization
Type: object
The Organization associated with the B2B customer profile.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: array
Items in the cart.
Show Source
Nested Schema : shippingAddress
Type: object
shipping address for the order.
Show Source
Nested Schema : shippingMethod
Type: object
Shipping method information.
Show Source
Nested Schema : store
Type: object
Information about the Store that the items are being picked up from (if shipping group type is inStorePickupShippingGroup)
Show Source
Nested Schema : trackingInfo
Type: array
Tracking Information for the Order.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : skuProperties
Type: array
Sku properties Information
Show Source
Nested Schema : variant
Type: array
Product Variant Information.
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
Items in the cart.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : childItems
Type: array
Child items of the commerce item
Show Source
Nested Schema : discountInfo
Type: object
Discount information.
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 : giftWithPurchaseCommerceItemMarkers
Type: array
The array of giftWithPurchaseCommerceItemMarkers.
Show Source
Nested Schema : imageInfo
Type: object
Shipping method information.
Show Source
Nested Schema : shopperInput
Type: object
Additional Properties Allowed
Show Source
Map of shopper input keys to values
Nested Schema : skuProperties
Type: array
Sku properties Information
Show Source
Nested Schema : variant
Type: array
Product Variant Information.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : childItems
Type: array
Child items of the commerce item
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 : selectedOptions
Type: array
The array of variants of the child item.
Show Source
Nested Schema : shopperInput
Type: object
Additional Properties Allowed
Show Source
Map of shopper input keys to values
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 : selectedOptions
Type: array
The array of variants of the child item.
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 : values
Type: object
The array of values associated with an externalData item.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : orderCouponsMap
Type: array
Map of coupons.
Show Source
Nested Schema : orderImplicitDiscountList
Type: array
List of discounts.
Show Source
Nested Schema : unclaimedCouponsMap
Type: array
Map of unclaimed coupons.
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 : couponInfo
Type: array
The coupon Info.
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 : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Example Response (application/json)
{
    "creationTime":1.478264292E12,
    "orderComments":[
    ],
    "sourceSystem":"Cloud Commerce",
    "dynamicProperties":[
    ],
    "stateString":"INCOMPLETE",
    "submittedDate":"2016-11-04T12:58:13.000Z",
    "paymentGroups":[
    ],
    "priceInfo":{
        "amount":249.95,
        "total":309.88,
        "shipping":35,
        "shippingSurchargeValue":0,
        "tax":24.93,
        "subTotal":249.95,
        "currencyCode":"USD",
        "totalWithoutTax":284.95
    },
    "submissionProgress":[
    ],
    "pricingMessages":{
        "promotionUpsellMessages":[
            {
                "text":"Spend $20 more get free shipping!",
                "tags":[
                    "CART_UPSELL"
                ]
            },
            {
                "text":"You have qualified for a free Sports DVD!",
                "tags":[
                    "BANNER_UPSELL",
                    "CART_UPSELL"
                ]
            }
        ]
    },
    "shoppingCart":{
        "items":[
            {
                "deactivationDate":"2018-06-27T12:59:59Z",
                "rawTotalPrice":249.95,
                "returnedQuantity":0,
                "displayName":"Dora the Explorer - Season 1",
                "shippingSurchargeValue":0,
                "externalData":[
                ],
                "billingProfileId":"billingProfile-123",
                "discountAmount":0,
                "billingAccountId":"billingAcc-123",
                "imageInfo":{
                    "primaryThumbImageURL":"/ccstore/v1/images/?source=/file/v5541415982230769347/products/doratheexplorer_season1_LARGE.jpg&height=100&width=100"
                },
                "assetKey":null,
                "assetId":"asset10001",
                "price":249.95,
                "variant":[
                ],
                "onSale":false,
                "actionCode":"Add",
                "serviceId":"service-123",
                "stateDetailsAsUser":"Added to order",
                "unitPrice":49.99,
                "serviceAccountId":"serviceAcc-123",
                "quantity":5,
                "productId":"Product_21Cxi",
                "salePrice":0,
                "detailedItemPriceInfo":[
                    {
                        "discounted":false,
                        "amount":249.95,
                        "quantity":5,
                        "tax":21.86,
                        "orderDiscountShare":0,
                        "detailedUnitPrice":49.99,
                        "currencyCode":"USD"
                    }
                ],
                "giftWithPurchaseCommerceItemMarkers":[
                ],
                "parentAssetKey":null,
                "tax":21.86,
                "rootAssetKey":null,
                "transactionDate":"2018-06-27T12:59:59Z",
                "catRefId":"Sku_21Dxy",
                "customerAccountId":"customerAcc-123",
                "discountInfo":[
                ],
                "stateDescription":"INITIAL",
                "activationDate":"2017-06-27T15:30:00Z",
                "asset":false,
                "listPrice":49.99,
                "status":0
            }
        ]
    },
    "links":[
        {
            "rel":"self",
            "href":"http://localhost:9080/ccagentui/v1/orders/copyOrder"
        }
    ],
    "id":"o50415",
    "state":0,
    "stateDetailsAsUser":"Incomplete",
    "taxPriceInfo":{
        "cityTax":0.71,
        "amount":24.93,
        "valueAddedTax":0,
        "countyTax":0.71,
        "isTaxIncluded":false,
        "miscTax":6.41,
        "districtTax":0,
        "stateTax":17.1,
        "countryTax":0
    },
    "shippingGroups":[
        {
            "taxPriceInfo":{
                "cityTax":0.71,
                "amount":24.93,
                "valueAddedTax":0,
                "countyTax":0.71,
                "isTaxIncluded":false,
                "miscTax":6.41,
                "districtTax":0,
                "stateTax":17.1,
                "countryTax":0
            },
            "shippingMethod":{
                "shippingTax":3.07,
                "cost":35,
                "displayName":"Standard",
                "value":"standardShippingMethod",
                "shippingMethodDescription":"Standard"
            },
            "shippingGroupId":"sg60415",
            "submittedDate":null,
            "priceInfo":{
                "amount":249.95,
                "total":309.88,
                "shipping":35,
                "shippingSurchargeValue":0,
                "tax":24.93,
                "subTotal":249.95,
                "currencyCode":"USD",
                "totalWithoutTax":284.95
            },
            "discountInfo":{
                "orderDiscount":0,
                "shippingDiscount":0,
                "discountDescList":[
                ]
            },
            "shipOnDate":null,
            "trackingInfo":[
            ],
            "actualShipDate":null,
            "shippingAddress":{
                "lastName":"Blooming",
                "country":"US",
                "address3":null,
                "address2":"Santa Clara County",
                "city":"San Jose",
                "prefix":null,
                "address1":"7 W Jackson Blvd",
                "postalCode":"95111",
                "companyName":"US Motor Works, Inc.",
                "jobTitle":null,
                "county":null,
                "suffix":null,
                "selectedCountry":"US",
                "firstName":"Ron",
                "phoneNumber":"408-752-3500",
                "stateName":"California",
                "faxNumber":null,
                "alias":null,
                "middleName":null,
                "state":"CA",
                "countryName":"United States",
                "email":"ron@example.com",
                "selectedState":"NY",
                "state_ISOCode":"US-NY"
            },
            "items":[
                {
                    "primaryThumbImageURL":"/ccstore/v1/images/?source=/file/v5541415982230769347/products/doratheexplorer_season1_LARGE.jpg&height=100&width=100",
                    "deactivationDate":"2018-06-27T12:59:59Z",
                    "rawTotalPrice":249.95000000000002,
                    "returnedQuantity":0,
                    "displayName":"Dora the Explorer - Season 1",
                    "shippingSurchargeValue":0,
                    "externalData":[
                    ],
                    "billingProfileId":"billingProfile-123",
                    "discountAmount":0,
                    "billingAccountId":"billingAcc-123",
                    "assetKey":null,
                    "assetId":"asset10001",
                    "price":249.95,
                    "variant":[
                    ],
                    "onSale":false,
                    "primaryImageAltText":"Dora the Explorer - Season 1",
                    "actionCode":"Add",
                    "serviceId":"service-123",
                    "stateDetailsAsUser":"The item has been initialized within the shipping group",
                    "serviceAccountId":"serviceAcc-123",
                    "unitPrice":49.99,
                    "primaryImageTitle":"Dora the Explorer - Season 1",
                    "quantity":5,
                    "productId":"Product_21Cxi",
                    "salePrice":0,
                    "detailedItemPriceInfo":[
                        {
                            "discounted":false,
                            "amount":249.95,
                            "quantity":5,
                            "tax":21.86,
                            "orderDiscountShare":0,
                            "detailedUnitPrice":49.99,
                            "currencyCode":"USD"
                        }
                    ],
                    "parentAssetKey":null,
                    "active":true,
                    "rootAssetKey":null,
                    "transactionDate":"2018-06-27T12:59:59Z",
                    "catRefId":"Sku_21Dxy",
                    "skuProperties":[
                        {
                            "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_21Dxy"
                        }
                    ],
                    "customerAccountId":"customerAcc-123",
                    "discountInfo":[
                    ],
                    "route":"/dora-the-explorer-season-1/product/Product_21Cxi",
                    "activationDate":"2017-06-27T15:30:00Z",
                    "asset":false,
                    "listPrice":49.99,
                    "status":"INITIAL"
                }
            ],
            "trackingNumber":null,
            "status":"PENDING_MERCHANT_ACTION"
        }
    ],
    "approvalSystemMessages":[
        "Order is pending approval because total is greater than the approved order limit."
    ],
    "shippingMethod":{
        "shippingTax":3.07,
        "cost":35,
        "displayName":"Standard",
        "value":"standardShippingMethod",
        "shippingMethodDescription":"Standard"
    },
    "profile":{
        "firstName":"Ron",
        "lastName":"Blooming",
        "organization":{
            "approvalRequired":true,
            "name":"US Motor Works, Inc.",
            "id":"or-100002"
        },
        "middleName":null,
        "email":"ron@example.com"
    },
    "priceListGroup":{
        "repositoryId":"defaultPriceGroup"
    },
    "returnRequests":[
    ],
    "creationDate":"2016-11-04T12:58:12.000Z",
    "submissionErrorCodes":[
    ],
    "discountInfo":{
        "unclaimedCouponMultiPromotions":{
        },
        "orderCouponsMap":{
        },
        "orderDiscount":0,
        "shippingDiscount":0,
        "orderImplicitDiscountList":[
        ],
        "unclaimedCouponsMap":{
        },
        "claimedCouponMultiPromotions":{
        }
    },
    "submissionErrorMessages":[
    ],
    "profileId":"bb-110023",
    "exchangeRequests":[
    ],
    "giftWithPurchaseInfo":[
    ],
    "shippingAddress":{
        "lastName":"Blooming",
        "country":"US",
        "address3":null,
        "address2":"Santa Clara County",
        "city":"San Jose",
        "prefix":null,
        "address1":"7 W Jackson Blvd",
        "postalCode":"95111",
        "companyName":"US Motor Works, Inc.",
        "jobTitle":null,
        "county":null,
        "suffix":null,
        "selectedCountry":"US",
        "firstName":"Ron",
        "phoneNumber":"408-752-3500",
        "stateName":"California",
        "faxNumber":null,
        "alias":null,
        "middleName":null,
        "state":"CA",
        "countryName":"United States",
        "email":"ron@example.com",
        "selectedState":"NY",
        "state_ISOCode":"US-NY"
    },
    "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