validateReturns

post

/ccstore/v1/returnRequests/validate

validates Return requests. It validates the return items for each request. If items are not given in requests it gets list of items from an order for which return request can be created. Optionally takes the x-ccasset-language headers to get translated content in another language. Also, additionally takes X-CCOrganization and x-ccsite headers.

Request

Supported Media Types
Body ()
Root Schema : validateReturns_request
Type: object
Show Source
Example:
{
    "orders":[
        {
            "orderId":"o50419"
        },
        {
            "orderId":"o10079"
        },
        {
            "orderId":"o10078"
        },
        {
            "returnItems":[
                {
                    "quantityToReturn":1,
                    "commerceItemId":"ci1000058",
                    "productId":"prod10013",
                    "returnReason":"didNotLike",
                    "shippingGroupId":"sg10042",
                    "catRefId":"sku10030"
                }
            ],
            "orderId":"o10042"
        }
    ]
}
Nested Schema : orders
Type: array
List of orders for which returns to be validated
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : returnItems
Type: array
List of returnable Items.
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 : validateReturns_response
Type: object
Show Source
Nested Schema : ResponseItems
Type: array
Items property containing array of return requests in response
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : additionalProperties
Type: object
Additional properties if any returned by the webhook.
Nested Schema : orderInfo
Type: object
Order Information.
Show Source
Nested Schema : returnItems
Type: object
Show Source
Nested Schema : trackingNumber
Type: array
Tracking Number of 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 : 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 : additionalProperties
Type: object
Additional Properties if any returned by webhook
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 : 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 : 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 : 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
Example Response (application/json)
{
    "links":[
        {
            "rel":"self",
            "href":"http://localhost:8080/ccstoreui/v1/returnRequests/validate"
        }
    ],
    "autoWrap":true,
    "items":[
        {
            "orderId":"o10079",
            "nonreturnable":true,
            "nonReturnableReason":"There are no returnable items in your order."
        },
        {
            "orderId":"o10078",
            "nonreturnable":true,
            "nonReturnableReason":"This order has not been fulfilled."
        },
        {
            "returnLabel":"a5445afg5",
            "returnItems":[
                {
                    "unitPrice":24.99,
                    "quantityReturned":0,
                    "shippingGroup":{
                        "shippingMethod":{
                            "shippingMethod":"standardShippingMethod",
                            "shippingMethodDescription":"Standard"
                        },
                        "shippingGroupId":"sg60429",
                        "shippingAddress":{
                            "lastName":"Anderson",
                            "country":"US",
                            "address3":null,
                            "address2":null,
                            "city":"Syracuse",
                            "prefix":null,
                            "address1":"21 Cedar Ave",
                            "postalCode":"13202",
                            "companyName":null,
                            "jobTitle":null,
                            "county":null,
                            "suffix":null,
                            "firstName":"Kim",
                            "phoneNumber":"212-555-1977",
                            "faxNumber":null,
                            "alias":"Home",
                            "middleName":null,
                            "state":"NY",
                            "email":"kim@example.com"
                        },
                        "type":"hardgoodShippingGroup"
                    },
                    "comments":null,
                    "productId":"Product_27Fxyzii",
                    "nonreturnable":false,
                    "detailedItemPriceInfo":[
                        {
                            "discounted":false,
                            "secondaryCurrencyTaxAmount":0,
                            "amount":24.99,
                            "quantity":1,
                            "tax":2,
                            "orderDiscountShare":0,
                            "detailedUnitPrice":24.99,
                            "currencyCode":"USD"
                        }
                    ],
                    "displayName":"Sky Blue",
                    "dynamicProperties":[
                    ],
                    "externalData":[
                    ],
                    "catRefId":"Sku_27Gxyzii",
                    "skuOptionInfo":[
                    ],
                    "quantityAvailableForReturn":1,
                    "commerceItemId":"ci5000434",
                    "quantityShipped":1,
                    "price":24.99,
                    "actionCode":null,
                    "additionalProperties":{
                        "name2":"value2",
                        "name1":"value1"
                    },
                    "nonReturnableReason":"This is a returnable item"
                },
                {
                    "unitPrice":21.99,
                    "quantityReturned":0,
                    "shippingGroup":{
                        "shippingMethod":{
                            "shippingMethod":"standardShippingMethod",
                            "shippingMethodDescription":"Standard"
                        },
                        "shippingGroupId":"sg60429",
                        "shippingAddress":{
                            "lastName":"Anderson",
                            "country":"US",
                            "address3":null,
                            "address2":null,
                            "city":"Syracuse",
                            "prefix":null,
                            "address1":"21 Cedar Ave",
                            "postalCode":"13202",
                            "companyName":null,
                            "jobTitle":null,
                            "county":null,
                            "suffix":null,
                            "firstName":"Kim",
                            "phoneNumber":"212-555-1977",
                            "faxNumber":null,
                            "alias":"Home",
                            "middleName":null,
                            "state":"NY",
                            "email":"kim@example.com"
                        },
                        "type":"hardgoodShippingGroup"
                    },
                    "comments":null,
                    "productId":"Product_36Exy",
                    "nonreturnable":false,
                    "detailedItemPriceInfo":[
                        {
                            "discounted":false,
                            "secondaryCurrencyTaxAmount":0,
                            "amount":21.99,
                            "quantity":1,
                            "tax":1.76,
                            "orderDiscountShare":0,
                            "detailedUnitPrice":21.99,
                            "currencyCode":"USD"
                        }
                    ],
                    "displayName":"The Girl with the Dragon Tattoo",
                    "dynamicProperties":[
                    ],
                    "externalData":[
                    ],
                    "catRefId":"Sku_36Fxy",
                    "skuOptionInfo":[
                    ],
                    "quantityAvailableForReturn":1,
                    "commerceItemId":"ci5000435",
                    "quantityShipped":1,
                    "price":21.99,
                    "actionCode":null,
                    "additionalProperties":{
                        "name2":"value2",
                        "name1":"value1"
                    },
                    "nonReturnableReason":"This is a returnable item"
                }
            ],
            "authorizationNumber":"12345",
            "nonreturnable":false,
            "orderInfo":{
                "priceInfo":{
                    "amount":46.98,
                    "total":77.74,
                    "shipping":25,
                    "isTaxIncluded":false,
                    "shippingSurchargeValue":0,
                    "tax":5.76,
                    "subTotal":46.98,
                    "orderDiscountAmount":0,
                    "currencyCode":"USD",
                    "totalWithoutTax":71.98
                },
                "orderId":"o50419",
                "sourceSystem":"Cloud Commerce",
                "priceListGroup":"priceListGroup:defaultPriceGroup",
                "siteId":"siteUS",
                "creationDate":"2017-12-06T12:51:56.000Z",
                "submittedDate":"2017-12-06T12:53:19.000Z"
            },
            "additionalProperties":{
                "name2":"value2",
                "name1":"value1"
            },
            "trackingNumber":[
                "1234567890"
            ],
            "nonReturnableReason":null
        },
        {
            "returnLabel":"a5445afg5",
            "returnItems":[
                {
                    "unitPrice":4.99,
                    "quantityReturned":0,
                    "shippingGroup":{
                        "shippingMethod":{
                            "shippingMethod":"standardShippingMethod",
                            "shippingMethodDescription":"Standard"
                        },
                        "shippingGroupId":"sg10042",
                        "shippingAddress":{
                            "lastName":"Anderson",
                            "country":"US",
                            "address3":null,
                            "address2":null,
                            "city":"Syracuse",
                            "prefix":"Sr",
                            "address1":"21 Cedar Ave",
                            "postalCode":"13202",
                            "companyName":null,
                            "jobTitle":"Director",
                            "county":"United States",
                            "suffix":null,
                            "firstName":"Kim",
                            "phoneNumber":"212-555-1977",
                            "faxNumber":"212-555-1977",
                            "alias":null,
                            "middleName":"Christian",
                            "state":"NY",
                            "email":"kim@example.com"
                        },
                        "type":"hardgoodShippingGroup"
                    },
                    "comments":null,
                    "productId":"prod10037",
                    "nonreturnable":false,
                    "detailedItemPriceInfo":[
                        {
                            "discounted":true,
                            "secondaryCurrencyTaxAmount":0,
                            "amount":3,
                            "quantity":1,
                            "tax":0.29,
                            "orderDiscountShare":0.2,
                            "detailedUnitPrice":3,
                            "currencyCode":"USD"
                        }
                    ],
                    "displayName":"Wii Sports",
                    "dynamicProperties":[
                    ],
                    "externalData":[
                    ],
                    "catRefId":"sku10043",
                    "skuOptionInfo":[
                    ],
                    "quantityAvailableForReturn":1,
                    "commerceItemId":"ci1000057",
                    "quantityShipped":1,
                    "price":3,
                    "actionCode":null,
                    "additionalProperties":{
                        "name2":"value2",
                        "name1":"value1"
                    },
                    "nonReturnableReason":"This is a returnable item"
                },
                {
                    "unitPrice":25,
                    "quantityReturned":0,
                    "shippingGroup":{
                        "shippingMethod":{
                            "shippingMethod":"standardShippingMethod",
                            "shippingMethodDescription":"Standard"
                        },
                        "shippingGroupId":"sg10042",
                        "shippingAddress":{
                            "lastName":"Anderson",
                            "country":"US",
                            "address3":null,
                            "address2":null,
                            "city":"Syracuse",
                            "prefix":"Sr",
                            "address1":"21 Cedar Ave",
                            "postalCode":"13202",
                            "companyName":null,
                            "jobTitle":"Director",
                            "county":"United States",
                            "suffix":null,
                            "firstName":"Kim",
                            "phoneNumber":"212-555-1977",
                            "faxNumber":"212-555-1977",
                            "alias":null,
                            "middleName":"Christian",
                            "state":"NY",
                            "email":"kim@example.com"
                        },
                        "type":"hardgoodShippingGroup"
                    },
                    "comments":null,
                    "productId":"prod10013",
                    "nonreturnable":false,
                    "detailedItemPriceInfo":[
                        {
                            "discounted":false,
                            "secondaryCurrencyTaxAmount":0,
                            "amount":100,
                            "quantity":4,
                            "tax":9.84,
                            "orderDiscountShare":6.61,
                            "detailedUnitPrice":25,
                            "currencyCode":"USD"
                        },
                        {
                            "discounted":true,
                            "secondaryCurrencyTaxAmount":0,
                            "amount":15,
                            "quantity":1,
                            "tax":1.48,
                            "orderDiscountShare":0.99,
                            "detailedUnitPrice":15,
                            "currencyCode":"USD"
                        }
                    ],
                    "displayName":"Playstation",
                    "dynamicProperties":[
                    ],
                    "externalData":[
                    ],
                    "catRefId":"sku10030",
                    "skuOptionInfo":[
                    ],
                    "quantityAvailableForReturn":1,
                    "commerceItemId":"ci1000058",
                    "quantityShipped":5,
                    "price":115,
                    "actionCode":null,
                    "additionalProperties":{
                        "name2":"value2",
                        "name1":"value1"
                    },
                    "nonReturnableReason":"This is a returnable item"
                }
            ],
            "authorizationNumber":"12345",
            "nonreturnable":false,
            "orderInfo":{
                "priceInfo":{
                    "amount":110.2,
                    "total":156.82,
                    "shipping":35,
                    "isTaxIncluded":false,
                    "shippingSurchargeValue":0,
                    "tax":11.62,
                    "subTotal":118,
                    "orderDiscountAmount":7.8,
                    "currencyCode":"USD",
                    "totalWithoutTax":145.2
                },
                "orderId":"o10042",
                "sourceSystem":"Cloud Commerce",
                "priceListGroup":"priceListGroup:defaultPriceGroup",
                "siteId":"siteUS",
                "creationDate":"2017-11-12T12:18:04.000Z",
                "submittedDate":"2017-11-12T12:18:04.000Z"
            },
            "additionalProperties":{
                "name2":"value2",
                "name1":"value1"
            },
            "trackingNumber":[
                "1234567890"
            ],
            "nonReturnableReason":null
        }
    ]
}

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| |------------------|------------------| |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| |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| |200114|Order is not allowed for return.| |30015|SiteId passed in x-ccsite header is currently inactive| |30014|SiteId passed in x-ccsite header is invalid or the site was deleted| |30020|The Site to which the order belongs was deleted| |30021|The Site to which the order belongs is currently inactive| |100101|The shopper profile does not belong to organization passed in the header| |30019|SiteId passed in x-ccsite header is not related to the order being worked upon| |210105|Specified order does not exist.|
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