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
Query Parameters
  • 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.| |authorizationNumber|string|RMA is the merchant authorization number required for validation.| |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
Back to Top

Response

Supported Media Types

200 Response

Following model is returned when operation succeeds.
Body ()
Root Schema : searchReturns_response
Type: object
Show Source
Nested Schema : totalRequests
Type: array
Total return requests details.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : priceListGroup
Type: object
PriceList group of the order.
Show Source
Nested Schema : totalRefundMap
Type: object
Additional Properties Allowed
Show Source
  • refund amount in respective currency
A hashmap with currency code as a key and the refund amount as the value.Map will be returned in response if payment is done with multiple currencies
Nested Schema : currency
Type: object
Currency of the PriceList group.
Show Source
Nested Schema : listPriceList
Type: object
Price List for list prices
Show Source
Nested Schema : salePriceList
Type: object
Price List for sale prices
Show Source
Nested Schema : shippingSurchargePriceList
Type: object
Price List for shipping surcharge prices
Show Source
Example Response (application/json)
{
    "links":[
        {
            "rel":"self",
            "href":"http://localhost:9080/ccagentui/v1/returnRequests?q=%7B%22returnRequestId%22%3A%22300001%22%2C%22authorizationNumber%22%3A%22300002%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",
            "isExchangeRequest":false,
            "orderId":"o10401",
            "totalRefund":36.46,
            "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"
                }
            },
            "firstName":"Kim",
            "authorizationNumber":"100001",
            "createdDate":"2015-05-12T11:04:09.000Z",
            "siteId":"siteUS",
            "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
Show Source
Nested Schema : errors
Type: array
An optional list of errors if multiple errors were encountered
Show Source
Nested Schema : items
Type: object
Show Source
Back to Top