listReturnRequests
get
/ccstore/v1/orders/{id}/returnRequests
Lists all return requests for a given order ID. Optionally takes the x-ccasset-language headers to get translated content in another language. Also it can have optional X-CCOrganization header which is a JSON field to specify current Organization context of logged in user.
Request
Supported Media Types
- application/json
Path Parameters
- id
-
Type:
stringRequired:trueThe order ID to retreive all related return requests.
Header Parameters
- X-CCOrganization
-
Type:
stringCurrent organization context of the logged in user
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : listReturnRequests_response
Nested Schema : items
Nested Schema : items
Type:
object- createdDate
-
Type:
stringThe authorization date of the return request. - isExchangeRequest
-
Type:
booleanEither it is exchange / return request. - operation
-
Type:
stringThe return operation of the return request - returnItems
-
Type:
arrayreturnItemsAdditional Properties Allowed:List of return items in the return request. - returnRequestId
-
Type:
stringThe ID of the return request. - state
-
Type:
stringStatus of Return Request. - totalRefund
-
Type:
numberThe total refund amount of the return request. - totalReturnQuantity
-
Type:
numberThe total returned quantity in the return request.
Nested Schema : returnItems
Nested Schema : items
Type:
object- catRefId
-
Type:
stringThe SKU ID of the return item. - productId
-
Type:
stringThe Product ID of the return item. - quantityToReturn
-
Type:
integerThe quantity Returned of the return item. - returnReason
-
Type:
stringThe return reason of the return item. - state
-
Type:
stringThe state of the return item.
Example application/json
{
"links":[
{
"rel":"self",
"href":"http://example.com/ccstoreui/v1/orders/o20005/returnRequests"
}
],
"items":[
{
"returnRequestId":"400002",
"isExchangeRequest":false,
"createdDate":1.506068561E12,
"returnItems":[
{
"quantityToReturn":1,
"productId":"prod10001",
"returnReason":"Did Not Like",
"state":"AWAITING_RETURN",
"catRefId":"sku30005"
}
],
"totalRefund":50.3,
"state":"Approved",
"totalReturnQuantity":1,
"operation":"process"
},
{
"returnRequestId":"400001",
"isExchangeRequest":false,
"createdDate":1.506068328E12,
"returnItems":[
{
"quantityToReturn":1,
"productId":"prod10001",
"returnReason":"Did Not Like",
"state":"RETURNED",
"catRefId":"sku30005"
}
],
"totalRefund":50.3,
"state":"Complete",
"totalReturnQuantity":1,
"operation":""
},
{
"returnRequestId":"300001",
"isExchangeRequest":false,
"createdDate":1.506065576E12,
"returnItems":[
{
"quantityToReturn":1,
"productId":"prod10001",
"returnReason":"Did Not Like",
"state":"AWAITING_RETURN",
"catRefId":"sku30005"
}
],
"totalRefund":50.3,
"state":"Approved",
"totalReturnQuantity":1,
"operation":"process"
},
{
"returnRequestId":"200001",
"isExchangeRequest":false,
"createdDate":1.50606328E12,
"returnItems":[
{
"quantityToReturn":1,
"productId":"prod10001",
"returnReason":"Did Not Like",
"state":"AWAITING_RETURN",
"catRefId":"sku30005"
}
],
"totalRefund":50.3,
"state":"Approved",
"totalReturnQuantity":1,
"operation":"process"
},
{
"returnRequestId":"100001",
"isExchangeRequest":false,
"createdDate":1.506062312E12,
"returnItems":[
{
"quantityToReturn":1,
"productId":"prod10001",
"returnReason":"Did Not Like",
"state":"AWAITING_RETURN",
"catRefId":"sku30005"
}
],
"totalRefund":50.3,
"state":"Approved",
"totalReturnQuantity":1,
"operation":"process"
}
]
}
Default Response
The error response
Body
Root Schema : errorModel
Type:
object- devMessage
-
Type:
stringAn optional non-localized message containing technical information for developers - errorCode
-
Type:
stringThe numerical code identifying the error - errors
-
Type:
arrayerrorsAdditional Properties Allowed:An optional list of errors if multiple errors were encountered - message
-
Type:
stringThe localized message describing the error - moreInfo
-
Type:
stringAn optional non-localized message with more information - o:errorPath
-
Type:
stringAn optional machine readable description of where the error occurred - status
-
Type:
stringThe HTTP status code - type
-
Type:
stringThe URI to the HTTP state code definition
Nested Schema : errors
Nested Schema : items
Type:
object- devMessage
-
Type:
stringAn optional non-localized message containing technical information for developers - errorCode
-
Type:
stringThe numerical code identifying the error - message
-
Type:
stringThe localized message describing the error - moreInfo
-
Type:
stringAn optional non-localized message with more information - o:errorPath
-
Type:
stringAn optional machine readable description of where the error occurred - status
-
Type:
stringThe HTTP status code
Examples
Sample Response Payload returned by endpoint:
{
"links": [{
"rel": "self",
"href": "http://example.com/ccstoreui/v1/orders/o20005/returnRequests"
}],
"items": [
{
"returnRequestId": "400002",
"isExchangeRequest": false,
"createdDate": 1506068561000,
"returnItems": [{
"quantityToReturn": 1,
"productId": "prod10001",
"returnReason": "Did Not Like",
"state": "AWAITING_RETURN",
"catRefId": "sku30005"
}],
"totalRefund": 50.3,
"state": "Approved",
"totalReturnQuantity": 1,
"operation": "process"
},
{
"returnRequestId": "400001",
"isExchangeRequest": false,
"createdDate": 1506068328000,
"returnItems": [{
"quantityToReturn": 1,
"productId": "prod10001",
"returnReason": "Did Not Like",
"state": "RETURNED",
"catRefId": "sku30005"
}],
"totalRefund": 50.3,
"state": "Complete",
"totalReturnQuantity": 1,
"operation": ""
},
{
"returnRequestId": "300001",
"isExchangeRequest": false,
"createdDate": 1506065576000,
"returnItems": [{
"quantityToReturn": 1,
"productId": "prod10001",
"returnReason": "Did Not Like",
"state": "AWAITING_RETURN",
"catRefId": "sku30005"
}],
"totalRefund": 50.3,
"state": "Approved",
"totalReturnQuantity": 1,
"operation": "process"
},
{
"returnRequestId": "200001",
"isExchangeRequest": false,
"createdDate": 1506063280000,
"returnItems": [{
"quantityToReturn": 1,
"productId": "prod10001",
"returnReason": "Did Not Like",
"state": "AWAITING_RETURN",
"catRefId": "sku30005"
}],
"totalRefund": 50.3,
"state": "Approved",
"totalReturnQuantity": 1,
"operation": "process"
},
{
"returnRequestId": "100001",
"isExchangeRequest": false,
"createdDate": 1506062312000,
"returnItems": [{
"quantityToReturn": 1,
"productId": "prod10001",
"returnReason": "Did Not Like",
"state": "AWAITING_RETURN",
"catRefId": "sku30005"
}],
"totalRefund": 50.3,
"state": "Approved",
"totalReturnQuantity": 1,
"operation": "process"
}
]
}