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
- application/json
Root Schema : validateReturns_request
Type:
Show Source
object
-
orders:
array orders
List of orders for which returns to be validated
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 : items
Type:
Show Source
object
-
orderId(optional):
string
Order ID for which refunds needs to be calculated.
-
returnItems(optional):
array returnItems
List of returnable Items.
Nested Schema : items
Type:
Show Source
object
-
catRefId(optional):
string
The SKU ID
-
commerceItemId(optional):
string
ID of the commerce item.
-
productId(optional):
string
The Product ID
-
quantityToReturn(optional):
integer
Quantity to be Returned
-
returnReason(optional):
string
Reason to return an Item
-
shippingGroupId(optional):
string
Shipping group ID of the returned item
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Root Schema : validateReturns_response
Type:
Show Source
object
-
ResponseItems(optional):
array ResponseItems
Items property containing array of return requests in response
Nested Schema : ResponseItems
Type:
array
Items property containing array of return requests in response
Show Source
Nested Schema : items
Type:
Show Source
object
-
additionalProperties(optional):
object additionalProperties
Additional properties if any returned by the webhook.
-
authorizationNumber(optional):
string
RMA number of Return Request if available otherwise return request id
-
nonreturnable(optional):
boolean
Order level non returnable flag
-
nonReturnbaleReason(optional):
string
non returnable reason if order is non returnable
-
orderInfo(optional):
object orderInfo
Order Information.
-
returnItems(optional):
object returnItems
-
returnLabel(optional):
string
return label of the return request
-
trackingNumber(optional):
array trackingNumber
Tracking Number of the return request
Nested Schema : additionalProperties
Type:
object
Additional properties if any returned by the webhook.
Nested Schema : orderInfo
Type:
object
Order Information.
Show Source
-
creationDate(optional):
string
Date on which the Order was created.
-
orderId(optional):
string
Commerce id for this order.
-
priceInfo(optional):
object priceInfo
Price information of the order.
-
priceListGroup(optional):
object priceListGroup
PriceList group of the order.
-
siteId(optional):
string
Site Id on which the Order was placed.
-
submittedDate(optional):
string
Date on which the Order was submitted.
Nested Schema : returnItems
Type:
Show Source
object
-
actionCode(optional):
string
The action code that has been set on the item by the configurator system.
-
activationDate(optional):
string
The activation date in ISO format.
-
additionalProperties(optional):
object additionalProperties
Additional Properties if any returned by webhook
-
asset(optional):
boolean
The flag that determines if the current item is an asset or not.
-
assetKey(optional):
string
The assetKey is only assigned when the root item has been set as assetable in the catalog and has been configured.
-
billingAccountId(optional):
string
The billing account ID associated to the current item.
-
billingProfileId(optional):
string
The billing profile ID associated to the current item.
-
catRefId(optional):
string
Catalog Reference Id
-
childItems(optional):
array childItems
Returned Item child items
-
comments(optional):
string
Comments at returnItem level
-
commerceItemId(optional):
string
Commerce Id of the returned item
-
configuratorId(optional):
string
Configurator Id of the returned item
-
customerAccountId(optional):
string
The customer account ID associated to the current item.
-
deactivationDate(optional):
string
The deactivation date in ISO format.
-
displayName(optional):
string
Display Name of the Product
-
dynamicProperties(optional):
array dynamicProperties
Array of custom properties at order line item level.
-
externalData(optional):
array externalData
External data to be associated with a commerce item, provided by a configurator system.
-
nonreturnable(optional):
boolean
Indicates whether the item is returnable or not
-
nonReturnableReason(optional):
string
Non returnable reason if item is non returnable
-
parentAssetKey(optional):
string
The parentAssetKey is only assigned when the root item has been set as assetable in the catalog and has been configured.
-
price(optional):
number
Total price of items
-
productId(optional):
string
Id of the Product
-
quantityAvailableForReturn(optional):
number
Quantity Available
-
quantityReturned(optional):
number
Quantity Returned
-
quantityShipped(optional):
number
Quantity Shipped
-
rootAssetKey(optional):
string
The rootAssetKey is only assigned when the root item has been set as assetable in the catalog and has been configured.
-
serviceAccountId(optional):
string
The service account ID associated to the current item.
-
serviceId(optional):
string
The service ID associated to the current item.
-
shippingGroupId(optional):
string
Shipping group Id of the returned item
-
skuOptionInfo(optional):
array skuOptionInfo
Product Variant Information.
-
skuProperties(optional):
array skuProperties
Sku properties Information
-
transactionDate(optional):
string
ISO formatted Date on which the service action should be triggered.
-
unitPrice(optional):
number
Unit price of the item
Nested Schema : priceInfo
Type:
object
Price information of the order.
Show Source
-
amount(optional):
number
The raw number that represents the price.
-
currencyCode(optional):
string
Indicates the currency of the price. For example, USD indicates that the price is in US dollars.
-
isTaxIncluded(optional):
boolean
Indicates if tax is included in item price
-
orderDiscountAmount(optional):
number
Total order Discount Amount.
-
shipping(optional):
number
The shipping cost of the order.
-
subTotal(optional):
number
The subtotal of the order before applying order-level promotions.
-
tax(optional):
number
The tax on the order.
-
total(optional):
number
The current working total, including all promotions, tax, and billing costs.
-
totalWithoutTax(optional):
number
The total cost without Tax.
Nested Schema : priceListGroup
Type:
object
PriceList group of the order.
Show Source
-
active(optional):
boolean
Active status of pricelist group.
-
currency(optional):
object currency
Currency of the PriceList group.
-
deleted(optional):
boolean
Pricelist group deleted status.
-
displayName(optional):
string
Display Name.
-
id(optional):
string
Id.
-
listPriceList(optional):
object listPriceList
Price List for list prices
-
locale(optional):
string
Locale.
-
repositoryId(optional):
string
Repository Id.
-
salePriceList(optional):
object salePriceList
Price List for sale prices
-
shippingSurchargePriceList(optional):
object shippingSurchargePriceList
Price List for shipping surcharge prices
Nested Schema : currency
Type:
object
Currency of the PriceList group.
Show Source
-
currencyCode(optional):
string
Currency Code.
-
displayName(optional):
string
Display Name.
-
fractionalDigits(optional):
integer
Fractional Digits.
-
numericCode(optional):
string
Numeric Code.
-
repositoryId(optional):
string
Repository Id.
-
symbol(optional):
string
currency Symbol.
Nested Schema : listPriceList
Type:
object
Price List for list prices
Show Source
-
repositoryId(optional):
string
Repository ID of the list prices
Nested Schema : salePriceList
Type:
object
Price List for sale prices
Show Source
-
repositoryId(optional):
string
Repository ID of the sale prices
Nested Schema : shippingSurchargePriceList
Type:
object
Price List for shipping surcharge prices
Show Source
-
repositoryId(optional):
string
Repository ID of the shipping surcharge prices
Nested Schema : additionalProperties
Type:
object
Additional Properties if any returned by webhook
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:
Show Source
object
-
actionCode(optional):
string
The action code that has been set on the item by the configurator system.
-
activationDate(optional):
string
The activation date in ISO format.
-
asset(optional):
boolean
The flag that determines if the current item is an asset or not.
-
assetKey(optional):
string
The assetKey is only assigned when the root item has been set as assetable in the catalog and has been configured.
-
billingAccountId(optional):
string
The billing account ID associated to the current item.
-
billingProfileId(optional):
string
The billing profile ID associated to the current item.
-
catRefId(optional):
string
Catalog Reference Id of the child Item
-
customerAccountId(optional):
string
The customer account ID associated to the current item.
-
deactivationDate(optional):
string
The deactivation date in ISO format.
-
displayName(optional):
string
Product display name of the sub sku commerce item
-
externalData(optional):
array externalData
External data to be associated with a commerce item, provided by a configurator system.
-
parentAssetKey(optional):
string
The parentAssetKey is only assigned when the root item has been set as assetable in the catalog and has been configured.
-
productId(optional):
string
Product Id of teh
-
quantity(optional):
number
quantity of the child Item
-
rootAssetKey(optional):
string
The rootAssetKey is only assigned when the root item has been set as assetable in the catalog and has been configured.
-
route(optional):
string
Product path
-
selectedOptions(optional):
array selectedOptions
Child Product Variant Information.
-
serviceAccountId(optional):
string
The service account ID associated to the current item.
-
serviceId(optional):
string
The service ID associated to the current item.
-
transactionDate(optional):
string
ISO formatted Date on which the service action should be triggered.
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:
Show Source
object
-
actionCode(optional):
string
The action code that has been set on the externalData item by the configurator system.
-
name(optional):
string
The name to be associated with the externalData item.
-
values(optional):
object values
The array of values associated with an externalData item.
Nested Schema : values
Type:
object
The array of values associated with an externalData item.
Show Source
-
dynamic_property_key(optional):
string
This property's name and value will be retrieved from a configurator system, so will be dynamically set.
Nested Schema : items
Type:
Show Source
object
-
optionName(optional):
string
Name of the Dynamic attribute.
-
optionValue(optional):
string
Value of the Dynamic attribute.
Nested Schema : items
Type:
Show Source
object
-
id(optional):
string
The ID of the dynamic property.
-
label(optional):
string
The label of the dynamic property.
-
value(optional):
string
The value of the dynamic property.
Nested Schema : items
Type:
Show Source
object
-
actionCode(optional):
string
The action code that has been set on the externalData item by the configurator system.
-
name(optional):
string
The name to be associated with the externalData item.
-
values(optional):
object values
The array of values associated with an externalData item.
Nested Schema : values
Type:
object
The array of values associated with an externalData item.
Show Source
-
dynamic_property_key(optional):
string
This property's name and value will be retrieved from a configurator system, so will be dynamically set.
Nested Schema : items
Type:
Show Source
object
-
optionName(optional):
string
Name of the Dynamic attribute
-
optionValue(optional):
string
Value of the Dynamic attribute
Nested Schema : items
Type:
Show Source
object
-
id(optional):
string
ID of the Dynamic SKU Property.
-
name(optional):
string
Name of the Dynamic SKU Property.
-
propertyType(optional):
string
Type that indicates whether it is a base or a custom SKU property,
-
value(optional):
string
Value of the Dynamic SKU Property.
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.|
Root Schema : errorModel
Type:
Show Source
object
-
devMessage(optional):
string
An optional non-localized message containing technical information for developers
-
errorCode(optional):
string
The numerical code identifying the error
-
errors(optional):
array errors
An optional list of errors if multiple errors were encountered
-
message(optional):
string
The localized message describing the error
-
moreInfo(optional):
string
An optional non-localized message with more information
-
o:errorPath(optional):
string
An optional machine readable description of where the error occurred
-
status(optional):
string
The HTTP status code
-
type(optional):
string
The URI to the HTTP state code definition
Nested Schema : errors
Type:
array
An optional list of errors if multiple errors were encountered
Show Source
Nested Schema : items
Type:
Show Source
object
-
devMessage(optional):
string
An optional non-localized message containing technical information for developers
-
errorCode(optional):
string
The numerical code identifying the error
-
message(optional):
string
The localized message describing the error
-
moreInfo(optional):
string
An optional non-localized message with more information
-
o:errorPath(optional):
string
An optional machine readable description of where the error occurred
-
status(optional):
string
The HTTP status code