createExchangeRequest

post

/ccagent/v1/exchanges

Create Exchange Request. Gets list of items from an order for which exchange request can be created with operation set as 'initiateExchange'. Takes X-CCAgentContext header which is a JSON object with 'shopperProfileId' as a property. If 'shopperProfileId' is not provided, it is considered as an anonymous profile.Additonally takes x-ccsite header. If the site information is not provided by default it takes the order site

Request

Supported Media Types
Header Parameters
Body ()
Root Schema : createExchangeRequest_request
Type: object
Show Source
Example:
{
    "op":"initiateExchange",
    "orderId":"o10400"
}
Nested Schema : returnItems
Type: array
List of returnable Items. Related Endpoint Operations - SubmitExchangeOrder
Show Source
Nested Schema : items
Type: object
Show Source
Back to Top

Response

Supported Media Types

200 Response

Following model is returned when operation succeeds.
Body ()
Root Schema : createExchangeRequest_response
Type: object
Show Source
Nested Schema : additionalProperties
Type: object
Additional properties of the return request
Show Source
Nested Schema : orderInfo
Type: object
Order Information.
Show Source
Nested Schema : profileInfo
Type: object
Profile Information for the order.
Show Source
Nested Schema : quoteInfo
Type: object
the quote information of the order
Show Source
Nested Schema : returnItems
Type: array
List of returnable Items
Show Source
Nested Schema : trackingNumber
Type: array
List of tracking numbers for the return request
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 : recurringChargePriceInfo
Type: object
Detailed information of the recurring charges at the shipping groups level
Show Source
Nested Schema : currency
Type: object
Currency of the PriceList group.
Show Source
Nested Schema : listPriceList
Type: object
Price List for list prices
Show Source
Nested Schema : salePriceList
Type: object
Price List for sale prices
Show Source
Nested Schema : shippingSurchargePriceList
Type: object
Price List for shipping surcharge prices
Show Source
Nested Schema : subTotalByFrequency
Type: array
subtotal of the item by frequency
Show Source
Nested Schema : taxByFrequency
Type: array
tax by frequency
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : organization
Type: object
The Organization associated with the B2B customer profile.
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 : items
Type: object
Show Source
Nested Schema : additionalProperties
Type: object
Additional properties of the return item
Show Source
Nested Schema : childItems
Type: array
Returned Item child items
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 : shippingGroup
Type: object
Shipping group details
Show Source
Nested Schema : skuOptionInfo
Type: array
Product Variant Information.
Show Source
Nested Schema : skuProperties
Type: array
Sku properties Information
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : childItems
Type: array
Returned Item child items
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
Child Product Variant Information.
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 : selectedOptions
Type: array
Child Product Variant Information.
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 : 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 : 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 : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Example Response (application/json)
{
    "returnLabel":"return label 1",
    "returnItems":[
        {
            "quantityReturned":0,
            "deactivationDate":"2018-06-27T12:59:59Z",
            "nonreturnable":false,
            "dynamicProperties":[
                {
                    "id":"ReferralCode",
                    "label":"ReferralCode",
                    "value":null
                },
                {
                    "id":"OfferEndsDate",
                    "label":"OfferEndsDate",
                    "value":"2020-07-02T03:42:42.000Z"
                },
                {
                    "id":"Discount",
                    "label":"Discount",
                    "value":10
                },
                {
                    "id":"GiftWrapping",
                    "label":"Gift Wrapping",
                    "value":false
                },
                {
                    "id":"name",
                    "label":"Name on product(Mug)",
                    "value":"My name"
                },
                {
                    "id":"ShippingInstructions",
                    "label":"Shipping Instructions",
                    "value":null
                }
            ],
            "displayName":"Fifa 2010",
            "externalData":[
            ],
            "billingProfileId":"billingProfile-123",
            "billingAccountId":"billingAcc-123",
            "childItems":[
                {
                    "serviceAccountId":"serviceAcc-123",
                    "deactivationDate":"2018-06-27T12:59:59Z",
                    "quantity":2,
                    "productId":"prod10040",
                    "displayName":"Super Smash Brothers Brawl",
                    "externalData":[
                    ],
                    "parentAssetKey":"12345",
                    "billingProfileId":"billingProfile-123",
                    "billingAccountId":"billingAcc-123",
                    "childItems":[
                        {
                            "serviceAccountId":"serviceAcc-123",
                            "deactivationDate":"2018-06-27T12:59:59Z",
                            "quantity":2,
                            "productId":"prod10049",
                            "displayName":"Super Smash Brothers Brawl one",
                            "externalData":[
                            ],
                            "parentAssetKey":"23456",
                            "billingProfileId":"billingProfile-123",
                            "billingAccountId":"billingAcc-123",
                            "rootAssetKey":"12345",
                            "transactionDate":"2018-06-27T12:59:59Z",
                            "catRefId":"sku10041",
                            "assetKey":"34567",
                            "route":"product/prod10049",
                            "customerAccountId":"customerAcc-123",
                            "selectedOptions":[
                            ],
                            "actionCode":"Add",
                            "activationDate":"2017-06-27T15:30:00Z",
                            "serviceId":"service-123",
                            "asset":false
                        }
                    ],
                    "rootAssetKey":"12345",
                    "transactionDate":"2018-06-27T12:59:59Z",
                    "catRefId":"sku10041",
                    "assetKey":"23456",
                    "route":"product/prod10040",
                    "customerAccountId":"customerAcc-123",
                    "selectedOptions":[
                    ],
                    "actionCode":"Add",
                    "activationDate":"2017-06-27T15:30:00Z",
                    "serviceId":"service-123",
                    "asset":false
                },
                {
                    "serviceAccountId":"serviceAcc-123",
                    "deactivationDate":"2018-06-27T12:59:59Z",
                    "quantity":1,
                    "productId":"prod10038",
                    "displayName":"Wii Music",
                    "externalData":[
                    ],
                    "parentAssetKey":"12345",
                    "billingProfileId":"billingProfile-123",
                    "billingAccountId":"billingAcc-123",
                    "rootAssetKey":"12345",
                    "transactionDate":"2018-06-27T12:59:59Z",
                    "catRefId":"sku10042",
                    "assetKey":"56789",
                    "route":"product/prod10038",
                    "customerAccountId":"customerAcc-123",
                    "selectedOptions":[
                    ],
                    "actionCode":"Add",
                    "activationDate":"2017-06-27T15:30:00Z",
                    "serviceId":"service-123",
                    "asset":false
                }
            ],
            "configuratorId":"12345677",
            "skuOptionInfo":[
            ],
            "assetKey":"12345",
            "quantityAvailableForReturn":3,
            "commerceItemId":"ci9000467",
            "price":29.97,
            "actionCode":"Add",
            "serviceId":"service-123",
            "nonReturnableReason":null,
            "unitPrice":9.99,
            "serviceAccountId":"serviceAcc-123",
            "shippingGroup":{
                "firstName":null,
                "lastName":null,
                "emailAddress":null,
                "phoneNumber":null,
                "locationId":"testLoc2",
                "shippingMethod":{
                    "shippingMethod":"inStorePickupShippingGroup",
                    "shippingMethodDescription":"inStorePickupShippingGroup"
                },
                "shippingGroupId":"sg40412",
                "middleName":null,
                "store":{
                    "country":"USA",
                    "hours":"Mon - Sat 10AM - 7PM Sun 11AM - 6 PM",
                    "address3":null,
                    "address2":"15th Floor",
                    "city":"San Francisco",
                    "address1":"475 Sansome Street",
                    "postalCode":"94111",
                    "county":null,
                    "stateAddress":"CA",
                    "phoneNumber":"(617) 386-1200",
                    "locationId":"testLoc2",
                    "name":"Cloud Store - SanFrancisco",
                    "faxNumber":"(617) 386-1200",
                    "email":"store113@example.com"
                },
                "type":"inStorePickupShippingGroup"
            },
            "comments":null,
            "productId":"prod10035",
            "shippingGroupId":"sg80417",
            "parentAssetKey":null,
            "rootAssetKey":null,
            "transactionDate":"2018-06-27T12:59:59Z",
            "catRefId":"sku10037",
            "skuProperties":[
                {
                    "propertyType":"sku-base",
                    "name":"Name",
                    "id":"displayName",
                    "value":null
                },
                {
                    "propertyType":"sku-base",
                    "name":"Id",
                    "id":"id",
                    "value":"camerasku_1_1"
                },
                {
                    "propertyType":"sku-custom",
                    "name":"dynamicskuprop1",
                    "id":"dynamicskuprop1",
                    "value":"dynamicskuprop1"
                }
            ],
            "customerAccountId":"customerAcc-123",
            "quantityShipped":3,
            "additionalProperties":{
                "property2":"tag",
                "property":"display"
            },
            "activationDate":"2017-06-27T15:30:00Z",
            "asset":false
        }
    ],
    "profileInfo":{
        "lastName":"Anderson",
        "firstName":"Kim",
        "organization":{
            "name":"Oracle India Pvt Ltd",
            "id":"oracle"
        },
        "middleName":null,
        "email":"kim@example.com"
    },
    "orderInfo":{
        "priceInfo":{
            "total":58.4,
            "amount":29.97,
            "shipping":25,
            "isTaxIncluded":false,
            "tax":3.43,
            "subTotal":29.97,
            "orderDiscountAmount":0,
            "currencyCode":"USD",
            "totalWithoutTax":145.2
        },
        "recurringChargePriceInfo":{
            "amount":20,
            "total":20,
            "shipping":0,
            "subTotalByFrequency":[
                {
                    "amount":20,
                    "frequency":"Monthly"
                }
            ],
            "taxByFrequency":[
                {
                    "amount":0,
                    "frequency":"Monthly"
                }
            ],
            "tax":0,
            "subTotal":20,
            "currencyCode":"USD",
            "totalWithoutTax":20
        },
        "orderId":"o10400",
        "priceListGroup":{
            "deleted":false,
            "displayName":"UsDollar",
            "listPriceList":{
                "repositoryId":"listPrices"
            },
            "repositoryId":"UsDollar",
            "active":true,
            "salePriceList":{
                "repositoryId":"salePrices"
            },
            "currency":{
                "symbol":"$",
                "displayName":"US Dollar",
                "repositoryId":"en_US",
                "fractionalDigits":2,
                "currencyCode":"USD",
                "numericCode":"840"
            },
            "id":"UsDollar",
            "locale":"en_US",
            "shippingSurchargePriceList":{
                "repositoryId":"shippingSurchargePrices"
            }
        },
        "siteId":"siteUS",
        "creationDate":"2014-05-20 16:06:44.0",
        "submittedDate":"2014-05-20 16:07:44.0"
    },
    "links":[
        {
            "rel":"self",
            "href":"http://localhost:9080/ccagentui/v1/exchanges"
        }
    ],
    "additionalProperties":{
        "property2":"tag",
        "property":"display"
    },
    "quoteInfo":{
        "providerNote":null,
        "notes":[
            {
                "providerDate":"2016-11-25T13:33:48.000Z",
                "providerNote":"The quote is approved as per the request",
                "profileType":null,
                "profileId":"se-570031"
            },
            {
                "profileType":null,
                "profileId":"se-570031",
                "requestDate":"2016-10-25T13:33:48.000Z",
                "requesterNote":"provide 10 percent off on the total quantity"
            }
        ],
        "rejectionDate":null,
        "requestDate":"2016-10-25T13:33:48.000Z",
        "errorInfo":null,
        "externalID":null,
        "rejectionNote":null,
        "quoteDate":"2016-10-25T13:35:32.000Z",
        "expirationDate":"2026-04-28T18:53:48.000Z"
    },
    "trackingNumber":[
        "http://localhost:9080/trackingNumber",
        "http://localhost:9080/trackingNumber2"
    ]
}

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| |------------------|------------------| |200188|The shipping method(s) associated with the order is no longer available.| |30015|SiteId passed in x-ccsite header is currently inactive| |30014|SiteId passed in x-ccsite header is invalid or the site was deleted| |200171|Order is not allowed for exchange.| |30020|The Site to which the order belongs was deleted| |30021|The Site to which the order belongs is currently inactive| |200105|Order Id passed in is null.| |200189|An internal error occurred while validating shipping method(s) associated with the order.| |30019|SiteId passed in x-ccsite header is not related to the order being worked upon| |28410|The structure of add-ons defined for the order is invalid.| |200171|This order has not been fulfilled.| |200171|Order organization is not valid. Exchange request cannot be created.| |200171|Price List Group is is no longer available. Exchange request cannot be created.|
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