Filter Orders by Specific Distribution Center


When to Use

  • To filter to display a limited set of orders that come from a specific Distribution Center.

  • 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 the Marketplace-Specific Order Responses for more information when building out an integration.

Specific Goal

Retrieve orders where the product in the order should be sourced from Distribution Center ID 3.

Resource URL / Endpoint

GET https://api.channeladvisor.com/v1/Orders?$filter=Fulfillments/Any (c: c/DistributionCenterID eq DCID)

Important and/or Required Parameters

PropertyRequiredNote
$filter=Fulfillments/Any (c: c/DistributionCenterID eq DCID)RequiredRequired to achieve goal. Include in URL. Fulfillments/Any Defines the collection where we'll source data to filter from, (c: c/ is the syntax for locating properties in the collection defined, and DistributionCenterID eq DCID (where DCID is replaced with the ID of the distribution center - read more about retrieving this data under Retrieving Distribution Center Information page), defines the field within the collection, an operator (equal to) for comparison to the integer representing the Distribution Center ID.
Value for comparison must match the format of the property - in this case Integer. 
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=Fulfillments/Any (c: c/DistributionCenterID eq 3)
Example Response (Success)
200 OK
{
  "@odata.context": "https://api.channeladvisor.com/v1/$metadata#Orders",
  "value": [
    {
      "ID": 20098495,
      "ProfileID": 12345678,
      "SiteID": 640,
      "SiteName": "Amazon Seller Central - US",
      "SiteOrderID": "528-3355089-0840767",
      "SecondarySiteOrderID": null,
      "SellerOrderID": null,
      "CheckoutSourceID": 1,
      "CreatedDateUtc": "2017-02-01T22:33:07.8366667Z",
      "ImportDateUtc": "2017-02-01T22:33:23.173Z",
      "PublicNotes": null,
      "PrivateNotes": "",
      "SpecialInstructions": "",
      "TotalPrice": 2,
      "TotalTaxPrice": 0,
      "TotalShippingPrice": 1,
      "TotalShippingTaxPrice": null,
      "TotalInsurancePrice": 0,
      "TotalGiftOptionPrice": 0,
      "TotalGiftOptionTaxPrice": null,
      "AdditionalCostOrDiscount": 0,
      "EstimatedShipDateUtc": null,
      "DeliverByDateUtc": null,
      "ResellerID": null,
      "FlagID": 0,
      "FlagDescription": null,
      "OrderTags": "TestOrder",
      "DistributionCenterTypeRollup": "SellerManaged",
      "CheckoutStatus": "Completed",
      "PaymentStatus": "Cleared",
      "ShippingStatus": "Shipped",
      "CheckoutDateUtc": "2017-02-01T22:33:07.8366667Z",
      "PaymentDateUtc": "2017-02-01T22:33:07.8366667Z",
      "ShippingDateUtc": "2017-02-10T20:44:00.2333333Z",
      "BuyerUserId": "yvtpu641uj1milp59259@marketplace.amazon.com",
      "BuyerEmailAddress": "yvtpu641uj1milp59259@marketplace.amazon.com",
      "BuyerEmailOptIn": false,
      "OrderTaxType": "Standard",
      "ShippingTaxType": "Standard",
      "GiftOptionsTaxType": "Standard",
      "PaymentMethod": "Amazon",
      "PaymentTransactionID": null,
      "PaymentPaypalAccountID": null,
      "PaymentCreditCardLast4": "",
      "PaymentMerchantReferenceNumber": null,
      "ShippingTitle": null,
      "ShippingFirstName": "John",
      "ShippingLastName": "Doe",
      "ShippingSuffix": null,
      "ShippingCompanyName": "",
      "ShippingCompanyJobTitle": null,
      "ShippingDaytimePhone": "1234567890",
      "ShippingEveningPhone": null,
      "ShippingAddressLine1": "3025 Carrington Mill Blvd",
      "ShippingAddressLine2": "#500",
      "ShippingCity": "Morrisville",
      "ShippingStateOrProvince": "NC",
      "ShippingPostalCode": "27560",
      "ShippingCountry": "US",
      "BillingTitle": null,
      "BillingFirstName": "John",
      "BillingLastName": "Doe",
      "BillingSuffix": "",
      "BillingCompanyName": "",
      "BillingCompanyJobTitle": null,
      "BillingDaytimePhone": "1234567890",
      "BillingEveningPhone": null,
      "BillingAddressLine1": "3025 Carrington Mill Blvd",
      "BillingAddressLine2": "#500",
      "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=Fulfillments%2FAny%20%28c%3A%20c%2FDistributionCenterID%20eq%20149%29&$skip=20"
}