Step 1. Retrieve Ready Buyer Initiated Returns with OrderID Only


When to Use

  • To retrieve new Buyer Initiated Returns that are ready for review/action, and import any returns that were auto-approved and are now in a ReadyForReturn status.
  • This request will only display the OrderIDs in the response.
  • This request will display the order level or item-level adjustment information where the RequestStatus defined exists.

Resource URL / Endpoint

Order Level: GET https://api.channeladvisor.com/v1/Orders?$filter=Adjustments/Any (c:c/RequestStatus eq 'NewRma') or Adjustments/Any (c:c/RequestStatus eq 'ReadyForReturn')&$select=ID
Item Level: GET https://api.channeladvisor.com/v1/OrderItems?$filter=Adjustments/Any (c:c/RequestStatus eq 'NewRma') or Adjustments/Any (c:c/RequestStatus eq 'ReadyForReturn')&$select=OrderID

Important and/or Required Parameters

PropertyRequiredNote
$filter=Adjustments/AnyRequiredDefines the filtering action on the Adjustments collection, allowing for Any value to be searched.
(c:c/RequestStatus eq 'NewRma')RequiredDefines the property and specific value this property requires to meet the filter setting.
orRequiredDefines the operator to allow for filtering to an additional property.
Adjustments/AnyRequiredDefines the location of the Collection this data exists in.
(c:c/RequestStatus eq 'ReadyForReturn')RequiredDefines the property and specific value this property requires to meet the filter setting.

$select=ID
OR
$select=OrderID

Required

Defines the property selection for the response should be the Order ID only.

Item Level Example Request
GET https://api.channeladvisor.com/v1/OrderItems?access_token=xxxxxxxxxx&$filter=Adjustments/Any (c:c/RequestStatus eq 'NewRma') or Adjustments/Any (c:c/RequestStatus eq 'ReadyForReturn')&$select=OrderID
Item Level Example Response (Success)
200 OK
{
  "@odata.context": "https://api.channeladvisor.com/v1/$metadata#OrderItems(OrderID)",
  "value": [
    {
      "OrderID": 27204669
    },
    {
      "OrderID": 27214603
    },
    {
      "OrderID": 27239055
    },
    {
      "OrderID": 27240055
    },
    {
      "OrderID": 27262150
    },
    {
      "OrderID": 27270852
    },
    {
      "OrderID": 27273255
    },
    {
      "OrderID": 27277019
    },
    {
      "OrderID": 27289930
    },
    {
      "OrderID": 27298377
    },
    {
      "OrderID": 27302534
    },
    {
      "OrderID": 27306781
    },
    {
      "OrderID": 27312725
    },
    {
      "OrderID": 27314227
    },
    {
      "OrderID": 27315588
    },
    {
      "OrderID": 27317210
    },
    {
      "OrderID": 27317601
    },
    {
      "OrderID": 27319192
    },
    {
      "OrderID": 27322467
    },
    {
      "OrderID": 27326354
    }
  ],
  "@odata.nextLink": "https://api.channeladvisor.com/v1/OrderItems?$filter=Adjustments%2FAny%20%28c%3Ac%2FRequestStatus%20eq%20%27NewRma%27%29&$select=OrderID&access_token=xxxxxxxxxx&$skip=20"
}