Filter by Multiple Order Level Properties


When to Use

  • To locate specific groups of products by Order Level properties.

    • To filter by Item Level properties, a different endpoint may be required.
  • Note: The more parameters used in a request, the longer the response takes to generate.

  • See more on all the options for filtering, querying, expanding data under the Getting and Filtering Data page.

  • For marketplace specific response data to use as reference, see othe ur Marketplace-Specific Order Responses for more information when building out an integration.

Specific Goal

Retrieve base data for orders created on or after a specific date (assuming the start time is 12:00:00am UTC) and have a TotalPrice (on the entire order) less than or equal to 15.00.

  • If providing a time with the date, request value must be provided accurately (24 hour UTC time, ending with "Z"), or the request will fail
    • 2016-03-02T14:59:59Z
  • If no time is provided within the date, it is assumed as 12:00.00 AM UTC.

Resource URL / Endpoint

GET https://api.channeladvisor.com/v1/Orders?$filter=CreatedDateUtc gt YYYY-MM-dd and TotalPrice le 00.00
GET https://api.channeladvisor.com/v1/Orders?$filter=Profile ID eq ProfileID and CreatedDateUtc gt YYYY-MM-dd and TotalPrice le 00.00

Important and/or Required Parameters

PropertyRequiredNote
ProfileIDConditionallyInclude in URL. Required if need to only retrieve orders from a single profile when authorized for multiple profiles.
The ChannelAdvisor generated unique identifier for the Profile.
Replace value with numeric integer representing the ID.
$filter=CreateDateUtc gt YYYY-MM-ddRequiredRequired to achieve goal. Include in URL. Defines the property to filter on, an operator (greater than) for comparison to a static value.
Value for comparison must match the format of the property - in this case UTC Date/Time. 
andRequiredRequired to achieve goal. Include in URL. Allows for an additional filter to be applied.
TotalPrice le 00.00RequiredRequired to achieve goal. Include in URL. Defines an additional property to filter on, an operator (less than or equal to) for comparison to a static value.
Value for comparison must match the format of the property - in this case decimal. 
Other important/required parameters vary widely based on goals. Use Order Entities page to help guide what properties are available for filtering.
Example Request
GET https://api.channeladvisor.com/v1/Orders?access_token=xxxxxxxxxx&$filter=CreatedDateUtc gt 2016-06-27 and Total Price le 15.00
Example Response (Success)
200 OK
{
  "@odata.context": "https://api.channeladvisor.com/v1/$metadata#Orders",
  "value": [
    {
      "ID": 20003465,
      "ProfileID": 12015201,
      "SiteID": 587,
      "SiteName": "Walmart Marketplace",
      "SiteOrderID": "4575852273344",
      "SecondarySiteOrderID": "4681620065565",
      "SellerOrderID": null,
      "CheckoutSourceID": null,
      "CreatedDateUtc": "2016-07-18T19:37:45.223Z",
      "ImportDateUtc": "2016-07-18T19:37:45.4Z",
      "PublicNotes": null,
      "PrivateNotes": "",
      "SpecialInstructions": "",
      "TotalPrice": 12.46,
      "TotalTaxPrice": 0.51,
      "TotalShippingPrice": 6.95,
      "TotalShippingTaxPrice": null,
      "TotalInsurancePrice": 0,
      "TotalGiftOptionPrice": 0,
      "TotalGiftOptionTaxPrice": null,
      "AdditionalCostOrDiscount": 0,
      "EstimatedShipDateUtc": "2016-07-29T06:00:00Z",
      "DeliverByDateUtc": null,
      "ResellerID": null,
      "FlagID": 0,
      "FlagDescription": null,
      "OrderTags": null,
      "DistributionCenterTypeRollup": "SellerManaged",
      "CheckoutStatus": "Completed",
      "PaymentStatus": "Cleared",
      "ShippingStatus": "Unshipped",
      "CheckoutDateUtc": "2016-07-18T19:37:45.223Z",
      "PaymentDateUtc": "2016-07-18T19:37:45.223Z",
      "ShippingDateUtc": null,
      "BuyerUserId": "real.email@example.com",
      "BuyerEmailAddress": "real.email@example.com",
      "BuyerEmailOptIn": false,
      "OrderTaxType": "Standard",
      "ShippingTaxType": "Standard",
      "GiftOptionsTaxType": "Standard",
      "PaymentMethod": "Walmart",
      "PaymentTransactionID": null,
      "PaymentPaypalAccountID": null,
      "PaymentCreditCardLast4": "",
      "PaymentMerchantReferenceNumber": null,
      "ShippingTitle": null,
      "ShippingFirstName": "Brent",
      "ShippingLastName": "Kepler",
      "ShippingSuffix": null,
      "ShippingCompanyName": null,
      "ShippingCompanyJobTitle": null,
      "ShippingDaytimePhone": "1234567890",
      "ShippingEveningPhone": null,
      "ShippingAddressLine1": "424 W Dade 102",
      "ShippingAddressLine2": "",
      "ShippingCity": "Morrisville",
      "ShippingStateOrProvince": "NC",
      "ShippingPostalCode": "27560",
      "ShippingCountry": "US",
      "BillingTitle": null,
      "BillingFirstName": "Brent",
      "BillingLastName": "Kepler",
      "BillingSuffix": "",
      "BillingCompanyName": "",
      "BillingCompanyJobTitle": null,
      "BillingDaytimePhone": "1234567890",
      "BillingEveningPhone": null,
      "BillingAddressLine1": "424 W Dade 102",
      "BillingAddressLine2": "",
      "BillingCity": "Morrisville",
      "BillingStateOrProvince": "NC",
      "BillingPostalCode": "27560",
      "BillingCountry": "US",
      "PromotionCode": null,
      "PromotionAmount": 0
    },
    {
		// Next Product Data
	}
],
  "@odata.nextLink": "https://api.channeladvisor.com/v1/Orders?access_token=xxxxxxxxxx&$filter=CreatedDateUtc%20gt%202016-06-27%20and%20TotalPrice%20le%2015.00&$skip=20"
}