Getting and Filtering Data

The ChannelAdvisor REST API supports the OData 4.0 specification, which is an OASIS standard that supports filtering, sorting, paging, selecting and expanding. The select and expand capabilities allow developers to specify the exact details they want to retrieve as parameters in the request. This both reduces load on ChannelAdvisor servers and decreases JSON payload sizes for more efficient network usage. Use of these features improves performance for downstream systems and ultimately leads to higher customer satisfaction.  


Requests can be filtered by using the $filter keyword.  Filters utilizing a text string value require single quotes around the value, otherwise no single quotes are required.

The following logical operations are supported:

Operation Description Example
and And

Field1 eq 'abc' and Field2 eq 'def'

or Or Field1 eq 'abc' or Field1 eq 'def'
eq Equals

BuyerEmailAddress eq ''

ne Not Equals BuyerEmailAddress ne ''
gt Greater Than CreatedDateUtc gt 2016-03-02
ge Greater Than Or Equal CreatedDateUtc ge 2016-03-02 
lt Less Than Quantity lt 1500
le Less Than Or Equal Quantity le 1500

Additionally, there are several functions that can be used to help filter specific data types.

Function Description Data Type Example
Year Returns the year component (without the fractional part) of a DateTimeOffset Integer year(BirthDate) eq 1971
Month Returns the month component (without the fractional part) of a DateTimeOffset Integer month(BirthDate) eq 5
Day Returns the day component (without the fractional part) of a DateTimeOffset Integer day(BirthDate) eq 8
Hour Returns the hour component (without the fractional part) of a DateTimeOffset Integer hour(BirthDate) eq 4
Minute Returns the minute component (without the fractional part) of a DateTimeOffset Integer minute(BirthDate) eq 40
Second Returns the second component (without the fractional part) of a DateTimeOffset Integer second(BirthDate) eq 40
Floor Rounds the input numeric parameter down to the nearest numeric value with no decimal component Decimal floor(Freight) eq 32
Ceiling Rounds the input numeric parameter up to the nearest numeric value with no decimal component Decimal ceiling(Freight) eq 32


  • String functions such as 'SubstringOf' and 'StartsWith' are currently not supported.
  • When using any of the filters to reference a specific date, but no specific time in a filter, the API assumes the time is 12:00.00am UTC.
    • When sending a request to retrieve Orders with $filter=CreatedDateUtc eq 2015-11-15, the only result would be an order created 2015-11-15 at 12:00.00am UTC.
    • See some examples below in the "Filtering on properties" for filtering between date ranges or after a specific time.
    • To capture all of an item with an Order filter created up to the moment the request is made, try $filter=CreatedDateUtc ge 2015-11-15 (assumes today is November 15, 2015)
  • Case-Sensitivity in URIs:
    • Every property definition before the "?" in a URI is case-sensitive (e.g. attribute name string values)
    • Everything after the "?" in a URI is not case-sensitive (e.g. $filter=property definitions, operators; $select, $orderby, etc)

Selecting Properties

Query Example
Selecting a subset of properties$select=ID, ShippingStatus, CreatedOnDateUtc
Filtering on properties$filter=BuyerEmailAddress eq ''$filter=CreatedDateUtc ge 2016-03-02$filter=PaymentStatus eq 'Cleared'$filter=CreatedDateUtc ge 2016-03-02 and CreatedDateUtc lt 2016-03-03$filter=CreatedDateUtc gt 2016-03-02T14:59:59Z

Sorting by a property$orderby=CreatedOnDateUtc desc

Returning the total count of an endpoint$count
Returning the total count of a filtered endpoint$filter=ProfileID eq 12345678 and CreatedDateUtc gt 2016-05-01&$count=true
Paging through results

Page 1:
Page 2:$skip=20
Page 3:$skip=40
See additional notes below about Paging Through Results.

Expanding child collections$expand=Items
Expanding multiple child collections$expand=Items,Fulfillments
Expanding 2nd level child collections$expand=Fulfillments($expand=Items)

Expanding 2nd level child collections for multiple child collections$expand=Items($expand=Adjustments),Fulfillments($expand=Items)
Selecting properties on child collections$expand=Items($select=Sku, Quantity)

Filtering based on child collection property value$filter=Adjustments/Any(c: c/Reason eq '2')
Filtering based on multiple property values (one at endpoint level and one at child collection level)$filter=Attributes/Any (c: c/Value eq '13M') and Brand eq 'Skechers' and Attributes/Any (c: c/Name eq 'Size') &$expand=Attributes
Retrieve the first 50 products with ID and Sku only$select=ID,Sku&$top=50
Retreive the second 50 products with ID and Sku only
Note: $skip must appear before $top for this to work$select=ID,Sku&$skip=50&$top=50


Read about "Lexical Mapping" on this W3 page for more information on formatting DateTimeOffset.

Proper Format:

Any of the below formats are accurate within the API and will be interpreted correctly within POST/PATCH/PUT requests.
GET requests will allow the below, but do not require the time to execute properly.

  • 2016-10-31T14:08:36.8033257Z
  • 2016-08-19T10:44:15Z
  • 2016-10-31T14:08:36.8033257-04:00
  • 2016-10-31T14:08:36.8033257+12:00
  • 2016-08-19T10:44:15+01:00

Paging Through Results

Each page of results will have a link to the next page embedded in the @odata.nextLink property. The last page will not contain a value for @odata.nextLink, indicating the end of the result set.

It is highly recommended to use the @odata.NextLink URI for paging instead of manually setting a $skip value because maximum page sizes may vary.

For most GET requests, the default response page size is 20, but some endpoints, such as Products, support larger page sizes in order to optimize performance and efficiency.