searchReturns

get

/ccagent/v1/returnRequests

Search Returns. Gets a list of return requests from the repository based on given search criteria. Optionally takes X-CCOrganization header which is a JSON field with organization ID as value.

Request

Supported Media Types
  • application/json
Query Parameters
q
Type: string
Required: true
Search criteria to filter the search results based on various fields like email etc. Following are the fields supported by this param: |Field|Type|Description| |------------------|------------------|------------------| |returnRequestId|string|The Return Request ID.| |pageNumber|integer|The page number for pagination.| |orderId|string|Order id| |limit|integer|The batch size of the return requests to be fetched together.| |siteId|string|site id of the return request| |state|string|state of the return request eg. PENDING_REFUND| |startDateFromTimeSpan|string|Date to start searching from like "yyyy-mm-ddThh:mm:ss.sssz" | |email|string|Email id of the customer profile| |account|string|Account id of the return requests to be fetched|
Header Parameters
X-CCOrganization
Type: string
The organization Id to which the order belongs

Response

Supported Media Types
  • application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : searchReturns_response
Nested Schema : totalRequests
Type: array
Total return requests details.
Nested Schema : items
Type: object
Nested Schema : priceListGroup
Type: object
PriceList group of the order.
Nested Schema : currency
Type: object
Currency of the PriceList group.
Nested Schema : listPriceList
Type: object
Price List for list prices
Nested Schema : salePriceList
Type: object
Price List for sale prices
Nested Schema : shippingSurchargePriceList
Type: object
Price List for shipping surcharge prices
Example application/json

{
    "links":[
        {
            "rel":"self",
            "href":"http://localhost:9080/ccagentui/v1/returnRequests?q=%7B%22returnRequestId%22%3A%22100003%22%2C%22orderId%22%3A%22%22%2C%22email%22%3A%22%22%2C%22startDateFromTimeSpan%22%3A%22%22%2C%22limit%22%3A20%2C%22pageNumber%22%3A0%7D"
        }
    ],
    "totalRequests":1,
    "searchResults":[
        {
            "returnRequestId":"100003",
            "lastName":"Anderson",
            "firstName":"Kim",
            "isExchangeRequest":false,
            "createdDate":"2015-05-12T11:04:09.000Z",
            "orderId":"o10401",
            "totalRefund":36.46,
            "siteId":"siteUS",
            "priceListGroup":{
                "deleted":false,
                "displayName":"UsDollar",
                "repositoryId":"UsDollar",
                "listPriceList":{
                    "repositoryId":"listPrices"
                },
                "active":true,
                "salePriceList":{
                    "repositoryId":"salePrices"
                },
                "currency":{
                    "symbol":"$",
                    "displayName":"US Dollar",
                    "repositoryId":"en_US",
                    "fractionalDigits":2,
                    "currencyCode":"USD",
                    "numericCode":"840"
                },
                "id":"UsDollar",
                "locale":"en_US",
                "shippingSurchargePriceList":{
                    "repositoryId":"shippingSurchargePrices"
                }
            },
            "state":"Approved",
            "totalReturnQuantity":1,
            "operation":"process"
        }
    ]
}
Default Response
The error response. The following are the internal error codes thrown by this API when the request processing fails in Oracle Commerce Cloud: |Error Code|Description| |------------------|------------------| |200020|Search Criteria passed is null or empty| |100094|Organization passed in the header is currently inactive| |100095|The order or return request does not belong to the current organization of the shopper profile| |100096|The organization associated to the order or return request was deleted / does not exist| |100097|The organization associated to the order or return request is currently inactive| |100098|Current operation is being performed in an organization context and the shopper profile is not associated to any organization| |100099|Current operation is being performed in an organization context and the order or return request does not belong to any organization| |100101|The shopper profile does not belong to organization passed in the header| |200127|Internal error occurred.| |200137|Invalid limit| |200136|Invalid offset or limit|
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://localhost:9080/ccagentui/v1/returnRequests?q=%7B%22returnRequestId%22%3A%22100003%22%2C%22orderId%22%3A%22%22%2C%22email%22%3A%22%22%2C%22startDateFromTimeSpan%22%3A%22%22%2C%22limit%22%3A20%2C%22pageNumber%22%3A0%7D"
  }],
  "totalRequests": 1,
  "searchResults": [{
    "returnRequestId": "100003",
    "lastName": "Anderson",
    "firstName": "Kim",
    "isExchangeRequest": false,
    "createdDate": "2015-05-12T11:04:09.000Z",
    "orderId": "o10401",
    "totalRefund": 36.46,
    "siteId": "siteUS",
    "priceListGroup": {
      "deleted": false,
      "displayName": "UsDollar",
      "repositoryId": "UsDollar",
      "listPriceList": {"repositoryId": "listPrices"},
      "active": true,
      "salePriceList": {"repositoryId": "salePrices"},
      "currency": {
        "symbol": "$",
        "displayName": "US Dollar",
        "repositoryId": "en_US",
        "fractionalDigits": 2,
        "currencyCode": "USD",
        "numericCode": "840"
      },
      "id": "UsDollar",
      "locale": "en_US",
      "shippingSurchargePriceList": {"repositoryId": "shippingSurchargePrices"}
    },
    "state": "Approved",
    "totalReturnQuantity": 1,
    "operation": "process"
  }]
}