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
Type: array
List of all return requests related to an order.
Nested Schema : items
Type: object
Nested Schema : returnItems
Type: array
List of return items in the return request.
Nested Schema : items
Type: object
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
Nested Schema : errors
Type: array
An optional list of errors if multiple errors were encountered
Nested Schema : items
Type: object

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"
    }
  ]
}