Appearance
PATCH
/config/return-reason/return-reasons/{returnReasonId}Required scope:
viskan:returnreason:updateUpdate the details of a return reason.
Parameters
Path parameters
returnReasonId integerThe unique identifier of the return reason to update.
Request body
JSON
{
"reasonCode": "...",
"reasonDesc": "...",
"reasonType": "...",
"active": true,
"requiresReview": true,
"increaseStock": true,
"daysToReturn": 12345,
"penaltyArticleId": 12345,
"completeReturn": true,
"telemarketingCredit": true,
"deactivateSubscription": true,
"cancellationReasonId": 12345,
"translations": {
"added": [
{
"languageId": 12345,
"description": "..."
}
],
"modified": [
{
"languageId": 12345,
"description": "..."
}
],
"removed": [
12345
]
},
"defaults": {
"added": [
{
"returnReasonDefaultId": 12345,
"countryId": 12345,
"wayOfDeliveryId": 12345,
"returnFee": 199.99,
"clearShippingFee": true,
"clearPaymentFee": true,
"clearServiceFee": true,
"clearRounding": true,
"clearDiscount": true,
"clearAmountClaim": true,
"clearQuantity": true
}
],
"modified": [
{
"returnReasonDefaultId": 12345,
"countryId": 12345,
"wayOfDeliveryId": 12345,
"returnFee": 199.99,
"clearShippingFee": true,
"clearPaymentFee": true,
"clearServiceFee": true,
"clearRounding": true,
"clearDiscount": true,
"clearAmountClaim": true,
"clearQuantity": true
}
],
"removed": [
"..."
]
},
"entries": {
"added": [
{
"entryId": 12345
}
],
"removed": [
12345
]
}
}
Response
The return reason was updated successfully.
| Error code | Description |
|---|---|
cancellation-reason-required | A cancellation reason is required when subscription action is set to deactivate. |
return-reason-code-cannot-be-blank | Return reason code cannot be a blank string. |
return-reason-default-duplicate | A default already exists for this country and way of delivery. |
return-reason-default-not-found | A default row to be modified was not found. |
return-reason-description-cannot-be-blank | Return reason description cannot be a blank string. |
return-reason-duplicate | A return reason with this code already exists. |
return-reason-not-found | The return reason with the given ID was not found. |