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
- searchResults
-
Type:
integer
Total number of return requests present in search result. - totalRequests
-
Type:
array
totalRequestsAdditional Properties Allowed:Total return requests details.
Nested Schema : totalRequests
Nested Schema : items
Type:
object
- createdDate
-
Type:
string
date of creation - firstName
-
Type:
string
First Name - lastName
-
Type:
string
Last Name - operation
-
Type:
string
Return operation - orderId
-
Type:
string
Order id - priceListGroup
-
Type:
object
priceListGroupAdditional Properties Allowed:PriceList group of the order. - returnRequestId
-
Type:
string
request id - siteId
-
Type:
string
site id of the return request - state
-
Type:
string
return state - totalRefund
-
Type:
string
refund amount - totalReturnQuantity
-
Type:
string
returned quantities
Nested Schema : priceListGroup
Type:
object
PriceList group of the order.
- active
-
Type:
boolean
Active status of pricelist group. - currency
-
Type:
object
currencyAdditional Properties Allowed:Currency of the PriceList group. - deleted
-
Type:
boolean
Pricelist group deleted status. - displayName
-
Type:
string
Display Name. - id
-
Type:
string
Id. - listPriceList
-
Type:
object
listPriceListAdditional Properties Allowed:Price List for list prices - locale
-
Type:
string
Locale. - repositoryId
-
Type:
string
Repository Id. - salePriceList
-
Type:
object
salePriceListAdditional Properties Allowed:Price List for sale prices - shippingSurchargePriceList
-
Type:
object
shippingSurchargePriceListAdditional Properties Allowed:Price List for shipping surcharge prices
Nested Schema : currency
Type:
object
Currency of the PriceList group.
- currencyCode
-
Type:
string
Currency Code. - displayName
-
Type:
string
Display Name. - fractionalDigits
-
Type:
integer
Fractional Digits. - numericCode
-
Type:
string
Numeric Code. - repositoryId
-
Type:
string
Repository Id. - symbol
-
Type:
string
currency Symbol.
Nested Schema : listPriceList
Type:
object
Price List for list prices
- repositoryId
-
Type:
string
Repository ID of the list prices
Nested Schema : salePriceList
Type:
object
Price List for sale prices
- repositoryId
-
Type:
string
Repository ID of the sale prices
Nested Schema : shippingSurchargePriceList
Type:
object
Price List for shipping surcharge prices
- repositoryId
-
Type:
string
Repository ID of the 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
- 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://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" }] }