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:
string
Required:true
The order ID to retreive all related return requests.
Header Parameters
- X-CCOrganization
-
Type:
string
Current 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:
string
The authorization date of the return request. - isExchangeRequest
-
Type:
boolean
Either it is exchange / return request. - operation
-
Type:
string
The return operation of the return request - returnItems
-
Type:
array
returnItemsAdditional Properties Allowed:List of return items in the return request. - returnRequestId
-
Type:
string
The ID of the return request. - state
-
Type:
string
Status of Return Request. - totalRefund
-
Type:
number
The total refund amount of the return request. - totalReturnQuantity
-
Type:
number
The total returned quantity in the return request.
Nested Schema : returnItems
Nested Schema : items
Type:
object
- catRefId
-
Type:
string
The SKU ID of the return item. - productId
-
Type:
string
The Product ID of the return item. - quantityToReturn
-
Type:
integer
The quantity Returned of the return item. - returnReason
-
Type:
string
The return reason of the return item. - state
-
Type:
string
The 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:
string
An optional non-localized message containing technical information for developers - errorCode
-
Type:
string
The numerical code identifying the error - errors
-
Type:
array
errorsAdditional Properties Allowed:An optional list of errors if multiple errors were encountered - message
-
Type:
string
The localized message describing the error - moreInfo
-
Type:
string
An optional non-localized message with more information - o:errorPath
-
Type:
string
An optional machine readable description of where the error occurred - status
-
Type:
string
The HTTP status code - type
-
Type:
string
The URI to the HTTP state code definition
Nested Schema : errors
Nested Schema : items
Type:
object
- devMessage
-
Type:
string
An optional non-localized message containing technical information for developers - errorCode
-
Type:
string
The numerical code identifying the error - message
-
Type:
string
The localized message describing the error - moreInfo
-
Type:
string
An optional non-localized message with more information - o:errorPath
-
Type:
string
An optional machine readable description of where the error occurred - status
-
Type:
string
The 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" } ] }