OrdersFindAll Endpoint

Overview

This endpoint allows you to find all of the orders that are in your store, including abandoned carts.  This allows you to list them and parse them for any number of reasons or purposes.

Requirements

The following pre-requisites will be necessary to accomplish the goals of this article:

  • General understanding of REST and API’s
  • Understanding of C# and/or JavaScript
  • Visual Studio 2012 or newer

Getting Started

You should already have a project open and ready to accept code to allow you to use this REST API endpoint.  You should also have one or more orders created so that you can successfully find them.

OrdersFindAll

This REST API endpoint allows you to find all of the orders in your store. 

Example URL

This is what the REST endpoint will look like if you are calling it using JavaScript.  See our REST API URL documentation for more information.

http://example.com/DesktopModules/Hotcakes/API/rest/v1/orders

HTTP Method

GET

Parameters

There are no parameters for this endpoint.

Returns

If successful, this endpoint will return a populated list of the OrderSnapshotDTO object in JSON format.  Otherwise, you should have one or more errors returned.  

Example Code

The following code will allow you to successfully call this endpoint, provided that you have enabled it.

Project References

  • Hotcakes.CommerceDTO

Import Namespaces

  • Hotcakes.CommerceDTO.v1
  • Hotcakes.CommerceDTO.v1.Client
  • Hotcakes.CommerceDTO.v1.Orders

 

string url = "http://example.com";
string key = "YOUR-API-KEY";

Api proxy = new Api(url, key);

// call the API to find all orders in the store
ApiResponse<List<OrderSnapshotDTO>> response = proxy.OrdersFindAll();
// your domain name
var url = "http://example.com"; 
// the path where the API is
var apiPath = "/DesktopModules/Hotcakes/API/rest/v1/";  
// endpoint as shown in the documentation
var endPoint = "orders";  
// get this from the store admin
var apiKey = "YOUR-API-KEY";

$(document).ready(function() {

    // call the API to find all orders in the store
    $.ajax({
        dataType: "json",
        url: url + apiPath + endPoint + "?key=" + apiKey,
        type: 'GET',
        success: function (data) {
            // do something
        },
        error: function (jqXHR, textStatus) {
           // do something else
        }
    });

});
{
   "Errors":[

   ],
   "Content":[
      {
         "Id":1,
         "bvin":"4140928c-e2c8-4f2f-bb65-167fc912adcc",
         "StoreId":1,
         "LastUpdatedUtc":"/Date(1406628188953)/",
         "TimeOfOrderUtc":"/Date(1406628187407)/",
         "OrderNumber":"1",
         "ThirdPartyOrderId":"",
         "UserEmail":"host@change.me",
         "UserID":"1",
         "CustomProperties":[
            {
               "DeveloperId":"hcc",
               "Key":"ApplyVATRules",
               "Value":"False"
            }
         ],
         "PaymentStatus":3,
         "ShippingStatus":1,
         "IsPlaced":true,
         "StatusCode":"F37EC405-1EC6-4a91-9AC4-6836215FBBBC",
         "StatusName":"Received",
         "BillingAddress":{
            "Bvin":null,
            "LastUpdatedUtc":"/Date(1398100982630)/",
            "StoreId":0,
            "NickName":"",
            "FirstName":"Ursa",
            "MiddleInitial":"",
            "LastName":"Morgan",
            "Company":"Wilkinson Walls Trading",
            "Line1":"0718 Kvfjkpxfc Ohaoja Street",
            "Line2":"9892 Wjeicticu Wgxhtu Street",
            "Line3":"",
            "City":"San Carlos",
            "RegionName":"California",
            "RegionBvin":"CA",
            "PostalCode":"94070",
            "CountryName":"United States",
            "CountryBvin":"bf7389a2-9b21-4d33-b276-23c9c18ea0c0",
            "Phone":"+614-19-8078020",
            "Fax":"",
            "WebSiteUrl":"",
            "UserBvin":"",
            "AddressType":0
         },
         "ShippingAddress":{
            "Bvin":null,
            "LastUpdatedUtc":"/Date(1398100982630)/",
            "StoreId":0,
            "NickName":"",
            "FirstName":"Ursa",
            "MiddleInitial":"",
            "LastName":"Morgan",
            "Company":"Wilkinson Walls Trading",
            "Line1":"0718 Kvfjkpxfc Ohaoja Street",
            "Line2":"9892 Wjeicticu Wgxhtu Street",
            "Line3":"",
            "City":"San Carlos",
            "RegionName":"California",
            "RegionBvin":"CA",
            "PostalCode":"94070",
            "CountryName":"United States",
            "CountryBvin":"bf7389a2-9b21-4d33-b276-23c9c18ea0c0",
            "Phone":"+614-19-8078020",
            "Fax":"",
            "WebSiteUrl":"",
            "UserBvin":"",
            "AddressType":0
         },
         "ItemsTax":0,
         "ShippingTax":0,
         "TotalTax":0,
         "TotalOrderBeforeDiscounts":1299,
         "TotalShippingBeforeDiscounts":0,
         "TotalShippingDiscounts":0,
         "TotalOrderDiscounts":0,
         "TotalHandling":0,
         "TotalGrand":1299,
         "AffiliateID":null,
         "FraudScore":0,
         "Instructions":"Aut voluptatem. Voluptatem, at quis rerum eius in dolorem voluptas molestias magni voluptatem, aspernatur magna quibusdam fugiat, consequuntur quos dicta.",
         "ShippingMethodId":"UNKNOWN",
         "ShippingMethodDisplayName":"To Be Determined. Contact Store for Details",
         "ShippingProviderId":"",
         "ShippingProviderServiceCode":""
      },
      {
         "Id":2,
         "bvin":"0918ef42-c234-42bb-88e7-59b335f4ea2b",
         "StoreId":1,
         "LastUpdatedUtc":"/Date(1403158774580)/",
         "TimeOfOrderUtc":"/Date(1403158774580)/",
         "OrderNumber":"",
         "ThirdPartyOrderId":"",
         "UserEmail":"",
         "UserID":"",
         "CustomProperties":[
            {
               "DeveloperId":"hcc",
               "Key":"ApplyVATRules",
               "Value":"False"
            }
         ],
         "PaymentStatus":0,
         "ShippingStatus":0,
         "IsPlaced":false,
         "StatusCode":"",
         "StatusName":"",
         "BillingAddress":{
            "Bvin":null,
            "LastUpdatedUtc":"/Date(1403133574580)/",
            "StoreId":0,
            "NickName":"",
            "FirstName":"",
            "MiddleInitial":"",
            "LastName":"",
            "Company":"",
            "Line1":"",
            "Line2":"",
            "Line3":"",
            "City":"",
            "RegionName":"",
            "RegionBvin":"",
            "PostalCode":"",
            "CountryName":"United States",
            "CountryBvin":"bf7389a2-9b21-4d33-b276-23c9c18ea0c0",
            "Phone":"",
            "Fax":"",
            "WebSiteUrl":"",
            "UserBvin":"",
            "AddressType":0
         },
         "ShippingAddress":{
            "Bvin":null,
            "LastUpdatedUtc":"/Date(1403133574580)/",
            "StoreId":0,
            "NickName":"",
            "FirstName":"",
            "MiddleInitial":"",
            "LastName":"",
            "Company":"",
            "Line1":"",
            "Line2":"",
            "Line3":"",
            "City":"",
            "RegionName":"",
            "RegionBvin":"",
            "PostalCode":"",
            "CountryName":"United States",
            "CountryBvin":"bf7389a2-9b21-4d33-b276-23c9c18ea0c0",
            "Phone":"",
            "Fax":"",
            "WebSiteUrl":"",
            "UserBvin":"",
            "AddressType":0
         },
         "ItemsTax":0,
         "ShippingTax":0,
         "TotalTax":0,
         "TotalOrderBeforeDiscounts":0,
         "TotalShippingBeforeDiscounts":0,
         "TotalShippingDiscounts":0,
         "TotalOrderDiscounts":0,
         "TotalHandling":0,
         "TotalGrand":0,
         "AffiliateID":null,
         "FraudScore":-1,
         "Instructions":"",
         "ShippingMethodId":"",
         "ShippingMethodDisplayName":"",
         "ShippingProviderId":"",
         "ShippingProviderServiceCode":""
      },
      {
         "Id":3,
         "bvin":"ebd6aebb-98e6-489e-b672-820fe3cbe616",
         "StoreId":1,
         "LastUpdatedUtc":"/Date(1406677165403)/",
         "TimeOfOrderUtc":"/Date(1406677164743)/",
         "OrderNumber":"2",
         "ThirdPartyOrderId":"",
         "UserEmail":"host@change.me",
         "UserID":"1",
         "CustomProperties":[
            {
               "DeveloperId":"hcc",
               "Key":"ApplyVATRules",
               "Value":"False"
            }
         ],
         "PaymentStatus":3,
         "ShippingStatus":1,
         "IsPlaced":true,
         "StatusCode":"F37EC405-1EC6-4a91-9AC4-6836215FBBBC",
         "StatusName":"Received",
         "BillingAddress":{
            "Bvin":null,
            "LastUpdatedUtc":"/Date(1406602989719)/",
            "StoreId":0,
            "NickName":"",
            "FirstName":"Lara",
            "MiddleInitial":"",
            "LastName":"Ruiz",
            "Company":"Walters Wiggins Co",
            "Line1":"6372 Tshabxfvj Erntil Street",
            "Line2":"3604 Eodfsvoiv Qndlqa Street",
            "Line3":"",
            "City":"San Carlos",
            "RegionName":"California",
            "RegionBvin":"CA",
            "PostalCode":"94070",
            "CountryName":"United States",
            "CountryBvin":"bf7389a2-9b21-4d33-b276-23c9c18ea0c0",
            "Phone":"+614-19-8078020",
            "Fax":"",
            "WebSiteUrl":"",
            "UserBvin":"",
            "AddressType":0
         },
         "ShippingAddress":{
            "Bvin":null,
            "LastUpdatedUtc":"/Date(1406602989719)/",
            "StoreId":0,
            "NickName":"",
            "FirstName":"Lara",
            "MiddleInitial":"",
            "LastName":"Ruiz",
            "Company":"Walters Wiggins Co",
            "Line1":"6372 Tshabxfvj Erntil Street",
            "Line2":"3604 Eodfsvoiv Qndlqa Street",
            "Line3":"",
            "City":"San Carlos",
            "RegionName":"California",
            "RegionBvin":"CA",
            "PostalCode":"94070",
            "CountryName":"United States",
            "CountryBvin":"bf7389a2-9b21-4d33-b276-23c9c18ea0c0",
            "Phone":"+614-19-8078020",
            "Fax":"",
            "WebSiteUrl":"",
            "UserBvin":"",
            "AddressType":0
         },
         "ItemsTax":0,
         "ShippingTax":0,
         "TotalTax":0,
         "TotalOrderBeforeDiscounts":79.9,
         "TotalShippingBeforeDiscounts":0,
         "TotalShippingDiscounts":0,
         "TotalOrderDiscounts":0,
         "TotalHandling":0,
         "TotalGrand":79.9,
         "AffiliateID":null,
         "FraudScore":0,
         "Instructions":"Nam reiciendis fugiat, in ut qui ut necessitatibus lorem odit porro facere consequatur ad repudiandae laborum.",
         "ShippingMethodId":"UNKNOWN",
         "ShippingMethodDisplayName":"To Be Determined. Contact Store for Details",
         "ShippingProviderId":"",
         "ShippingProviderServiceCode":""
      },
      {
         "Id":4,
         "bvin":"ddea7421-501d-44ce-b94f-48e10b8baff5",
         "StoreId":1,
         "LastUpdatedUtc":"/Date(1406683911700)/",
         "TimeOfOrderUtc":"/Date(1406677252240)/",
         "OrderNumber":"3",
         "ThirdPartyOrderId":"",
         "UserEmail":"host@change.me",
         "UserID":"1",
         "CustomProperties":[
            {
               "DeveloperId":"hcc",
               "Key":"ApplyVATRules",
               "Value":"False"
            }
         ],
         "PaymentStatus":3,
         "ShippingStatus":3,
         "IsPlaced":true,
         "StatusCode":"09D7305D-BD95-48d2-A025-16ADC827582A",
         "StatusName":"Complete",
         "BillingAddress":{
            "Bvin":null,
            "LastUpdatedUtc":"/Date(1406651965814)/",
            "StoreId":0,
            "NickName":"",
            "FirstName":"Aurora",
            "MiddleInitial":"",
            "LastName":"Castro",
            "Company":"Berry and Conway Associates",
            "Line1":"6089 Dwdjxcxvv Rbdjat Street",
            "Line2":"6987 Gcnnkpnad Rdqgvr Street",
            "Line3":"",
            "City":"San Carlos",
            "RegionName":"California",
            "RegionBvin":"CA",
            "PostalCode":"94070",
            "CountryName":"United States",
            "CountryBvin":"bf7389a2-9b21-4d33-b276-23c9c18ea0c0",
            "Phone":"+614-19-8078020",
            "Fax":"",
            "WebSiteUrl":"",
            "UserBvin":"",
            "AddressType":0
         },
         "ShippingAddress":{
            "Bvin":null,
            "LastUpdatedUtc":"/Date(1406651965814)/",
            "StoreId":0,
            "NickName":"",
            "FirstName":"Aurora",
            "MiddleInitial":"",
            "LastName":"Castro",
            "Company":"Berry and Conway Associates",
            "Line1":"6089 Dwdjxcxvv Rbdjat Street",
            "Line2":"6987 Gcnnkpnad Rdqgvr Street",
            "Line3":"",
            "City":"San Carlos",
            "RegionName":"California",
            "RegionBvin":"CA",
            "PostalCode":"94070",
            "CountryName":"United States",
            "CountryBvin":"bf7389a2-9b21-4d33-b276-23c9c18ea0c0",
            "Phone":"+614-19-8078020",
            "Fax":"",
            "WebSiteUrl":"",
            "UserBvin":"",
            "AddressType":0
         },
         "ItemsTax":0,
         "ShippingTax":0,
         "TotalTax":0,
         "TotalOrderBeforeDiscounts":72.9,
         "TotalShippingBeforeDiscounts":0,
         "TotalShippingDiscounts":0,
         "TotalOrderDiscounts":-7.29,
         "TotalHandling":0,
         "TotalGrand":65.61,
         "AffiliateID":null,
         "FraudScore":0,
         "Instructions":"Architecto ut voluptate occaecat illum, voluptatem beatae mollit voluptas rerum ex facere cum sint, commodo quis qui non quia nulla.",
         "ShippingMethodId":"UNKNOWN",
         "ShippingMethodDisplayName":"To Be Determined. Contact Store for Details",
         "ShippingProviderId":"",
         "ShippingProviderServiceCode":""
      },
      {
         "Id":5,
         "bvin":"1e5776ff-fd59-4a02-ba2f-7f699244d3b3",
         "StoreId":1,
         "LastUpdatedUtc":"/Date(1406684430777)/",
         "TimeOfOrderUtc":"/Date(1406684430340)/",
         "OrderNumber":"4",
         "ThirdPartyOrderId":"",
         "UserEmail":"host@change.me",
         "UserID":"1",
         "CustomProperties":[
            {
               "DeveloperId":"hcc",
               "Key":"ApplyVATRules",
               "Value":"False"
            }
         ],
         "PaymentStatus":3,
         "ShippingStatus":1,
         "IsPlaced":true,
         "StatusCode":"F37EC405-1EC6-4a91-9AC4-6836215FBBBC",
         "StatusName":"Received",
         "BillingAddress":{
            "Bvin":null,
            "LastUpdatedUtc":"/Date(1406652053029)/",
            "StoreId":0,
            "NickName":"",
            "FirstName":"Helen",
            "MiddleInitial":"",
            "LastName":"Romero",
            "Company":"Carpenter and Bradley LLC",
            "Line1":"155 Bovet Road",
            "Line2":"",
            "Line3":"",
            "City":"San Mateo",
            "RegionName":"California",
            "RegionBvin":"CA",
            "PostalCode":"94402",
            "CountryName":"United States",
            "CountryBvin":"bf7389a2-9b21-4d33-b276-23c9c18ea0c0",
            "Phone":"+844-78-5044423",
            "Fax":"",
            "WebSiteUrl":"",
            "UserBvin":"",
            "AddressType":0
         },
         "ShippingAddress":{
            "Bvin":null,
            "LastUpdatedUtc":"/Date(1406652053029)/",
            "StoreId":0,
            "NickName":"",
            "FirstName":"Helen",
            "MiddleInitial":"",
            "LastName":"Romero",
            "Company":"Carpenter and Bradley LLC",
            "Line1":"155 Bovet Road",
            "Line2":"",
            "Line3":"",
            "City":"San Mateo",
            "RegionName":"California",
            "RegionBvin":"CA",
            "PostalCode":"94402",
            "CountryName":"United States",
            "CountryBvin":"bf7389a2-9b21-4d33-b276-23c9c18ea0c0",
            "Phone":"+844-78-5044423",
            "Fax":"",
            "WebSiteUrl":"",
            "UserBvin":"",
            "AddressType":0
         },
         "ItemsTax":0,
         "ShippingTax":0,
         "TotalTax":0,
         "TotalOrderBeforeDiscounts":72.9,
         "TotalShippingBeforeDiscounts":0,
         "TotalShippingDiscounts":0,
         "TotalOrderDiscounts":0,
         "TotalHandling":0,
         "TotalGrand":72.9,
         "AffiliateID":null,
         "FraudScore":0,
         "Instructions":"Expedita quis officia fugit, fuga. Velit veritatis modi ex et reiciendis sed accusantium.",
         "ShippingMethodId":"UNKNOWN",
         "ShippingMethodDisplayName":"To Be Determined. Contact Store for Details",
         "ShippingProviderId":"",
         "ShippingProviderServiceCode":""
      },
      {
         "Id":6,
         "bvin":"c0ee144f-045e-4928-8258-7ac7c7e84030",
         "StoreId":1,
         "LastUpdatedUtc":"/Date(1406684431187)/",
         "TimeOfOrderUtc":"/Date(1406684431187)/",
         "OrderNumber":"",
         "ThirdPartyOrderId":"",
         "UserEmail":"",
         "UserID":"",
         "CustomProperties":[
            {
               "DeveloperId":"hcc",
               "Key":"ApplyVATRules",
               "Value":"False"
            }
         ],
         "PaymentStatus":0,
         "ShippingStatus":0,
         "IsPlaced":false,
         "StatusCode":"",
         "StatusName":"",
         "BillingAddress":{
            "Bvin":null,
            "LastUpdatedUtc":"/Date(1406659231184)/",
            "StoreId":0,
            "NickName":"",
            "FirstName":"",
            "MiddleInitial":"",
            "LastName":"",
            "Company":"",
            "Line1":"",
            "Line2":"",
            "Line3":"",
            "City":"",
            "RegionName":"",
            "RegionBvin":"",
            "PostalCode":"",
            "CountryName":"United States",
            "CountryBvin":"bf7389a2-9b21-4d33-b276-23c9c18ea0c0",
            "Phone":"",
            "Fax":"",
            "WebSiteUrl":"",
            "UserBvin":"",
            "AddressType":0
         },
         "ShippingAddress":{
            "Bvin":null,
            "LastUpdatedUtc":"/Date(1406659231184)/",
            "StoreId":0,
            "NickName":"",
            "FirstName":"",
            "MiddleInitial":"",
            "LastName":"",
            "Company":"",
            "Line1":"",
            "Line2":"",
            "Line3":"",
            "City":"",
            "RegionName":"",
            "RegionBvin":"",
            "PostalCode":"",
            "CountryName":"United States",
            "CountryBvin":"bf7389a2-9b21-4d33-b276-23c9c18ea0c0",
            "Phone":"",
            "Fax":"",
            "WebSiteUrl":"",
            "UserBvin":"",
            "AddressType":0
         },
         "ItemsTax":0,
         "ShippingTax":0,
         "TotalTax":0,
         "TotalOrderBeforeDiscounts":0,
         "TotalShippingBeforeDiscounts":0,
         "TotalShippingDiscounts":0,
         "TotalOrderDiscounts":0,
         "TotalHandling":0,
         "TotalGrand":0,
         "AffiliateID":null,
         "FraudScore":-1,
         "Instructions":"",
         "ShippingMethodId":"",
         "ShippingMethodDisplayName":"",
         "ShippingProviderId":"",
         "ShippingProviderServiceCode":""
      }
   ]
}
Have more questions? Submit a request

Need More Help?

Do you need more assistance with this article? Please review your support options.