updateReturnRequest
put
/ccagent/v1/returnRequests/{id}
Update Return Request. It updates the returnRequest based on the operation value. Operation value can be any of receiveReturns/initiateRefund/adjustRefundAmounts/markManualRefund/markAsComplete. Updates details of items received against a return request with operation set as 'receiveReturns'.Additonally takes x-ccsite header. If the site information is not provided by default it takes the order site. Optionally takes X-CCOrganization header which is a JSON field with organization ID as value.
Request
Supported Media Types
- application/json
Path Parameters
-
id: string
Return Request Id.
Header Parameters
-
X-CCOrganization(optional): string
The organization Id to which the order belongs
-
x-ccsite(optional): string
the site id on which the orders is laced
Root Schema : updateReturnRequest_request
Type:
Show Source
object
-
actualShippingRefund(optional):
number
Actual Shipping Refund for the return request
-
actualShippingSurchargeRefund(optional):
number
Actual Shipping Surcharge Refund for the return request
-
actualTaxRefund(optional):
number
Actual Tax Refund for the return request
-
additionalProperties(optional):
object additionalProperties
Map of Additional properties for return request
-
agentId(optional):
string
Agent id
-
appeasementRefundAdjustment(optional):
number
The refund amount adjustment needed for the existing appeasements on the same order
-
authorizationNumber(optional):
string
RMA number of Return Request
-
originOfReturn(optional):
string
Origin Of return request. Can be either default or contactCenter
-
otherRefund(optional):
number
Other Refund
-
refundMethodList(optional):
array refundMethodList
List of refund methods
-
returnFee(optional):
number
Return Fee for the return request
-
returnItemList(optional):
array returnItemList
List of returnable Items
-
returnLabel(optional):
string
return label of the return request
-
secondaryCurrencyActualShippingRefund(optional):
number
Actual shipping refund of all Return Items in secondary currency
-
secondaryCurrencyActualShippingSurchargeRefund(optional):
number
Actual shipping surcharge refund of all Return Items in secondary currency
-
secondaryCurrencyActualTaxRefund(optional):
number
Actual tax refund of all Return Items in secondary currency
-
secondaryCurrencyAppeasementRefundAdjustment(optional):
number
The secondary currency refund amount adjustment needed for the existing appeasements on the same order. This amount is deducted from the seconday currency refund total.
-
secondaryCurrencyShippingTaxRefund(optional):
number
Shipping Tax refund of all Return Items in secondary currency
-
shippingTaxRefund(optional):
number
Shipping tax Refund for the return request
-
state(optional):
string
State of Return Request
-
trackingNumber(optional):
string
Tracking Number of the return request. Provide comma separated tacking numbers in a single string for mulitple tracking numbers.
Example:
{
"shippingTaxRefund":3,
"agentId":"service",
"secondaryCurrencyShippingTaxRefund":0,
"actualShippingRefund":25,
"actualTaxRefund":6,
"otherRefund":0,
"secondaryCurrencyActualTaxRefund":0,
"refundMethodList":[
{
"refundType":"manualRefund",
"amount":86,
"state":"INCOMPLETE"
}
],
"returnLabel":null,
"authorizationNumber":"100001",
"returnFee":0,
"requestId":"100001",
"secondaryCurrencyActualShippingRefund":0,
"links":[
{
"rel":"self",
"href":"http://localhost:9080/ccadminui/v1/returnRequests/100001"
}
],
"appeasementRefundAdjustment":0,
"state":"FULL_RETURN",
"additionalProperties":{
"abc":"123"
},
"originOfReturn":"contactCenter",
"trackingNumber":null,
"returnItemList":[
{
"secondaryCurrencyActualTaxRefundShare":0,
"comments":"this is comment 112222",
"shippingGroupId":"sg40412",
"secondaryCurrencyActualShippingSurchargeRefundShare":0,
"quantityWithFractionReceived":0,
"commerceItemId":"ci3000414",
"secondaryCurrencyActualShippingRefundShare":0,
"disposition":"acceptedWithRefund",
"actualShippingSurchargeRefundShare":0,
"returnReason":"defective",
"childReturnItems":[
{
"secondaryCurrencyActualTaxRefundShare":0,
"comments":"this is comment 334444",
"shippingGroupId":"sg40413",
"secondaryCurrencyActualShippingSurchargeRefundShare":0,
"quantityWithFractionReceived":0,
"commerceItemId":"ci3000415",
"secondaryCurrencyActualShippingRefundShare":0,
"disposition":"rejectedWithRefund",
"actualShippingSurchargeRefundShare":0,
"returnReason":"defective",
"actualShippingRefundShare":0,
"state":"RETURNED",
"additionalProperties":{
},
"actualTaxRefundShare":0,
"quantityReceived":1,
"refundAmount":0
}
],
"actualShippingRefundShare":25,
"state":"RETURNED",
"additionalProperties":{
},
"actualTaxRefundShare":6,
"quantityReceived":1,
"refundAmount":49.99
}
],
"actualShippingSurchargeRefund":11,
"secondaryCurrencyActualShippingSurchargeRefund":0,
"secondaryCurrencyAppeasementRefundAdjustment":0
}
Nested Schema : additionalProperties
Type:
object
Map of Additional properties for return request
Nested Schema : items
Type:
Show Source
object
-
amount(optional):
number
Amount of refund at refund method level. This is the final amount that will be refunded
-
currencyCode(optional):
string
Currency code
-
methodType(optional):
string
Refund method type ex.tokenizedCreditCard, creditCard, manualRefund etc
-
paymentGroupId(optional):
string
Payment Group Id of the refund Method
-
refundPaidTo(optional):
string
Refund paid to
-
state(optional):
string
State of refund method. It can be either INCOMPLETE or COMPLETE
Nested Schema : returnItems_request
Type:
Show Source
object
- actualShippingRefundShare(optional): number
- actualShippingSurchargeRefundShare(optional): number
- actualTaxRefundShare(optional): number
-
additionalProperties(optional):
object additionalProperties
Map of Additional properties for each return item
-
childReturnItems(optional):
array childReturnItems
List of child return items of this return item
-
comments(optional):
string
Comments at ReturnItem Level
-
commerceItemId(optional):
string
Commerce Id of the returned item
-
disposition(optional):
string
Disposition reason
-
dispositionReason(optional):
string
Disposition Reason
-
quantityReceived(optional):
number
Quantity received in integer
-
quantityWithFractionReceived(optional):
number
Quantity received in fraction
-
refundAmount(optional):
number
Refund Amount at Item level
-
returnItemId(optional):
string
Id of the return Item
-
returnReason(optional):
string
Reason to return an Item
- secondaryCurrencyActualShippingRefundShare(optional): number
- secondaryCurrencyActualShippingSurchargeRefundShare(optional): number
- secondaryCurrencyActualTaxRefundShare(optional): number
-
shippingGroupId(optional):
string
Shipping group Id of the returned item
-
state(optional):
string
State of return item
Nested Schema : additionalProperties
Type:
object
Map of Additional properties for each return item
Nested Schema : childReturnItems
Type:
array
List of child return items of this return item
Show Source
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Root Schema : updateReturnRequest_response
Type:
Show Source
object
-
actualShippingRefund(optional):
number
Actual Shipping Refund for the return request
-
actualShippingSurchargeRefund(optional):
number
Actual Shipping Surcharge Refund for the return request
-
actualTaxRefund(optional):
number
Actual Tax Refund for the return request
-
additionalProperties(optional):
object additionalProperties
Map of Additional properties for return request
-
agentId(optional):
string
Agent id
-
appeasementRefundAdjustment(optional):
number
The refund amount adjustment needed for the existing appeasements on the same order
-
authorizationNumber(optional):
string
RMA number of Return Request
-
originOfReturn(optional):
string
Origin Of return request. Can be either default or contactCenter
-
otherRefund(optional):
number
Other Refund
-
refundMethodList(optional):
array refundMethodList
List of refund methods
-
returnFee(optional):
number
Return Fee for the return request
-
returnItemList(optional):
array returnItemList
List of returnable Items
-
returnLabel(optional):
string
return label of the return request
-
secondaryCurrencyActualShippingRefund(optional):
number
Actual shipping refund of all Return Items in secondary currency
-
secondaryCurrencyActualShippingSurchargeRefund(optional):
number
Actual shipping surcharge refund of all Return Items in secondary currency
-
secondaryCurrencyActualTaxRefund(optional):
number
Actual tax refund of all Return Items in secondary currency
-
secondaryCurrencyAppeasementRefundAdjustment(optional):
number
The secondary currency refund amount adjustment needed for the existing appeasements on the same order. This amount is deducted from the seconday currency refund total.
-
secondaryCurrencyShippingTaxRefund(optional):
number
Shipping Tax refund of all Return Items in secondary currency
-
shippingTaxRefund(optional):
number
Shipping tax Refund for the return request
-
state(optional):
string
State of Return Request
-
trackingNumber(optional):
string
Tracking Number of the return request. Provide comma separated tacking numbers in a single string for mulitple tracking numbers.
Example:
{
"shippingTaxRefund":3,
"agentId":"service",
"secondaryCurrencyShippingTaxRefund":0,
"actualShippingRefund":25,
"actualTaxRefund":6,
"otherRefund":0,
"secondaryCurrencyActualTaxRefund":0,
"refundMethodList":[
{
"refundType":"manualRefund",
"amount":86,
"state":"INCOMPLETE"
}
],
"returnLabel":null,
"authorizationNumber":"100001",
"returnFee":0,
"requestId":"100001",
"secondaryCurrencyActualShippingRefund":0,
"links":[
{
"rel":"self",
"href":"http://localhost:9080/ccadminui/v1/returnRequests/100001"
}
],
"appeasementRefundAdjustment":0,
"state":"FULL_RETURN",
"additionalProperties":{
"abc":"123"
},
"originOfReturn":"contactCenter",
"trackingNumber":null,
"returnItemList":[
{
"secondaryCurrencyActualTaxRefundShare":0,
"comments":"this is comment 112222",
"shippingGroupId":"sg40412",
"secondaryCurrencyActualShippingSurchargeRefundShare":0,
"quantityWithFractionReceived":0,
"commerceItemId":"ci3000414",
"secondaryCurrencyActualShippingRefundShare":0,
"disposition":"acceptedWithRefund",
"actualShippingSurchargeRefundShare":0,
"returnReason":"defective",
"childReturnItems":[
{
"secondaryCurrencyActualTaxRefundShare":0,
"comments":"this is comment 334444",
"shippingGroupId":"sg40413",
"secondaryCurrencyActualShippingSurchargeRefundShare":0,
"quantityWithFractionReceived":0,
"commerceItemId":"ci3000415",
"secondaryCurrencyActualShippingRefundShare":0,
"disposition":"rejectedWithRefund",
"actualShippingSurchargeRefundShare":0,
"returnReason":"defective",
"actualShippingRefundShare":0,
"state":"RETURNED",
"additionalProperties":{
},
"actualTaxRefundShare":0,
"quantityReceived":1,
"refundAmount":0
}
],
"actualShippingRefundShare":25,
"state":"RETURNED",
"additionalProperties":{
},
"actualTaxRefundShare":6,
"quantityReceived":1,
"refundAmount":49.99
}
],
"actualShippingSurchargeRefund":11,
"secondaryCurrencyActualShippingSurchargeRefund":0,
"secondaryCurrencyAppeasementRefundAdjustment":0
}
Nested Schema : additionalProperties
Type:
object
Map of Additional properties for return request
Nested Schema : items
Type:
Show Source
object
-
amount(optional):
number
Amount of refund at refund method level. This is the final amount that will be refunded
-
currencyCode(optional):
string
Currency code
-
methodType(optional):
string
Refund method type ex.tokenizedCreditCard, creditCard, manualRefund etc
-
paymentGroupId(optional):
string
Payment Group Id of the refund Method
-
refundPaidTo(optional):
string
Refund paid to
-
state(optional):
string
State of refund method. It can be either INCOMPLETE or COMPLETE
Nested Schema : returnItems_response
Type:
Show Source
object
- actualShippingRefundShare(optional): number
- actualShippingSurchargeRefundShare(optional): number
- actualTaxRefundShare(optional): number
-
additionalProperties(optional):
object additionalProperties
Map of Additional properties for each return item
-
childReturnItems(optional):
array childReturnItems
List of child return items of this return item.
-
comments(optional):
string
Comments at ReturnItem Level
-
commerceItemId(optional):
string
Commerce Id of the returned item
-
disposition(optional):
string
Disposition reason
-
dispositionReason(optional):
string
Disposition Reason
-
quantityReceived(optional):
number
Quantity received in integer
-
quantityWithFractionReceived(optional):
number
Quantity received in fraction
-
refundAmount(optional):
number
Refund Amount at Item level
-
returnItemId(optional):
string
Id of the return Item
-
returnReason(optional):
string
Reason to return an Item
- secondaryCurrencyActualShippingRefundShare(optional): number
- secondaryCurrencyActualShippingSurchargeRefundShare(optional): number
- secondaryCurrencyActualTaxRefundShare(optional): number
-
shippingGroupId(optional):
string
Shipping group Id of the returned item
-
state(optional):
string
State of return item
Nested Schema : additionalProperties
Type:
object
Map of Additional properties for each return item
Nested Schema : childReturnItems
Type:
array
List of child return items of this return item.
Show Source
Example Response (application/json)
{
"returnRequestStatus":"Full return",
"isExchangeRequest":false,
"returnItems":[
{
"quantityReturned":1,
"deactivationDate":"2018-06-27T12:59:59Z",
"dynamicProperties":[
{
"id":"ReferralCode",
"label":"ReferralCode",
"value":null
},
{
"id":"OfferEndsDate",
"label":"OfferEndsDate",
"value":"2020-07-02T03:42:42.962Z"
},
{
"id":"Discount",
"label":"Discount",
"value":0
},
{
"id":"GiftWrapping",
"label":"Gift Wrapping",
"value":false
},
{
"id":"CustomMessage",
"label":"Custom Message",
"value":null
},
{
"id":"name",
"label":"Name on product(Mug)",
"value":"My name"
},
{
"id":"ShippingInstructions",
"label":"Shipping Instructions",
"value":null
}
],
"displayName":"OM-D E-M10 Digital Compact System Camera",
"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":1,
"productId":"prod10039",
"displayName":"Wii Music",
"externalData":[
],
"parentAssetKey":"23456",
"billingProfileId":"billingProfile-123",
"billingAccountId":"billingAcc-123",
"rootAssetKey":"12345",
"transactionDate":"2018-06-27T12:59:59Z",
"catRefId":"sku10049",
"assetKey":"34567",
"route":"product/prod10039",
"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":"84848",
"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":"93754",
"route":"product/prod10038",
"customerAccountId":"customerAcc-123",
"selectedOptions":[
],
"actionCode":"Add",
"activationDate":"2017-06-27T15:30:00Z",
"serviceId":"service-123",
"asset":false
}
],
"configuratorId":"12345677",
"skuOptionInfo":[
{
"optionValue":"Tan",
"optionName":"color"
},
{
"optionValue":"30.8-megapixels",
"optionName":"resolution"
}
],
"assetKey":"12345",
"quantityAvailableForReturn":0,
"commerceItemId":"ci9000467",
"suggestedShippingRefund":35,
"price":200,
"returnReason":"Incorrect Item",
"actionCode":"Add",
"promotionAdjustments":[
],
"serviceId":"service-123",
"quantityReceived":1,
"dispositionReason":{
"displayKey":"acceptedWithRefund",
"displayName":"Accepted With Refund"
},
"serviceAccountId":"serviceAcc-123",
"unitPrice":200,
"quantityToReturn":1,
"comments":null,
"productId":"camera_1",
"returnItemId":"100003",
"quantityToReceive":0,
"shippingGroupId":"sg80417",
"suggestedTaxRefund":23.31,
"parentAssetKey":null,
"rootAssetKey":null,
"transactionDate":"2018-06-27T12:59:59Z",
"catRefId":"camerasku_1_5",
"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":1,
"adjustedPromotionReferences":"",
"additionalProperties":{
"property2":"tag",
"property":"display"
},
"activationDate":"2017-06-27T15:30:00Z",
"asset":false,
"actualRefundAmount":200,
"suggestedRefundAmount":200
}
],
"returnLabel":"return label 1",
"isManuallyAdjusted":false,
"orderInfo":{
"originOfOrder":"contactCenter",
"priceInfo":{
"total":256.31,
"amount":198,
"shipping":35,
"isTaxIncluded":false,
"tax":23.31,
"subTotal":200,
"orderDiscountAmount":2,
"currencyCode":"USD",
"totalWithoutTax":189.9
},
"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":"o10423",
"siteId":"siteUS",
"creationDate":"2015-03-27 15:53:01.0",
"submittedDate":"2015-03-27 15:54:01.0"
},
"refundInfo":{
"refundDue":256.31,
"suggestedShippingRefund":35,
"returnFee":0,
"suggestedOrderRefund":200,
"suggestedTaxRefund":23.31,
"suggestedTotalRefund":256.31,
"appeasementRefundAdjustment":0,
"actualShippingRefund":35,
"actualTaxRefund":23.31,
"otherRefund":0,
"secondaryCurrencyAppeasementRefundAdjustment":0
},
"isSetteled":false,
"promotionAdjustments":{
"promotionAdjustmentsCount":1,
"orderPromotionValueAdjustments":[
{
"adjustedAmount":2,
"promotionAdjustmentType":"Removed",
"promotionDesc":"Order Discount - SAVE$2ON20 - Coupon",
"couponCode":"SAVE2ON20",
"promotionId":"explicitOrderDiscount2on20"
}
],
"totalOrderDiscountAdjustment":2,
"nonReturnItemCostAdjustment":[
],
"itemPromotionValueAdjustments":[
],
"manyToManyPromotionCouponAdjustment":{
"SAVE2ON20":[
{
"adjustedAmount":2,
"promotionAdjustmentType":"Removed",
"promotionDesc":"Order Discount - SAVE$2ON20 - Coupon",
"promotionId":"explicitOrderDiscount2on20"
}
]
}
},
"links":[
{
"rel":"self",
"href":"http://localhost:9080/ccagentui/v1/returnRequests/100003"
}
],
"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"
],
"paymentReversalInfo":{
"creditCardInfo":{
"cardNumber":"xxxxxxxxxxxx1111"
},
"reversalMethod":"Card Payment Reversal"
}
}
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|
|------------------|------------------|
|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|
|200219|{0} is an inactive reason.|
|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|
|200127|Internal error occurred.|
|200218|{0} is an invalid reason.|
|200126|Invalid Input Parameter.|
|200125|Input passed in is null.|
|200131|Return Request Id passed in is null.|
|200132|Return Request is not in pending refund state.|
|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|
|200145|Refund amount cannot exceed payment group's amount.(Payment Group Type: {0}, Payment Group Id: {1})|
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