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:
stringRequired:trueSearch 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:
stringThe 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:
integerTotal number of return requests present in search result. - totalRequests
-
Type:
arraytotalRequestsAdditional Properties Allowed:Total return requests details.
Nested Schema : totalRequests
Nested Schema : items
Type:
object- createdDate
-
Type:
stringdate of creation - firstName
-
Type:
stringFirst Name - lastName
-
Type:
stringLast Name - operation
-
Type:
stringReturn operation - orderId
-
Type:
stringOrder id - priceListGroup
-
Type:
objectpriceListGroupAdditional Properties Allowed:PriceList group of the order. - returnRequestId
-
Type:
stringrequest id - siteId
-
Type:
stringsite id of the return request - state
-
Type:
stringreturn state - totalRefund
-
Type:
stringrefund amount - totalReturnQuantity
-
Type:
stringreturned quantities
Nested Schema : priceListGroup
Type:
objectPriceList group of the order.
- active
-
Type:
booleanActive status of pricelist group. - currency
-
Type:
objectcurrencyAdditional Properties Allowed:Currency of the PriceList group. - deleted
-
Type:
booleanPricelist group deleted status. - displayName
-
Type:
stringDisplay Name. - id
-
Type:
stringId. - listPriceList
-
Type:
objectlistPriceListAdditional Properties Allowed:Price List for list prices - locale
-
Type:
stringLocale. - repositoryId
-
Type:
stringRepository Id. - salePriceList
-
Type:
objectsalePriceListAdditional Properties Allowed:Price List for sale prices - shippingSurchargePriceList
-
Type:
objectshippingSurchargePriceListAdditional Properties Allowed:Price List for shipping surcharge prices
Nested Schema : currency
Type:
objectCurrency of the PriceList group.
- currencyCode
-
Type:
stringCurrency Code. - displayName
-
Type:
stringDisplay Name. - fractionalDigits
-
Type:
integerFractional Digits. - numericCode
-
Type:
stringNumeric Code. - repositoryId
-
Type:
stringRepository Id. - symbol
-
Type:
stringcurrency Symbol.
Nested Schema : listPriceList
Type:
objectPrice List for list prices
- repositoryId
-
Type:
stringRepository ID of the list prices
Nested Schema : salePriceList
Type:
objectPrice List for sale prices
- repositoryId
-
Type:
stringRepository ID of the sale prices
Nested Schema : shippingSurchargePriceList
Type:
objectPrice List for shipping surcharge prices
- repositoryId
-
Type:
stringRepository 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:
stringAn optional non-localized message containing technical information for developers - errorCode
-
Type:
stringThe numerical code identifying the error - errors
-
Type:
arrayerrorsAdditional Properties Allowed:An optional list of errors if multiple errors were encountered - message
-
Type:
stringThe localized message describing the error - moreInfo
-
Type:
stringAn optional non-localized message with more information - o:errorPath
-
Type:
stringAn optional machine readable description of where the error occurred - status
-
Type:
stringThe HTTP status code - type
-
Type:
stringThe URI to the HTTP state code definition
Nested Schema : errors
Nested Schema : items
Type:
object- devMessage
-
Type:
stringAn optional non-localized message containing technical information for developers - errorCode
-
Type:
stringThe numerical code identifying the error - message
-
Type:
stringThe localized message describing the error - moreInfo
-
Type:
stringAn optional non-localized message with more information - o:errorPath
-
Type:
stringAn optional machine readable description of where the error occurred - status
-
Type:
stringThe 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"
}]
}