copyOrder

post

/ccappagent/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)
{
    "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,
        "orderTotalBySite":{
            "siteUS":309.88
        },
        "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":"12345",
                "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":[
                ],
                "siteId":"siteUS",
                "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":"12345",
                    "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",
                    "siteId":"siteUS",
                    "activationDate":"2017-06-27T15:30:00Z",
                    "asset":false,
                    "listPrice":49.99,
                    "status":"INITIAL"
                }
            ],
            "trackingNumber":null,
            "status":"PENDING_MERCHANT_ACTION"
        }
    ],
    "creationSiteId":"siteUS",
    "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"
    },
    "siteId":"siteUS",
    "giftWithPurchaseOrderMarkers":[
    ]
}

Default Response

The error response. In case of any failure in external tax or external shipping webhooks, the errors returned in the webhook response payload get added to the errors property in this endpoint???s 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