calculateRemainingRefund
post
/ccagent/v1/returnRequests/{id}/calculateRemainingRefund
Endpoint to return suggested refund amount remaining in the price list group's currency as well as alternate currency in cases where allowAlternateCurrency flag at site level is true. Note that, this endpoint is just for suggesting remaining refund amount which need to be adjusted in refund methods
Request
Supported Media Types
- application/json
Path Parameters
-
id: string
The return request id.
Root Schema : calculateRemainingRefund_request
Type:
Show Source
object
-
primaryCurrencyRefundAmount:
number
Sum of refund method amounts which point to payment groups where currency code = PLG's currency code
-
secondaryCurrencyRefundAmount:
number
Sum of refund method amounts which point to payment groups where currency code = alternate currency code
Example:
{
"primaryCurrencyRefundAmount":0,
"secondaryCurrencyRefundAmount":0
}
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Root Schema : calculateRemainingRefund_response
Type:
Show Source
object
-
minimumAmountInPrimaryCurrency(optional):
number
Minimum amount which should be included in refund method's where refund method currency code = order's priceListGroup currency code
-
minimumAmountInSecondaryCurrency(optional):
number
Minimum amount which should be included in refund method's where refund method currency code = alternate currency code
-
remainingRefundAmountInPrimaryCurrency(optional):
number
Remaining refund amount which can be adjusted/included in refund method's where refund method currency code = order's priceListGroup currency code
-
remainingRefundAmountInSecondaryCurrency(optional):
number
Remaining refund amount which can be adjusted/included in refund method's where refund method currency code = alternate currency code
-
totalRefundAmount(optional):
number
Total refund amount in order's priceListGroup currency
Example Response (application/json)
{
"remainingRefundAmountInPrimaryCurrency":0,
"minimumAmountInSecondaryCurrency":17.42,
"minimumAmountInPrimaryCurrency":53,
"links":[
{
"rel":"self",
"href":"http://localhost:9080/ccagentui/v1/returnRequests/900001/calculateRemainingRefund"
}
],
"totalRefundAmount":53,
"remainingRefundAmountInSecondaryCurrency":0
}
Default Response
The error response
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