# List order returns

Endpoint: GET /orderreturns
Version: 1.0.457.36910
Security: OAuth2

## Security:

  - `OAuth2` (unknown)
    oauth2 scopes: FullAccess, OrderAdmin, Shopper, OrderReader

## Query parameters:

  - `approvable` (boolean)
    Only returns orders awaiting the user's approval if true.

  - `search` (string)
    Word or phrase to search for.

  - `searchOn` (array)
    Comma-delimited list of fields to search on.

  - `sortBy` (array)
    Comma-delimited list of fields to sort by.

  - `page` (integer)
    Page of results to return. When paginating through many items (> page 30), we recommend the "Last ID" method, as outlined in the Advanced Querying documentation.

  - `pageSize` (integer)
    Number of results to return per page.

  - `filters` (object)
    An object or dictionary representing key/value pairs to apply as filters. Valid keys are top-level properties of the returned model or 'xp.???'

## Response 200 fields (application/json):

  - `Items` (array)

  - `Items.ID` (string)

  - `Items.OrderID` (string)

  - `Items.PaymentIDs` (array)
    IDs of payments associated with this order return.

  - `Items.Status` (string)
    Enum: "Unsubmitted", "AwaitingApproval", "Declined", "Open", "Completed", "Canceled"

  - `Items.DateCreated` (string)

  - `Items.DateSubmitted` (string)
    Will be null until the order return passes from the buyer to the seller, including when Status is PendingApproval.

  - `Items.DateApproved` (string)

  - `Items.DateDeclined` (string)

  - `Items.DateCanceled` (string)

  - `Items.DateCompleted` (string)
    Populated when payment to customer has been completed.

  - `Items.LastUpdated` (string)

  - `Items.RefundAmount` (number)
    Sum of all RefundAmounts for items. This value can be overridden by a user with the OrderAdmin role. To remove the override set the value to null.

  - `Items.Comments` (string)

  - `Items.ItemsToReturn` (array)

  - `Items.ItemsToReturn.LineItemID` (string)

  - `Items.ItemsToReturn.Quantity` (integer)

  - `Items.ItemsToReturn.RefundAmount` (number)

  - `Items.ItemsToReturn.Comments` (string)

  - `Items.xp` (object)

  - `Meta` (object)

  - `Meta.Page` (integer)

  - `Meta.PageSize` (integer)

  - `Meta.TotalCount` (integer)

  - `Meta.TotalPages` (integer)

  - `Meta.ItemRange` (array)

  - `Meta.NextPageKey` (string)

## Response 4XX:

  - `4XX` (unknown)
    Expected errors range from 400-409. Anything in the 5XX range indicates a server issue and should be reported to support.

## Response 4XX fields (application/json):

  - `StatusCode` (integer)
    Example: 404

  - `ErrorCode` (string)
    Example: NotFoundError

  - `Message` (string)
    Example: Object not found

  - `Data` (object)
    Example: {"ObjectType":"","ObjectID":""}

