API Overview

The Storehippo API is organized around REST. Our API has predictable, resource-oriented URLs, and uses message key HTTP response to indicate API success or errors. We use built-in HTTP features, like HTTP authentication  which are understood by off-the-shelf HTTP clients. We support cross-origin resource sharing, allowing you to interact securely with our API from a client-side web application. JSON is returned by all API responses.

How to call


// create a new cURL resource
$ch = curl_init();

// set URL and other appropriate options
curl_setopt($ch, CURLOPT_URL, "http://example.com/api/1/entity/ms.products");
curl_setopt($ch, CURLOPT_HTTPHEADER, array('access-key', 'access-key-name'));
curl_setopt($ch, CURLOPT_HEADER, 0); // do not bring headers
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

// grab URL and pass it to the browser
$output = curl_exec($ch);
$products = json_decode($output);
print_r($products);

$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);


// close cURL resource, and free up system resources
curl_close($ch);
                                        

var request = require('request');
var options = {
    url: "http://example.com/api/1/entity/ms.products",
    headers: {}
}
options.headers['access-key'] = 'access-key-name';

request(options, function (err, response, body) {

    //console.log("Error >>>>> ", err);
    //console.log("Response >>>>> ", response);
    console.log("Body >>>>> ", body);

})
                                    

Authentication

There are two type of accessing StoreHippo API

1. Access Key

Authenticate your account when using the API by including your access-key key in the request header. Your API keys carry many privileges, so be sure to keep them secret!

Read more about access key how to generate and use here

2. OAuth 2

If you want to access API through app, then use OAuth 2 authorization process

Read more about OAuth 2 how to use here

Pagination

All top-level API resources have support for bulk fetches via "list" API methods. For instance you can list products, list customers, and list orders. These list API methods share a common structure, taking at least these three query parameters: limit, start.

Limit
Default Value : 50

Required: No
A limit on the number of records to be returned.
Start
Default Value : 0

Required: No
A limit on the number of records to be skipped before returning.

API Request

StoreHippo Request facilitates communication with remote HTTP servers via the browser's XMLHttpRequest object. XMLHttpRequest (XHR) is an API in the form of an object whose methods transfer data between a web browser and a web server.

Configs

data : {Object} Object containing data you want to send with the request.
headers : {Object} Can be used to define the headers to use with the request. 'access-key' and 'backend' can be passed through the request headers.
query : {Object} Define extra options to be defined to get the desired response only. 'filters', 'start', 'limit', 'sort' can be passed to the query object.

API Response

Storehippo uses conventional HTTP response codes to indicate the success or failure of an API request. In general, codes in the 2xx range indicate success, codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted, a validation failed, etc.), and codes in the 5xx range indicate an error with Storehippo's servers (these are rare).

Success API Response

messages It contain the list of messages for API. And message have the key and level.
data It contains the response body.
paging Paging is returned with list API. It contains the paging detail like start, limit, count, total etc

Error API Response

error It contain error message. Error message have the key and level.
data It contains the error response data.

Checkouts
(ms.abundant_cart)

A checkout is considered abandoned when a customer has entered their billing & shipping info, but has yet to complete the purchase.

Fields

_id The unique numeric identifier for the cart. This one is used for API purposes. 

{ "_id" : "54b8bbf73e2dfb0a0b640c5e" }

Read Only
available_options It contains the list of available order options defined in store.
It is instance of ms.order_options.

Read Only 
available_payment_methods This will contain the list of available payment method for the cart .
Will be available on front end as well as in backend scope.
Will not be send to database.
They are instance of ms.payment_methods.

Read Only 
additional_charges It is an array of object containing details of aditional charges .

{
     "name":" Offline payment Changes",
     "type":"payment_charges",
     "price" :"50"
}


Read Only
available_shipping_methods This will contain the list of available shipping method for the cart .
Will be available on front end as well as in backend scope.
Will not be send to database.

Read Only 
billing_address { "full_name" : "null" }
{ "address" : " " }
{ "city" : "Delhi" }
{ "state" : "Delhi" }
{ "country" : "IN" }
{ "zip" : "110001" }
{ "phone" : "555-625-1199" }

The billing address associated with the payment method. This address is an optional field that will not be available on orders that do not require one. It has the following properties:

full_name: The full name of the person associated with the payment method.
address: The street address of the billing address.
city: The city of the billing address.
state: The state of the billing address.
country: The name of the country of the billing address.
zip :The zip or postal code of the billing address.
phone: The phone number at the billing address.
client_details

This  object contain the detail of client system .

These details is gathered for navigator object of javascript.

 {
         platform:"Win", 
         browser:'Chrome'

Read Only

coupon_code This contain the code applied by user in order to avial some sort of discount.

{
    "coupon_code":"HIPPO"
}
currency It is object containing name and conversion_rate of currency

{name:'USD',conversion_rate:'0.14'}

Deprecated 
Read only
 
currency_code This contain  the ISO-3 Currecny code of cart

currency_code:'USD'

Read Only
 
currency_rate This contain  the conversion rate of the currency of the  currency code 

currency_rate:'0.14'

Read Only
 
discounts It is an array of object containing details of cart level discounts.

{
        "_id":"53b256e9b3af14aa15e451a5",
        "saving_amount":50,
        "coupon_code":"HIPPO"
}

Read Only
discount_total It is the total value of cart level discount.
It has numeric value

Read Only
ecoupon This object contain the coupon code and discount associated with it.

{
       "code":"HIPPO",
       "discount":{
                               // Complete discount object.
        }
}

Deprecated
Read Only
email_id This field contain email id of customer.


{ "email_id" : "trials@storehippo.com" }
gift_cards This field is array of object ,will be used for gift cards.

Will be used in future.
gift_card_total This field will contain the total value of applied gift cards.

Will be used in future.
 
items {
     "_id":"53b256e9b3af14aa15e451a5",               // The unique numeric identifier for the cart item
    "name":"product1" ,                                               // Normalized name of product.
    "product_id" :"53ad1eabbf5aae5a71b2f795"  ,                                        // The unique numeric identifier for the product
    "selected_options":{
                "color" : "red",
                "size" : "M"                                                // Addtional imformation regarding cart item.
    },
    " variant_id":"size|M" ,                                            //Variant_id of the selected variant
    "product":{
                                                // Unaltered Product object
     },
     "price":500,                                                         //Cost after discount per unit
     "discounts_total":  10,                                         //Total amount deducted from  single unit of item.
     "discounts_percentage":2 ,                                 //Total percentage of amount deducted for single unit of item.
     "taxes":[
              {
    
              }
     ],
     "taxes_total":10,
     "total":500,
     "quantity":1,
     "sub_total": 500   //Deprecated
     "thumbnail_url" : "/ms.option_set/55b9cecdbe8d1cd811246e0f/options/undefined/55b9ce83be8d1cd811246e0e/55b9ce83be8d1cd811246e0e-150x150.jpg",
   "image_url" : "/ms.option_set/55b9cecdbe8d1cd811246e0f/options/undefined/55b9ce83be8d1cd811246e0e/55b9ce83be8d1cd811246e0e-1024x1024.jpg
 }
item_count This field contain the total  number of items in cart.

Read Only
language This field has the current language of website if store support  multiple languages.

Read Only
metafields This field is an object and contain the additional information inserted programatticaly .

Read Only 
 
options This field is an object and contain addtional information inserted by user , limited by store owner.

Ex. delivery slot , delivery date etc. 
shipping_address { "full_name" : "null" }
{ "address" : " " }
{ "city" : "Delhi" }
{ "state" : "Delhi" }
{ "country" : "IN" }
{ "zip" : "110001" }
{ "phone" : "555-625-1199" }

The shipping address is a required field. It has the following properties:

full_name: The full name of the person associated with the payment method.
address: The street address of the billing address.
city: The city of the billing address.
state: The state of the billing address.
country: The name of the country of the billing address.
zip :The zip or postal code of the billing address.
phone: The phone number at the billing address.
sub_total This field contain total sumation of all item's  total present in cart.

Read Only
shipping_total This field contain the total shipping charges applied on cart

Read Only
shipping_method This field is an object contain the inforamtion of shipping method used for placing order on the cart.
{
      "_id":"55c1aa7f84067eb46c91d86c",
      "name":"Standard Shipping",
      "price":50
}

User can change the shipping method but not  this object.
payment_method This field is an object contain the inforamtion of payment method used for placing order on the cart.

{
      "_id":"55c1aa7f84067eb46c91d86c",
      "name":"Cash On Delivery",
      "type" :"cash_on_delivery",
      "settings":{
                     validate:true,
                     check_avialablity:false
       },
       additional_charges:50
}


User can change the payment method but not  this object.
total This field contain total amount payable for placing order on the cart. 

Read Only
taxes_total This field contain the total tax amount charged on cart.

Read Only
total_weight This field carry summation of weight of all items in cart.

Read Only

Related Resources

ms.order_options
It contains the list of  order options defined in store.

Read Only 
 

For detail description follow given link click here
ms.payment_methods
This contains the list of payment methods.

Read Only 

For detail description follow given link click here
ms.shipping_methods
This contains the list of shipping methods.

Read Only 

For detail description follow given link click here
ms.users
This contains the list of  users.

Read Only 

For detail description follow given link click here
Get single abandoned checkout details GET /entity/ms.checkouts/{#_id}

Example

Get single abandoned checkout details
GET /entity/ms.checkouts/53ad1eabbf5aae5a71b2f795

Example Response Json

{
  "data": {
    "_id": "55bf8cf0f1f7413839bb6ee8",
    "sub_total": 1399,
    "total": 1399,
    "item_count": 1,
    "billing_address": {
      "full_name": "Lolita Moser",
      "address": "37W291 Heritage Drive",
      "city": "Batavia",
      "country": "US",
      "state": "Chicago",
      "zip": "60510",
      "phone": "+1 630-897-6170"
    },
    "shipping_address": {
      "full_name": "Neeraja Murthy",
      "address": "Flat no. A3 #201, Sriram White house apartment",
      "city": "RT Nagar, Bengaluru",
      "country": "IN",
      "state": "Karnataka",
      "zip": "560032",
      "phone": "9886625077"
    },
    "taxes_total": 0,
    "shipping_total": 0,
    "discount_total": 0,
    "gift_cards": [
    ],
    "gift_card_total": 0,
    "ecoupon": {
    },
    "discounts": [
    ],
    "email_id": "joyce.a.kwak@accenture.com",
    "user_id": null,
    "status": "sendingPaymentRequest",
    "currency": {
      "name": "INR",
      "conversion_rate": "1"
    },
    "order_id": null,
    "options": {
    },
    "payment_method": {
      "type": "payment_gateways",
      "enabled": "1",
      "settings": {
        "gateways": [
          {
            "id": 9690,
            "gateway": "ccavenue",
            "gateway_options": {
              "merchantid": "M_blooms_43",
              "key": "bi74uszdqdt6bctvgvvygtkkiu4715dh"
            }
          }
        ],
        "gateway": "ccavenue"
      },
      "name": "CC Avenue",
      "_id": "558154d0a978f588069d17ac"
    },
    "shipping_method": "Standard Shipping",
    "available_wallets": [
    ],
    "wallets": [
    ],
    "shipping_method_name": "Standard Shipping",
    "version": "ms.0.2.0",
    "additional_charges": [
    ],
    "items": [
      {
        "product": {
          "_id": "555354f10eb58597316c027d",
          "images": [
            {
              "caption": "roses carnations basket",
              "image": "ms.products/555354f10eb58597316c027d/images/555354f10eb58597316c027e/5553545a50d7f3641761851b/5553545a50d7f3641761851b.jpg",
              "tags": "roses, carnations, basket, flowers, bangalore, florist bangalore",
              "_metadata": {
                "image": {
                  "_id": "5553545a50d7f3641761851b",
                  "name": "bas14BIG.jpg",
                  "size": 133921,
                  "type": "image/jpeg"
                }
              },
              "_id": "555354f10eb58597316c027e"
            }
          ],
          "categories": [
            "products",
            "flowers",
            "baskets-1",
            "flowers-8",
            "baskets"
          ],
          "publish": "1",
          "dimension": {
          },
          "inventory_management": "none",
          "inventory_management_level": "variant",
          "inventory_low_stock_quantity": "5",
          "product_has_multiple_variants": "0",
          "SEO": {
          },
          "attributes": [
          ],
          "features": [
          ],
          "option_set": null,
          "_metadata": {
            "option_set": {
              "action": null
            }
          },
          "variants": [
          ],
          "description": "Arrangement of 25 red rose and 10 carnations in Bangalore. ",
          "name": "Roses & Carnations",
          "alias": "roses-carnations",
          "price": 1399,
          "compare_price": 1599,
          "collections": [
            "flower-collections"
          ],
          "sku": "bas14BIG",
          "weight": "100",
          "available": true,
          "sort_order": 103,
          "created_on": "2015-05-13T13:43:37.152Z",
          "_created_by": "5532747b389e154972ee6bb9",
          "list_price": 1599,
          "our_price": 1399,
          "original_price": 1399,
          "discounts_total": 200,
          "discounts_percentage": "12.51",
          "discount_total": 200,
          "selected_options": {
            "Delivery_date": "August 5",
            "Delivery_message": "Neeraja, just a special note to let you know we are thinking of you and praying for you. \n\nSincerely, Jack and the IS Team"
          },
          "selected_variant": {
          },
          "category": {
            "_id": "5540d696e9e85dbc5278c386",
            "parent": {
              "_id": "553e1249cb144e33285eda32",
              "fields": [
              ],
              "SEO": {
              },
              "publish": "1",
              "default_sort_order": "-created_on",
              "description": "",
              "name": "Products",
              "alias": "products",
              "created_on": "2015-04-27T10:41:13.370Z",
              "_created_by": "550a8117894676367924faed",
              "sort_order": 1,
              "parent": null,
              "count": 220,
              "level": 1
            },
            "publish": "1",
            "description": "",
            "name": "Flowers",
            "alias": "flowers",
            "created_on": "2015-04-29T13:03:18.976Z",
            "_created_by": "54858e54e681db2741900f5d",
            "sort_order": 0.1,
            "count": 77,
            "fields": [
            ],
            "SEO": {
              "title": "Send Flowers to Bangalore",
              "description": "Flower Delivery in Bangalore through local florist in Bangalore",
              "keywords": "Bangalore, Online Florist Bangalore,  Send Flowers toBangalore, Flower Delivery Bangalore"
            },
            "default_sort_order": "-created_on",
            "updated_on": "2015-05-04T16:36:58.474Z",
            "_updated_by": "54858e54e681db2741900f5d",
            "level": 2
          },
          "purchased_quantity": 1
        },
        "discounts": [
        ],
        "discount_total": 0,
        "taxes_total": 0,
        "taxes": [
        ],
        "quantity": 1,
        "sub_total": 1399,
        "total": 1399,
        "_id": "55bf8cf0f1f7413839bb6eea"
      }
    ],
    "metafields": {
    },
    "language": "EN",
    "created_on": "2015-08-03T15:46:56.509Z",
    "updated_on": "2015-08-03T16:03:35.450Z",
    "sent_info": {
      "encRequest": "\nb5d3bd89da46ac4b8b5ca6586e4c79c45dcf27a3c9443670422e32729417e56d5dfd701b047237d3d8a156b842379f82c00f5101b15b332bc6bf1b8e3fbdb113970fa97735dccba765dab2bbeb4caa9c397cf3c7e2351196b61b1bb3bd14e0b4f17fd51b192faa2de8a5d5efa658e1e116593a953e7a7283eff2dd9c22cd73577da25b84420db1642355de7769ea8ee694b2578344bc3278672f1c289b52282a7af1353745f21739ba7ac3a4b94a3aad74a92f23be776c1c6e37be7c304d89421b3c44a3d444e7e5726a31c861c3e56ee08a9605bedc6298f982385ebb629f3fd5233baa833f66d00607e0e63aa200b56e2d21ddd6540729647291c0415b243e54b41797a55e6fb2f0555a461242b113a458ce14d9242a497da572917e4529ef224a3b596b6ad984815b1f4c0d4fe7e2e96ba336b8f5df9d5e2bb139b2e3c8af7744f5883cd5939e7abaecabf76e8c58c419bbe2fcd7709decbfc1dd85a51d21d578aea01e74f2d751e80d4105c3484e5da346139d6c09da966b092c9cb58e7ba30fe2cf59d93afa172c1489c630e9e473b7ae60e1ca2627458026fd5d738316b50edc8c2a0c141c792ae0c1fadc57559a3528e6f51a3e8d529d582570733c79445687b7d873ede0edd502f74f687c52794a178115e810c1cb49bc316c20d71399fc8f9556b2aaaf623d86198f1462a1a0988a16d836ee1d8d6765df28cc0e47efd48f963f41d2e7c570a2335311ac9cc8f76535624d6a534b489759217c819341ac00420955d64ee0c6e85877327fdb80905803bb6dc181a59532235ca717579a10cd31de7d6370cf95faf43b24d025191b9b0e40471e717821228e73890d16aef4173773b8227812a9b00ea29c7810378f021122facda5f061385c103dc95df95116b7797c6f9def8923afb263daca4cf0d2cb9093699bb8893be60079df8a1e71d08904a1fe00a66f021134b56852dcf48fb7afef4824312c3e9163957b1a",
      "Merchant_Id": "M_blooms_43"
    },
    "txn_id": "MLEfQX645",
    "client_details": {
      "appCodeName": "Mozilla",
      "appName": "Netscape",
      "appVersion": "5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.125 Safari/537.36",
      "platform": "Win32",
      "cookieEnabled": true,
      "languages": [
        "en-US",
        "en"
      ],
      "device": "WEB"
    },
    "price_type": "inclusive"
  }
}

Message

Code Message
401 Unauthorized Access
404 Not Found
406 Invalid information in request
Get list abandoned checkouts GET /entity/ms.checkouts

Example

Get list abandoned checkouts in order they have created
GET /entity/ms.checkouts?sort=[{"field":"created_on","order":1}]

Example Response Json

{
    "records": [
        {
            "_id": "55c19158471e6ec36c2d02e6",
            "sub_total": 899,
            "total": 899,
            "item_count": 1,
            "billing_address": {
                "full_name": "dfvdfv",
                "address": "asdcasd",
                "city": "fwsf",
                "country": "IN",
                "state": "Haryana",
                "zip": "122001",
                "phone": "3212321232"
            },
            "shipping_address": {
                "full_name": "dfvdfv",
                "address": "asdcasd",
                "city": "fwsf",
                "country": "IN",
                "state": "Haryana",
                "zip": "122001",
                "phone": "3212321232"
            },
            "taxes_total": 0,
            "shipping_total": 0,
            "discount_total": 0,
            "gift_cards": [
            ],
            "gift_card_total": 0,
            "ecoupon": {
            },
            "discounts": [
            ],
            "email_id": "barnwal8@gmail.com",
            "user_id": "55c19166471e6ec36c2d02eb",
            "status": "sendingPaymentRequest",
            "currency": {
                "name": "INR",
                "conversion_rate": "1"
            },
            "order_id": null,
            "options": {
            },
            "payment_method": {
                "type": "payment_gateways",
                "enabled": "1",
                "settings": {
                    "gateways": [
                        {
                            "id": 9690,
                            "gateway": "ccavenue",
                            "gateway_options": {
                                "merchantid": "M_blooms_43",
                                "key": "bi74uszdqdt6bctvgvvygtkkiu4715dh"
                            }
                        }
                    ],
                    "gateway": "ccavenue"
                },
                "name": "CC Avenue",
                "_id": "558154d0a978f588069d17ac"
            },
            "shipping_method": "Standard Shipping",
            "available_wallets": [
            ],
            "wallets": [
            ],
            "shipping_method_name": "Standard Shipping",
            "version": "ms.0.2.0",
            "additional_charges": [
            ],
            "items": [
                {
                    "product": {
                        "_id": "558112afa978f588069d0090",
                        "_metadata": {
                        },
                        "images": [
                            {
                                "tags": "exotic cakes to bangalore, cakes to bangalore, bangalore cakeshop",
                                "image": "ms.products/558112afa978f588069d0090/images/558112afa978f588069d0091/558112172babbd1153dc9729/558112172babbd1153dc9729.jpg",
                                "caption": "strawberry cake to bangalore",
                                "_metadata": {
                                    "image": {
                                        "_id": "558112172babbd1153dc9729",
                                        "name": "BB_WHITECHOCSTRWCAKE.jpg",
                                        "size": 192375,
                                        "type": "image/jpeg"
                                    }
                                },
                                "_id": "558112afa978f588069d0091"
                            }
                        ],
                        "categories": [
                            "products",
                            "cakes-10",
                            "premium-cakes-1",
                            "cakes",
                            "premium-cakes"
                        ],
                        "publish": "1",
                        "dimension": {
                        },
                        "inventory_management": "none",
                        "inventory_management_level": "variant",
                        "inventory_low_stock_quantity": "5",
                        "options": [
                        ],
                        "SEO": {
                        },
                        "attributes": [
                        ],
                        "features": [
                        ],
                        "description": "<strong>1/2kg cake with Chocolate Dipped Strawberries topping. </strong><br />\nStrawberries are seasonal fruits, incase if its not available in the market during the time of your order, it&#39;ll be replaced with 8 pieces of Ferrero Rocher Chocolates for the same value.&nbsp;<br />\n<br />\nNot available for same day delivery.<br />\nOrder to be placed atleast one day prior to the date of delivery.&nbsp;<br />\nFor same day delivery kindly check with us before ordering.",
                        "name": "1/2kg - Cake with Chocolate Strawberry",
                        "alias": "12kg-cake-with-chocolate-strawberry",
                        "sku": "BB_WHITECHOCSTRWCAKE",
                        "price": 899,
                        "compare_price": 1299,
                        "collections": [
                            "trending",
                            "cake-collections"
                        ],
                        "weight": "500",
                        "available": true,
                        "sort_order": 223,
                        "created_on": "2015-06-17T06:24:51.254Z",
                        "_created_by": "5532747b389e154972ee6bb9",
                        "updated_on": "2015-06-19T16:16:42.016Z",
                        "_updated_by": "5532747b389e154972ee6bb9",
                        "list_price": 1299,
                        "our_price": 899,
                        "original_price": 899,
                        "discounts_total": 400,
                        "discounts_percentage": "30.79",
                        "discount_total": 400,
                        "selected_options": {
                            "Delivery_date": "2015-08-06T18:30:00.000Z",
                            "Delivery_message": "ergr"
                        },
                        "selected_variant": {
                        },
                        "category": {
                            "_id": "5540d681e9e85dbc5278c343",
                            "parent": {
                                "_id": "553e1249cb144e33285eda32",
                                "fields": [
                                ],
                                "SEO": {
                                },
                                "publish": "1",
                                "default_sort_order": "-created_on",
                                "description": "",
                                "name": "Products",
                                "alias": "products",
                                "created_on": "2015-04-27T10:41:13.370Z",
                                "_created_by": "550a8117894676367924faed",
                                "sort_order": 1,
                                "parent": null,
                                "count": 220,
                                "level": 1
                            },
                            "publish": "1",
                            "description": "",
                            "name": "Cakes",
                            "alias": "cakes-10",
                            "created_on": "2015-04-29T13:02:57.573Z",
                            "_created_by": "54858e54e681db2741900f5d",
                            "sort_order": 0.2,
                            "fields": [
                            ],
                            "SEO": {
                                "title": "Online Cake Delivery in Bangalore - Same Day Delivery | Bangalore Blooms",
                                "description": "Bangalore Blooms delivers fresh cakes for delivery in Bangalore. Now you can order order birthday cake online along with midnight cake delivery in Bangalore. \n\nNo hidden costs and surprisingly low prices. Delivery of Cake in Bangalore is as easy as ordering on Bangalore Blooms.\n\nYou can order Eggless Cakes in Bangalore or Chocolate cake in Bangalore with a Black Forest Cake and other delicious flavours. Top it up and Send Flowers to \n\nBangalore to make the occasion more memorable. Service, Quality and freshness of the cake at Bangalore Blooms is very different from other online cake \n\ndelivery websites with high discounts on cakes.  \n\nSame Day Delivery of Cakes in Bangalore is available and you can Order cakes in Bangalore at Bangalore Blooms your Local Florist in Bangalore.",
                                "keywords": "Cake Delivery in Bangalore, Online Cake Bangalore, Send Cakes to Bangalore, Eggless Cakes, Bangalore Blooms, Flower Delivery Bangalore, Coupons in Bangalore,   Cakes in Bangalore"
                            },
                            "default_sort_order": "-created_on",
                            "updated_on": "2015-05-05T08:56:30.999Z",
                            "_updated_by": "5532747b389e154972ee6bb9",
                            "count": 35,
                            "level": 2
                        },
                        "purchased_quantity": 1
                    },
                    "discounts": [
                    ],
                    "discount_total": 0,
                    "taxes_total": 0,
                    "taxes": [
                    ],
                    "quantity": 1,
                    "sub_total": 899,
                    "total": 899,
                    "_id": "55c19158471e6ec36c2d02e8"
                }
            ],
            "metafields": {
            },
            "language": "EN",
            "created_on": "2015-08-05T04:30:16.101Z",
            "updated_on": "2015-08-05T04:31:19.149Z",
            "sent_info": {
                "encRequest": "\nb5d3bd89da46ac4b8b5ca6586e4c79c45239209bd8b9b87c03e39aff1559e4b379f67d42607c62d69ea78e24eb8ed81c7f2ec2114b92593c66037d1a40993ee1ba2f3294fa25b335498aa5c1ca76d6193c807a38023e635e90540b37e57168fa8e9881ecec5cc226bbcbab16ead864bedb7d104604891dcb508c9c4060371beae1279e77fb96fbf8b8542588c3184a888ddf4e306f0ab03446947fc229bc9a271879a31f751cf8901d8aa2f3f74d65343651f95300177a58d28ae0b1ca8e4bfc47eadbebf6ab197c5ca7b326a82805fa6e13e44df4366cb1b9c988a102602fec365def176d7e733cc487fe1cbed81ac9b863dd384d56ffe40c83472f1945a0c22674fe3505c302abb1f1b273221a102245cd442a269737417b92c9d71bc92ed66dc3aed672d73aff11b70ca541a774cf629c58bae190ffd4325fbfaab0981b7b13f9cbc84ba4876976cd96c5f66477aa8667caa8d7dc1810c7eb781d567e7bd0e81ce71921ad3f21e6a21cc8570bc97fb40bd0f5ef972349ea6042d5ce26b30135ddf227d340cf64fc5807aa0a89153785ab817e3e399c3ae2d56c195fb8b8d2c12beccab1b90f42c5ec123d6fe7771b4e9691376a6e152c995393998021008476509073c5c153e7abfbfee497b352689b492d74497a85b725a30845caf5494f4a1f4c6cc606b260551ae30d83409a032288cdb72aa568f17d5dd094ad64c5e32c4bbb01728bd097c5e27714eb4135b161bb2cf66f09bec5c604cf5f4ec96ac83cd0e747262110da78732858ad14a75d801c1aec57f92b69c42aa2c84ba8d3d71b9ca70a68857d5d5d49d3d9628f58ec08d50548e08634290aa17a004dbe02a7",
                "Merchant_Id": "M_blooms_43"
            },
            "txn_id": "ucY7YX97",
            "client_details": {
                "appCodeName": "Mozilla",
                "appName": "Netscape",
                "appVersion": "5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/34.0.1847.116 Chrome/34.0.1847.116 Safari/537.36",
                "platform": "Linux i686",
                "cookieEnabled": true,
                "device": "WEB"
            },
            "price_type": "inclusive"
        },
        {
            "_id": "55c0aa80399608a77de5cd45",
            "sub_total": 899,
            "total": 899,
            "item_count": 1,
            "billing_address": {
                "full_name": "sdsdvvd",
                "address": "dszcfzd",
                "city": "casca",
                "country": "IN",
                "state": "Haryana",
                "zip": "122001",
                "phone": "1234567890"
            },
            "shipping_address": {
                "full_name": "sdsdvvd",
                "address": "dszcfzd",
                "city": "casca",
                "country": "IN",
                "state": "Haryana",
                "zip": "122001",
                "phone": "1234567890"
            },
            "taxes_total": 0,
            "shipping_total": 0,
            "discount_total": 0,
            "gift_cards": [
            ],
            "gift_card_total": 0,
            "ecoupon": {
            },
            "discounts": [
            ],
            "email_id": "vijay.barnwal@hippoinnovations.com",
            "user_id": null,
            "status": "initial",
            "currency": "INR",
            "order_id": null,
            "options": {
            },
            "payment_method": {
                "type": "payment_gateways",
                "enabled": "1",
                "settings": {
                    "gateways": [
                        {
                            "id": 9690,
                            "gateway": "ccavenue",
                            "gateway_options": {
                                "merchantid": "M_blooms_43",
                                "key": "bi74uszdqdt6bctvgvvygtkkiu4715dh"
                            }
                        }
                    ],
                    "gateway": "ccavenue"
                },
                "name": "CC Avenue",
                "_id": "558154d0a978f588069d17ac"
            },
            "shipping_method": "Standard Shipping",
            "available_wallets": [
            ],
            "wallets": [
            ],
            "shipping_method_name": "Standard Shipping",
            "version": "ms.0.2.0",
            "additional_charges": [
            ],
            "items": [
                {
                    "product": {
                        "_id": "557ffee160b151b236e098bc",
                        "_metadata": {
                        },
                        "images": [
                            {
                                "caption": "fathers day special",
                                "image": "ms.products/557ffee160b151b236e098bc/images/557ffee160b151b236e098bd/557ffe7b2babbd1153dc971d/557ffe7b2babbd1153dc971d.jpg",
                                "tags": "cake for fathers day, bangalore gifts delivery",
                                "_metadata": {
                                    "image": {
                                        "_id": "557ffe7b2babbd1153dc971d",
                                        "name": "BB_FD_01.jpg",
                                        "size": 145907,
                                        "type": "image/jpeg"
                                    }
                                },
                                "_id": "557ffee160b151b236e098bd"
                            }
                        ],
                        "categories": [
                            "products",
                            "occassions",
                            "special-occassions"
                        ],
                        "publish": "1",
                        "dimension": {
                        },
                        "inventory_management": "none",
                        "inventory_management_level": "variant",
                        "inventory_low_stock_quantity": "5",
                        "options": [
                        ],
                        "SEO": {
                        },
                        "attributes": [
                        ],
                        "features": [
                        ],
                        "description": "Send 1kg Cake of your choice.<br />\n<br />\nPlease choose the flavour of your choice to be delivered from below and&nbsp;<br />\nmention it in the special instruction box.&nbsp;<br />\nBlack Forest / Chocolate Truffle / Pineapple / Butter Scotch / White Forest<br />\n",
                        "name": "Fathers Day Special Cake",
                        "alias": "fathers-day-special-cake",
                        "price": 899,
                        "compare_price": 949,
                        "collections": [
                            "special-occassions"
                        ],
                        "sku": "BB_FD_01",
                        "weight": "100",
                        "available": true,
                        "sort_order": 218,
                        "created_on": "2015-06-16T10:48:06.118Z",
                        "_created_by": "5532747b389e154972ee6bb9",
                        "list_price": 949,
                        "our_price": 899,
                        "original_price": 899,
                        "discounts_total": 50,
                        "discounts_percentage": "5.269",
                        "discount_total": 50,
                        "selected_options": {
                            "Delivery_date": "2015-08-12T18:30:00.000Z",
                            "Delivery_message": "ergdrdg"
                        },
                        "selected_variant": {
                        },
                        "category": {
                            "_id": "553e1249cb144e33285eda32",
                            "fields": [
                            ],
                            "SEO": {
                            },
                            "publish": "1",
                            "default_sort_order": "-created_on",
                            "description": "",
                            "name": "Products",
                            "alias": "products",
                            "created_on": "2015-04-27T10:41:13.370Z",
                            "_created_by": "550a8117894676367924faed",
                            "sort_order": 1,
                            "parent": null,
                            "count": 220,
                            "level": 1
                        },
                        "purchased_quantity": 1
                    },
                    "discounts": [
                    ],
                    "discount_total": 0,
                    "taxes_total": 0,
                    "taxes": [
                    ],
                    "quantity": 1,
                    "sub_total": 899,
                    "total": 899,
                    "_id": "55c0aa80399608a77de5cd47"
                }
            ],
            "metafields": {
            },
            "language": "EN",
            "created_on": "2015-08-04T12:05:20.132Z",
            "updated_on": "2015-08-04T12:06:11.190Z"
        },
        {
            "_id": "55bf8cf0f1f7413839bb6ee8",
            "sub_total": 1399,
            "total": 1399,
            "item_count": 1,
            "billing_address": {
                "full_name": "Lolita Moser",
                "address": "37W291 Heritage Drive",
                "city": "Batavia",
                "country": "US",
                "state": "Chicago",
                "zip": "60510",
                "phone": "+1 630-897-6170"
            },
            "shipping_address": {
                "full_name": "Neeraja Murthy",
                "address": "Flat no. A3 #201, Sriram White house apartment",
                "city": "RT Nagar, Bengaluru",
                "country": "IN",
                "state": "Karnataka",
                "zip": "560032",
                "phone": "9886625077"
            },
            "taxes_total": 0,
            "shipping_total": 0,
            "discount_total": 0,
            "gift_cards": [
            ],
            "gift_card_total": 0,
            "ecoupon": {
            },
            "discounts": [
            ],
            "email_id": "joyce.a.kwak@accenture.com",
            "user_id": null,
            "status": "sendingPaymentRequest",
            "currency": {
                "name": "INR",
                "conversion_rate": "1"
            },
            "order_id": null,
            "options": {
            },
            "payment_method": {
                "type": "payment_gateways",
                "enabled": "1",
                "settings": {
                    "gateways": [
                        {
                            "id": 9690,
                            "gateway": "ccavenue",
                            "gateway_options": {
                                "merchantid": "M_blooms_43",
                                "key": "bi74uszdqdt6bctvgvvygtkkiu4715dh"
                            }
                        }
                    ],
                    "gateway": "ccavenue"
                },
                "name": "CC Avenue",
                "_id": "558154d0a978f588069d17ac"
            },
            "shipping_method": "Standard Shipping",
            "available_wallets": [
            ],
            "wallets": [
            ],
            "shipping_method_name": "Standard Shipping",
            "version": "ms.0.2.0",
            "additional_charges": [
            ],
            "items": [
                {
                    "product": {
                        "_id": "555354f10eb58597316c027d",
                        "images": [
                            {
                                "caption": "roses carnations basket",
                                "image": "ms.products/555354f10eb58597316c027d/images/555354f10eb58597316c027e/5553545a50d7f3641761851b/5553545a50d7f3641761851b.jpg",
                                "tags": "roses, carnations, basket, flowers, bangalore, florist bangalore",
                                "_metadata": {
                                    "image": {
                                        "_id": "5553545a50d7f3641761851b",
                                        "name": "bas14BIG.jpg",
                                        "size": 133921,
                                        "type": "image/jpeg"
                                    }
                                },
                                "_id": "555354f10eb58597316c027e"
                            }
                        ],
                        "categories": [
                            "products",
                            "flowers",
                            "baskets-1",
                            "flowers-8",
                            "baskets"
                        ],
                        "publish": "1",
                        "dimension": {
                        },
                        "inventory_management": "none",
                        "inventory_management_level": "variant",
                        "inventory_low_stock_quantity": "5",
                        "product_has_multiple_variants": "0",
                        "SEO": {
                        },
                        "attributes": [
                        ],
                        "features": [
                        ],
                        "option_set": null,
                        "_metadata": {
                            "option_set": {
                                "action": null
                            }
                        },
                        "variants": [
                        ],
                        "description": "Arrangement of 25 red rose and 10 carnations in Bangalore.&nbsp;",
                        "name": "Roses & Carnations",
                        "alias": "roses-carnations",
                        "price": 1399,
                        "compare_price": 1599,
                        "collections": [
                            "flower-collections"
                        ],
                        "sku": "bas14BIG",
                        "weight": "100",
                        "available": true,
                        "sort_order": 103,
                        "created_on": "2015-05-13T13:43:37.152Z",
                        "_created_by": "5532747b389e154972ee6bb9",
                        "list_price": 1599,
                        "our_price": 1399,
                        "original_price": 1399,
                        "discounts_total": 200,
                        "discounts_percentage": "12.51",
                        "discount_total": 200,
                        "selected_options": {
                            "Delivery_date": "August 5",
                            "Delivery_message": "Neeraja, just a special note to let you know we are thinking of you and praying for you. \n\nSincerely, Jack and the IS Team"
                        },
                        "selected_variant": {
                        },
                        "category": {
                            "_id": "5540d696e9e85dbc5278c386",
                            "parent": {
                                "_id": "553e1249cb144e33285eda32",
                                "fields": [
                                ],
                                "SEO": {
                                },
                                "publish": "1",
                                "default_sort_order": "-created_on",
                                "description": "",
                                "name": "Products",
                                "alias": "products",
                                "created_on": "2015-04-27T10:41:13.370Z",
                                "_created_by": "550a8117894676367924faed",
                                "sort_order": 1,
                                "parent": null,
                                "count": 220,
                                "level": 1
                            },
                            "publish": "1",
                            "description": "",
                            "name": "Flowers",
                            "alias": "flowers",
                            "created_on": "2015-04-29T13:03:18.976Z",
                            "_created_by": "54858e54e681db2741900f5d",
                            "sort_order": 0.1,
                            "count": 77,
                            "fields": [
                            ],
                            "SEO": {
                                "title": "Send Flowers to Bangalore",
                                "description": "Flower Delivery in Bangalore through local florist in Bangalore",
                                "keywords": "Bangalore, Online Florist Bangalore,  Send Flowers toBangalore, Flower Delivery Bangalore"
                            },
                            "default_sort_order": "-created_on",
                            "updated_on": "2015-05-04T16:36:58.474Z",
                            "_updated_by": "54858e54e681db2741900f5d",
                            "level": 2
                        },
                        "purchased_quantity": 1
                    },
                    "discounts": [
                    ],
                    "discount_total": 0,
                    "taxes_total": 0,
                    "taxes": [
                    ],
                    "quantity": 1,
                    "sub_total": 1399,
                    "total": 1399,
                    "_id": "55bf8cf0f1f7413839bb6eea"
                }
            ],
            "metafields": {
            },
            "language": "EN",
            "created_on": "2015-08-03T15:46:56.509Z",
            "updated_on": "2015-08-03T16:03:35.450Z",
            "sent_info": {
                "encRequest": "\nb5d3bd89da46ac4b8b5ca6586e4c79c45dcf27a3c9443670422e32729417e56d5dfd701b047237d3d8a156b842379f82c00f5101b15b332bc6bf1b8e3fbdb113970fa97735dccba765dab2bbeb4caa9c397cf3c7e2351196b61b1bb3bd14e0b4f17fd51b192faa2de8a5d5efa658e1e116593a953e7a7283eff2dd9c22cd73577da25b84420db1642355de7769ea8ee694b2578344bc3278672f1c289b52282a7af1353745f21739ba7ac3a4b94a3aad74a92f23be776c1c6e37be7c304d89421b3c44a3d444e7e5726a31c861c3e56ee08a9605bedc6298f982385ebb629f3fd5233baa833f66d00607e0e63aa200b56e2d21ddd6540729647291c0415b243e54b41797a55e6fb2f0555a461242b113a458ce14d9242a497da572917e4529ef224a3b596b6ad984815b1f4c0d4fe7e2e96ba336b8f5df9d5e2bb139b2e3c8af7744f5883cd5939e7abaecabf76e8c58c419bbe2fcd7709decbfc1dd85a51d21d578aea01e74f2d751e80d4105c3484e5da346139d6c09da966b092c9cb58e7ba30fe2cf59d93afa172c1489c630e9e473b7ae60e1ca2627458026fd5d738316b50edc8c2a0c141c792ae0c1fadc57559a3528e6f51a3e8d529d582570733c79445687b7d873ede0edd502f74f687c52794a178115e810c1cb49bc316c20d71399fc8f9556b2aaaf623d86198f1462a1a0988a16d836ee1d8d6765df28cc0e47efd48f963f41d2e7c570a2335311ac9cc8f76535624d6a534b489759217c819341ac00420955d64ee0c6e85877327fdb80905803bb6dc181a59532235ca717579a10cd31de7d6370cf95faf43b24d025191b9b0e40471e717821228e73890d16aef4173773b8227812a9b00ea29c7810378f021122facda5f061385c103dc95df95116b7797c6f9def8923afb263daca4cf0d2cb9093699bb8893be60079df8a1e71d08904a1fe00a66f021134b56852dcf48fb7afef4824312c3e9163957b1a",
                "Merchant_Id": "M_blooms_43"
            },
            "txn_id": "MLEfQX645",
            "client_details": {
                "appCodeName": "Mozilla",
                "appName": "Netscape",
                "appVersion": "5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.125 Safari/537.36",
                "platform": "Win32",
                "cookieEnabled": true,
                "languages": [
                    "en-US",
                    "en"
                ],
                "device": "WEB"
            },
            "price_type": "inclusive"
        }
    ],
    "count": 3,
    "start": 0,
    "limit": 3,
    "total": 146
}

Message

Code Message
401 Unauthorized Access
404 Not Found
406 Invalid information in request

Access Keys
(ms.access_keys)

Fields

access_key
Type: string

Required: Yes
role
Type: string
enable
Type: string
List GET /api/1/entity/ms.access_keys

List the records saved in the entity.

Add POST /api/1/entity/ms.access_keys

Add the record in the entity.

Update PUT /api/1/entity/ms.access_keys/#{_id}

Update the record in the entity.

Delete DELETE /api/1/entity/ms.access_keys/:id

Delete the record from the entity.


Apps
(ms.apps)

Fields

name
Type: string

Read Only: No

Required: No
Name of application 
alias Auto Filled base field (name)
hooks
Type: array

Read Only: No

Required: No
It is array objects with fields
     events
          It is an array of string containing events ("ms.entity.ms.products.add.pre")
     handlers 
         It is an array of object containing fields
                name: Name for handler
                handler: function to be executed as a handler.
metafields
Type: array

Read Only: No

Required: No
This are the addtional fields that can be pushed in any global entity to extend its functionality.
It is array of object containing fields:
          name: Name of field to bbe introducted (It should contain only alphabets , under scores).
          type : display type of the field.
extend_entity
Type: array

Read Only: No

Required: No
This field helps in extending an entity by pushing metafields into entity structure.
 It is array of object containing fields:
          entity_name: Name of entity to be extended.
          metafields : Array of names of metafields(should be same as mentioned in metafields above.) .  
custom_entities This field helps to introduce new entity in listing on admin panel.
It is an array of object containing fields:
     group : Name of entity group 
     header: Name of header under which the entity to be listed
     entities: Array containing name of entiies to be listed.
user_group This fields is used to insert new user group when  app is installed.
It is an  array of object containing fields:
       name: Name of user group to be inserted.
 
settings_widget It is name of global widget which will be used to when app setting will be updated.
Name should start from ms.apps.* (Name convention)
handlers This field helps in executing any code at the time of installation or uninstallation.
It is array of object having fields:
     event:  install/ uninstall
     handler : function to be executed.
                    this function will receive  3 parameters. 
                   Request
                   Response
                   Callback
entity_records This fields is used to insert records in any entity when app is installed.
It is an  array of object containing fields:
       entity_name: Name of entity in which data to be inserted.
       record: It contains the  JSON of data to be inserted. 
This records will be removed when the application is uninstalled.

Banners
(ms.banners)

Fields

name
Type: string

Required: Yes
{ "name" : "test banner" }
Name of banner. It is required field
image
Type: file

Required: Yes
{
image: {
    data: "image_url",
    uploadType: 'url',
    //size:'210412',
    type: "image/jpeg"
}
} 

Image of banner.It is required field
url
Type: string
{ "url" :'url' }

Url of bannner
title
Type: string
{  "title":"tester" }

Title of banner
subtitle
Type: string
{"subtitle" : "Test_banner"}

Subtitle of banner
 
publish
Type: string
{"publish" : '1'}

Publishing of banner 
sort_order
Type: number
{"sort_order" : 4}

Sorting the banner of orderwise
Add POST /api/1/entity/ms.banners

Add the record in the entity.

Example

Banner Add Example
POST

Example Request Json

{
  name: 'banner1',
  image: {
    data: "http://s3.amazonaws.com/mystore.in/s/57027a58079833564ac17211/ms.local_themes/57c010b7b4344f7524261e0d/ajax-loader.gif",
    uploadType: 'url',
    //size:'210412',
    type: "image/jpeg"
  },
  url: 'url',
  title: 'tester',
  subtitle: 'testing'
};

Example Response

Response to request will be like this:

Example Response Json

{
  data: {
    _id: '58456795e5e21ec76c4ab1af'
  },
  messages: [
    {
      level: 'success',
      key: 'ms.entity.banners.add',
      message: ''
    }
  ]
}

Message

Code Message
ms.entity.banners.add

Query Parameters

Code Message
entityName The entity in which you want to add.
data(request) The required details to add a banner.
Update PUT /api/1/entity/ms.banners/#{_id}

Update the record in the entity.

Example

Banner update Example
PUT

Example Request Json

{
  name: 'testing',
  image: {
    data: "http://s3.amazonaws.com/mystore.in/s/57027a58079833564ac17211/ms.local_themes/57c010b7b4344f7524261e0d/ajax-loader.gif",
    uploadType: 'url',
    type: "image/jpeg"
  }
};

Example Response

Response to request will be like this:

Example Response Json

{
  data: 'updated successfully',
  messages: [
    {
      level: 'success',
      key: 'ms.entity.banners.edit',
      message: ''
    }
  ]
}

Message

Code Message
ms.entity.banners.edit

Query Parameters

Code Message
EntityName The entity in which you want to update.
data(request) The required details to update a banner.
_id Unique ID of the banner that is update.
List GET /api/1/entity/ms.banners

List the records saved in the entity.

Example

Banner list Example
GET

Example Request Json

{
  entity: 'ms.banners',
  command: 'list'
}

Example Response

Response to request will be like this:

Example Response Json

{
  data: [
    {
      _id: '584568bde5e21ec76c4ab29f',
      name: 'eretertrt',
      image: 'ms.banners/584568c0bd188511792b45fa.gif',
      url: 'url',
      title: 'tester',
      subtitle: 'testing',
      publish: '1',
      _metadata: [
        Object
      ],
      sort_order: 0,
      created_on: '2016-12-05T13:16:47.788Z',
      updated_on: '2016-12-05T13:16:49.652Z'
    }
  ],
  messages: [
    {
      level: 'success',
      key: 'ms.entity.banners.list',
      message: ''
    }
  ],
  paging: {
    limit: 50,
    start: 0,
    count: 1,
    total: 1
  }
}

Message

Code Message
ms.entity.banners.list

Query Parameters

Code Message
EntityName The entity in which you want to list.
Query Parameter In Query we pass the name filter which we list according its name.
Delete DELETE /api/1/entity/ms.banners/#{_id}

This method helps to delete a banner with given resourceId

Example

Banner delete Example
DELETE

Example Request Json

{
  entity: 'ms.banners',
  recordId: '58456a86e5e21ec76c4ab513',
  command: 'delete'
};

Example Response

Response to request will be like this:

Example Response Json

{
  data: 'updated successfully',
  messages: [
    {
      level: 'success',
      key: 'ms.entity.banners.delete',
      message: ''
    }
  ]
}

Message

Code Message
ms.entity.banners.delete

Query Parameters

Code Message
entityName Name of the entity
resourceId Unique user Id of banner that needs to be deleted
Get GET /api/1/entity/ms.banners/#{_id}

Get the record in the entity.

Example

Banner get Example
GET

Example Request Json

{
  entity: 'ms.banners',
  recordId: '58456e5ce5e21ec76c4abac2',
  command: 'get'
}

Example Response

<pre> Response to request will be like this: </pre>

Example Response Json

{
  data: {
    _id: '58456e5ce5e21ec76c4abac2',
    name: 'banner1',
    image: 'ms.banners/58456e5cbd188511792b4686.gif',
    url: 'url',
    title: 'banner123',
    subtitle: 'banner1231221',
    publish: '1',
    sort_order: 0,
    created_on: '2016-12-05T13:40:45.993Z'
  },
  messages: [
    {
      level: 'success',
      key: 'ms.entity.banners.get',
      message: ''
    }
  ]
}

Message

Code Message
ms.entity.banners.get

Blogs
(ms.blogs)

Blog Posts (Articles) are now moved to a separate section 'Blog Posts'. Blogs section now contains the top level categories of blogs.

Fields

title
Type: string

Read Only: No

Required: Yes
Title of main blog
content
Type: string

Read Only: No

Required: No
It contains the content of the blog
count
Type: integer

Read Only: No

Required: No
Count of blog posts i.e how many blog posts are relate to this blogs
Add POST /api/1/entity/ms.blogs

Update PUT /api/1/entity/ms.blogs/{#_id}

Delete GET /api/1/entity/ms.blogs/_/:id

List GET /api/1/entity/ms.blogs


Carts
(ms.carts)

Cart commands

Fields

items
Type: array
order_id
Type: string
status
Type: string
billing_address
Type: object
shipping_address
Type: object
user_id
Type: string
total
Type: number
email_id
Type: string
item_count
Type: number
version
Type: string
sub_total
Type: number
total
Type: number
discounts
Type: array
discount_total
Type: string
taxes_total
Type: string
shipping_total
Type: string
gift_cards
Type: array
gift_card_total
Type: string
ecoupon
Type: object
total_weight
Type: string
options
Type: string
payment_method
Type: object
shipping_method
Type: string
currency
Type: object
order_id
Type: string
additional_charges
Type: array
metafields
Type: object
language
Type: string

Related Resources

ms.order_options
It contains the list of  order options defined in store.

Read Only 
 

For detail description follow given link click here
ms.payment_methods
This contains the list of payment methods.

Read Only 

For detail description follow given link click here
ms.shipping_methods
This contains the list of shipping methods.

Read Only 

For detail description follow given link click here
ms.users
This contains the list of  users.

Read Only 

For detail description follow given link click here
List GET /api/1/entity/ms.carts

List the records saved in the entity.

Add POST /api/1/entity/ms.carts

Add the record in the entity.

Update PUT /api/1/entity/ms.carts/#{_id}

Update the record in the entity.

Delete DELETE /api/1/entity/ms.carts/#{_id}

Delete the record from the entity.

Get GET /api/1/entity/ms.carts/#{_id}

Get the record from the entity.

Duplicate POST /api/1/entity/ms.carts/#{_id}/_duplicate

Duplicate the record from the entity.

GetCart /api/1/entity/_/ms.carts/getCart

SaveUserInput /api/1/entity/_/ms.carts/saveUserInput

CheckProductAvailability /api/1/entity/_/ms.carts/checkProductAvailability

ApplyCoupon /api/1/entity/_/ms.carts/applyCoupon

RemoveCoupon /api/1/entity/_/ms.carts/removeCoupon

SendVerificationCode /api/1/entity/_/ms.carts/sendVerificationCode

CodeVerification /api/1/entity/_/ms.carts/codeVerification

UpdateShippingMethod /api/1/entity/_/ms.carts/updateShippingMethod

UpdatePaymentMethod /api/1/entity/_/ms.carts/updatePaymentMethod

PlaceOrder /api/1/entity/_/ms.carts/placeOrder

SaveOptions /api/1/entity/_/ms.carts/saveOptions

RemoveOption /api/1/entity/_/ms.carts/removeOption

AddItem /api/1/entity/_/ms.carts/addItem

RemoveItem /api/1/entity/_/ms.carts/removeItem

UpdateQuantity /api/1/entity/_/ms.carts/updateQuantity

UpdateUser /api/1/entity/_/ms.carts/updateUser

UpdateAddresses /api/1/entity/_/ms.carts/updateAddresses

GetUserCart /api/1/entity/_/ms.carts/getUserCart

ApplyWalletDiscount /api/1/entity/_/ms.carts/applyWalletDiscount

RemoveWalletDiscount /api/1/entity/_/ms.carts/removeWalletDiscount

MergeCart /api/1/entity/_/ms.carts/mergeCart

ReorderCart /api/1/entity/_/ms.carts/reorderCart

SendAbandonedCartMail /api/1/entity/_/ms.carts/sendAbandonedCartMail


Categories
(ms.categories)

Contains all the categories that are required for a specific site. Existing categories can be edited, deleted or duplicated or a new category can be added by clicking on add new button.

Fields

name
Type: string

Required: Yes
Name of the category
alias
Type: string
Alias of the category's name
description
Type: string
Brief description about the category
image
Type: file
Single image related to the category
images
Type: array
Multiple images related to the category
fields
Type: array

Required: No
parent
Type: string
Parent category (if any) of the category
count
Type: string

Required: No
Number of products saved under the category
SEO
Type: object
Contains SEO variables like title, description, keywords, canonical url and sitemap priority
metafield_sets
Type: array
Meta fields to be used in case extend entity is used
publish
Type: string
Flag that determines if a category is published i.e. visible to users
attributes
Type: array
default_sort_order
Type: string
Order by which a category's children will be sorted
List GET /api/1/entity/ms.categories

List the records saved in the entity.

Example

Listing categories of a store
GET /api/1/entity/ms.categories

Example Response Json

[
    {
      "_id": "54bf43c18624dfe65f6b3a45",
      "fields": [],
      "SEO": {},
      "publish": "1",
      "description": "",
      "name": "CATEGORY4",
      "alias": "category4",
      "created_on": "2015-01-21T06:14:25.590Z",
      "_created_by": "54bf433d8624dfe65f6b3a44",
      "sort_order": 4,
      "parent": null,
      "count": 2,
      "default_sort_order": "manually",
      "children": [],
      "level": 1
    },
    {
      "_id": "54bf43cd8624dfe65f6b3a46",
      "fields": [],
      "SEO": {},
      "publish": "1",
      "description": "",
      "name": "CATEGORY5",
      "alias": "category5",
      "created_on": "2015-01-21T06:14:37.989Z",
      "_created_by": "54bf433d8624dfe65f6b3a44",
      "sort_order": 5,
      "parent": null,
      "count": 2,
      "default_sort_order": "manually",
      "children": [],
      "level": 1
    }
  ]

Message

Code Message
ms.entity.categories.list
Add POST /api/1/entity/ms.categories

Add the record in the entity.

Example

Adding a category
POST /api/1/entity/ms.categories

Example Request Json

{
  "SEO": {},
  "alias": "test-category",
  "default_sort_order": "-created_on",
  "description": "test category",
  "images": [],
  "name": "test category",
  "publish": 1
}

Example Response Json

{"_id":"586a45e4903dfc20432f107f"}

Message

Code Message
ms.entity.categories.add
Update PUT /api/1/entity/ms.categories/:id

Update the record in the entity.

Example

Editing a category
PUT /api/1/entity/ms.categories/586a45e4903dfc20432f107f

Example Request Json

{
      "description": "test category description",
    }

Message

Code Message
ms.entity.categories.edit updated successfully
Delete DELETE /api/1/entity/ms.categories/:id

Delete the record from the entity.

Example

Deleting a category
DELETE /api/1/entity/ms.categories/586a45e4903dfc20432f107f

Message

Code Message
ms.entity.categories.delete updated successfully
Get GET /api/1/entity/ms.categories/:id

Get the record from the entity.

Example

Getting a category
GET /api/1/entity/ms.categories/54bf43c18624dfe65f6b3a45

Example Response Json

{
  "_id": "54bf43c18624dfe65f6b3a45",
  "fields": [],
  "SEO": {},
  "publish": "1",
  "description": "",
  "name": "CATEGORY4",
  "alias": "category4",
  "created_on": "2015-01-21T06:14:25.590Z",
  "_created_by": "54bf433d8624dfe65f6b3a44",
  "sort_order": 4,
  "parent": null,
  "count": 2,
  "default_sort_order": "manually"
}

Message

Code Message
ms.entity.categories.get
Duplicate POST /api/1/entity/ms.categories/:id/_duplicate

Duplicate the record from the entity.

Example

Duplicating a category
POST /api/1/entity/ms.categories/51fb787e4cfe31ad2a000001/_duplicate

Example Request Json

{
  "name": "Duplicate category",
  "parent": "586a4a52903dfc20432f10f4"
}

Example Response Json

{"_id":"586a4a71903dfc20432f10f7"}

Message

Code Message
ms.entity.categories.duplicate
StartImport POST /api/1/entity/_/ms.categories/startImport

Imports categories into the entity from an uploaded csv file

Example

Importing categories from csv file
POST /api/1/entity/_/ms.categories/startImport

Example Request Json

{
  "entity": "ms.categories",
  "file": {
    "_id": "586a4c0cb406fe4d0819a0af",
    "name": "export.csv",
    "path": "tmp/586a4c0cb406fe4d0819a0ae/export.csv",
    "size": 1339,
    "tmp_path": "/tmp/bc35996d5630e77ae801e2abaa3bc8b5",
    "type": "text/csv",
    "uploadType": "tmp",
    "file_name": "export.csv",
    "status": "uploaded",
    "uploaded_by": "user@hippoinnovations.com"
  }
}

Message

Code Message
ms.entity.categories.startImport
StartExport GET /api/1/entity/_/ms.categories/startExport

Export the records in form of csv file

Message

Code Message
ms.entity.categories.startExport
GetCategoryDetail GET POST /api/1/entity/ms.categories/getCategoryDetail

This command provides the details of a particular category in an heirarchical manner that reflects parent-child relationships between that category and other categories

Example

Getting details of a category
GET POST /api/1/entity/ms.categories/getCategoryDetail

Example Response Json

{
  "_id": "586fa0afd97b964854631485",
  "name": "test category",
  "parent": {
    "_id": "586fa0aed97b964854631481",
    "name": "test parent",
    "parent": {
      "_id": "586fa0add97b96485463147d",
      "name": "test grandparent",
      "images": [],
      "fields": [],
      "SEO": {},
      "publish": "1",
      "default_sort_order": "-created_on",
      "alias": "test-grandparent",
      "sort_order": 0,
      "created_on": "2017-01-06T13:50:37.565Z"
    },
    "images": [],
    "fields": [],
    "SEO": {},
    "publish": "1",
    "default_sort_order": "-created_on",
    "alias": "test-parent",
    "sort_order": 0,
    "created_on": "2017-01-06T13:50:38.822Z"
  },
  "images": [],
  "fields": [],
  "SEO": {},
  "publish": "1",
  "default_sort_order": "-created_on",
  "alias": "test-category",
  "sort_order": 0,
  "created_on": "2017-01-06T13:50:40.053Z"
}

Message

Code Message
ms.entity.categories.getCategoryDetail

Query Parameters

Code Message
alias Alias of the category for which you want to fetch the details

Dashboard_widgets
(ms.dashboard_widgets)

You’ll find the dashboard on the main page of your store’s admin; it's the first thing you'll normally see when you log in.

Fields

Name
Type: string

Read Only: No

Required: Yes
Name of dashboard Widgets.
Description
Type: string

Read Only: No

Required: No
Small description of dashboard widget
global_widget
Type: string

Read Only: No

Required: Yes
Name of global widget which you want to show on dashboard
Settings
Type: object

Read Only: No

Required: No
Settings>Icons

Here list of all the icons which you want to show on dashboard widget
 
Handler
Type: string

Read Only: No

Required: No
Function to be executed as a handler
publish
Type: string

Read Only: No

Required: No
This checkbox is helpful to publish and unpublish dashboard widgets
Update PUT /entity/ms.dashboard_widgets/{#_id}

This command is helpful to update dashboard widgets

Example

updating the name of dashboard widget
PUT

Example Request Json

{ entity: 'ms.dashboard_widgets',
  recordId: '5849503b120f7eca3b7f3866',
  data: { Name: 'TestNew' },
  command: 'edit' }

Example Response Json

{ status: 200,
  data: 'Updated Successfully',
  messages: 
   [ { level: 'success',
       key: 'ms.entity.dashboard_widgets.edit',
       message: '' } ] }

Message

Code Message
401 Not Authorized
406 Something went wrong

Query Parameters

Code Message
_Id Unique Identifier of the order to be updated
List GET /api/1/entity/ms.dashboard_widgets

Get list of all dashboard widgets

Example

list all widgets when new admin theme set to 0
GET

Example Request

<pre> var request2 = { command: &#39;list&#39;, entity: &#39;ms.dashboard_widgets&#39; }</pre>

Example Request Json

{ command: 'list', entity: 'ms.dashboard_widgets', query: {} }

Example Response Json

{ status: 200,
  data: 
   [ { _id: '54a3a86af45468c454b62f13',
       created_on: '2014-12-31T07:40:26.974Z',
       _created_by: '530d7f8bc6b8283a11000002',
       updated_on: '2016-09-02T17:32:28.033Z',
       _updated_by: '530d7f8bc6b8283a11000002',
       description: 'Links to provide quick access to particular section of admin.',
       global_widget: 'ms.quickLinks',
       settings: [Object],
       publish: '1',
       level: '1',
       name: 'Quick links',
       alias: 'quick-links',
       Name: 'Quick links' },
     { _id: '54a3d589eadfebfc2ba7b64c',
       created_on: '2014-12-31T10:52:57.805Z',
       _created_by: '53c8ea06fea915782b4f8b01',
       updated_on: '2016-10-26T12:47:37.175Z',
       _updated_by: '530d7f8bc6b8283a11000002',
       description: 'A quick glance at the statistics of your store.',
       global_widget: 'ms.statistics',
       settings: [Object],
       publish: '1',
       level: '1',
       handler: 'function (req, res, next) {\n    var request = {entityName: \'ms.products\', query: {limit: 1, total: \'1\'}, executeHooks: true};\n    req.app.list(request, function (err, product) {\n        var product_count = product.data.total;\n        var data = {entityName: \'ms.users\', query: {limit: 1, total: \'1\'}, executeHooks: true};\n        if (req.session && req.session.user && req.session.user.role && req.session.user.role == \'admin\') {\n            req.app.list(data, function (err, user) {\n                var user_count = user.data.total;\n                var data = {entityName: \'ms.orders\', query: {limit: 1, total: \'1\'}, executeHooks: true};\n                req.app.list(data, function (err, orders) {\n                    var order_count = orders.data.total;\n                    var response = {product_count: product_count, user_count: user_count, order_count: order_count};\n                    next(null, response);\n                })\n            })\n        } else {\n            var user_count = 0;\n            var data = {entityName: \'ms.orders\', query: {limit: 1, total: \'1\'}, executeHooks: true};\n            req.app.list(data, function (err, orders) {\n                var order_count = orders.data.total;\n                var response = {product_count: product_count, user_count: user_count, order_count: order_count};\n                next(null, response);\n            })\n        }\n    })\n}',
       name: 'Statistics',
       alias: 'statistics',
       Name: 'Statistics',
       custom_box: 0,
       new_admin_theme: 0,
       seller: 0,
       publish_new_admin: '0',
       reseller: '0' } ],
  messages: 
   [ { level: 'success',
       key: 'ms.entity.dashboard_widgets.list',
       message: '' } ],
  paging: { start: 0, total: 2 } }
list all widgets when new admin theme set to 1
GET

Example Request Json

{ command: 'list', entity: 'ms.dashboard_widgets', query: {} }

Example Response Json

{ status: 200,
  data: 
   [ { _id: '582bf624fbe6516c733116ab',
       settings: [Object],
       publish: '0',
       custom_box: 0,
       new_admin_theme: 1,
       seller: 1,
       publish_new_admin: '1',
       reseller: '0',
       Name: 'Statistics',
       description: 'A quick glance at the statistics of your store.',
       global_widget: 'ms.statistics_new_admin',
       handler: 'function(req,res,next){ require(\'ms-dashbaord_reports\').statistics(req,res,next); }',
       level: '1',
       created_on: '2016-11-16T06:01:08.759Z',
       _created_by: '530d7f8bc6b8283a11000002' },
     { _id: '57da8b4343863a8e306d5f57',
       settings: [Object],
       created_on: '2016-09-15T11:51:31.441Z',
       global_widget: 'ms.list_to_do',
       Name: 'To-Do List',
       description: 'Overview Of To-Do\'s',
       level: '2',
       new_admin_theme: 1,
       updated_on: '2016-11-18T14:46:10.226Z',
       _updated_by: '530d7f8bc6b8283a11000002',
       publish_new_admin: '1',
       sort_column: '1',
       publish: '0',
       custom_box: 0,
       handler: 'function(req, res, next){\n\tnext();\n}' },
     { _id: '57c93837d8a2a8a8530b5601',
       settings: [Object],
       name: 'Sales',
       description: 'A quick glance at the orders of your store.',
       global_widget: 'ms.order_details',
       handler: 'function(req,res,next){ require(\'ms-dashbaord_reports\').order_details_month(req,res,next); }',
       level: '1',
       new_admin_theme: 1,
       alias: 'sales',
       created_on: '2016-09-02T08:28:39.126Z',
       _created_by: '569cd6257cd181891d49d079',
       seller: 1,
       updated_on: '2016-11-16T06:02:02.874Z',
       _updated_by: '530d7f8bc6b8283a11000002',
       Name: 'Sales',
       publish_new_admin: '0',
       sort_column: '508',
       publish: '0',
       custom_box: 0,
       reseller: '0' },
     { _id: '57c93757d8a2a8a8530b54e1',
       settings: [Object],
       name: 'Order Summary',
       description: 'A quick glance at the statistics of orders of your store.',
       global_widget: 'ms.order_summary',
       handler: 'function(req,res,next){ require(\'ms-dashbaord_reports\').order_statistics(req,res,next); }',
       new_admin_theme: 1,
       level: '1',
       alias: 'order-summary',
       created_on: '2016-09-02T08:24:55.755Z',
       _created_by: '569cd6257cd181891d49d079',
       seller: 1,
       updated_on: '2016-11-16T06:02:16.839Z',
       _updated_by: '530d7f8bc6b8283a11000002',
       Name: 'Order Summary',
       publish_new_admin: '0',
       sort_column: '787',
       publish: '0',
       custom_box: 0,
       reseller: '0' },
     { _id: '57c9368cd8a2a8a8530b53fa',
       settings: [Object],
       name: 'Recommended Video',
       description: 'Tutorial for Beginners',
       global_widget: 'ms.tutorial_video',
       new_admin_theme: 1,
       level: '1',
       alias: 'recommended-video',
       created_on: '2016-09-02T08:21:32.390Z',
       _created_by: '569cd6257cd181891d49d079',
       seller: 1,
       updated_on: '2016-11-16T06:02:32.267Z',
       _updated_by: '530d7f8bc6b8283a11000002',
       Name: 'Recommended Video',
       publish_new_admin: '0',
       sort_column: '1294',
       publish: '0',
       custom_box: 0,
       reseller: '0' },
     { _id: '57c937afd8a2a8a8530b553b',
       settings: [Object],
       name: 'Recent Orders',
       description: 'Represents details of orders according to their status.',
       global_widget: 'ms.recent_orders',
       handler: 'function(req, res, next){require(\'ms-dashbaord_reports\').recent_orders(req, res, next);}\n',
       new_admin_theme: 1,
       level: '1',
       alias: 'recent-orders',
       created_on: '2016-09-02T08:26:23.732Z',
       _created_by: '569cd6257cd181891d49d079',
       seller: 1,
       updated_on: '2016-09-21T15:59:39.764Z',
       _updated_by: '530d7f8bc6b8283a11000002',
       Name: 'Recent Orders',
       publish_new_admin: '0',
       sort_column: '1579' },
     { _id: '57c937d7a7aca0ac5ea26050',
       settings: [Object],
       name: 'Sales By Location',
       description: 'A quick glance at the sales of your store according to Location.',
       global_widget: 'ms.orders_state_country',
       new_admin_theme: 1,
       level: '1',
       alias: 'sales-by-location',
       created_on: '2016-09-02T08:27:03.508Z',
       _created_by: '569cd6257cd181891d49d079',
       handler: 'function(req,res,next){ require(\'ms-dashbaord_reports\').order_state(req,res,next); }',
       updated_on: '2016-09-21T15:59:30.220Z',
       _updated_by: '530d7f8bc6b8283a11000002',
       seller: 1,
       Name: 'Sales By Location',
       publish_new_admin: '0',
       sort_column: '2000' },
     { _id: '57c937e7d8a2a8a8530b5580',
       settings: [Object],
       name: 'Top customers',
       description: 'A quick glance at the top customers of your store according to the total revenue of order placed by them.',
       global_widget: 'ms.top_customers_order',
       new_admin_theme: 1,
       level: '1',
       handler: 'function(req,res,next){ require(\'ms-dashbaord_reports\').top_customers_order(req,res,next); }',
       alias: 'top-customers',
       created_on: '2016-09-02T08:27:19.309Z',
       _created_by: '569cd6257cd181891d49d079',
       seller: 1,
       updated_on: '2016-09-21T16:03:15.701Z',
       _updated_by: '530d7f8bc6b8283a11000002',
       Name: 'Top customers',
       publish_new_admin: '0',
       sort_column: '2054' },
     { _id: '57c938eca7aca0ac5ea261c2',
       settings: [Object],
       name: 'Top Products',
       description: 'A quick glance at top products of your store.',
       global_widget: 'ms.latest_product',
       handler: 'function(req,res,next){ require(\'ms-dashbaord_reports\').top_products_new(req,res,next); }\n',
       new_admin_theme: 1,
       level: '1',
       alias: 'top-products',
       created_on: '2016-09-02T08:31:40.164Z',
       _created_by: '569cd6257cd181891d49d079',
       seller: 1,
       updated_on: '2016-09-21T15:59:01.143Z',
       _updated_by: '530d7f8bc6b8283a11000002',
       Name: 'Top Products',
       publish_new_admin: '0',
       sort_column: '2561' } ],
  messages: 
   [ { level: 'success',
       key: 'ms.entity.dashboard_widgets.list',
       message: '' } ],
  paging: { start: 0, total: 9 } }
list widgets with name filter
GET

Example Request Json

{ command: 'list',
  entity: 'ms.dashboard_widgets',
  query: { filters: '[{"field":"Name","value":"Statistics","operator":"equal"}]' } }

Example Response Json

{ status: 200,
  data: 
   [ { _id: '582bf624fbe6516c733116ab',
       settings: [Object],
       publish: '0',
       custom_box: 0,
       new_admin_theme: 1,
       seller: 1,
       publish_new_admin: '1',
       reseller: '0',
       Name: 'Statistics',
       description: 'A quick glance at the statistics of your store.',
       global_widget: 'ms.statistics_new_admin',
       handler: 'function(req,res,next){ require(\'ms-dashbaord_reports\').statistics(req,res,next); }',
       level: '1',
       created_on: '2016-11-16T06:01:08.759Z',
       _created_by: '530d7f8bc6b8283a11000002' } ],
  messages: 
   [ { level: 'success',
       key: 'ms.entity.dashboard_widgets.list',
       message: '' } ],
  paging: { start: 0, total: 1 } }

Message

Code Message
401 Not Authorized
406 Something went wrong

Query Parameters

Code Message
Name In this query we specify the name of the dashboard widget which we want to list.
new_admin_theme In this query we sepcify&nbsp;<span style="white-space: pre-wrap;">new_admin_theme as 0 to list unpublished widgets or as 1 to list published widgets.</span>
Delete GET /entity/ms.orders/{#_id}

This API is helpful in deleting dashboard widget

Example

Delete single dashboard widget
GET

Example Request Json

{ entity: 'ms.dashboard_widgets',
  recordId: '58495251120f7eca3b7f38ae',
  command: 'delete' }

Example Response Json

{ status: 200,
  data: 'updated successfully',
  messages: 
   [ { level: 'success',
       key: 'ms.entity.dashboard_widgets.delete',
       message: '' } ] }

Message

Code Message
401 Not Authorized
406 Something went wrong

Query Parameters

Code Message
_Id Unique Identifier of the order to be updated

Domains
(ms.domains)

Using this feature we can directly add a domain for a store. No need to add this in ms.global_domains in mystore and no need to move store by crm.storehippo.com. This feature automatically complete  all formality  to make a store live .    

Fields

domain
Type: string

Read Only: No

Required: Yes
Here put the name of domain name
storehippoSSL
Type: string

Read Only: No

Required: No
If you want apply storeHippo domain then you have to click here
email
Type: string

Read Only: No

Required: No
Here you have to valid mali_id which are related to that domain. 
primary
Type: string

Read Only: Yes

Required: No
This button for if you want to make primary that specific domain
redirect_to_primary
Type: string

Read Only: Yes

Required: No
This check box for if you want to redirect that domain to primary domain  
List GET /api/1/entity/ms.domains

this method for list all records of ms.domains

Add POST /api/1/entity/ms.domains

This method for add a domain in entity "ms.domains"

Delete GET /api/1/entity/ms.domains/_/:id

this method for delete a specific domain.


Enquiries
(ms.enquiries)

Contain the details of all the queries which are asked by users of a particular site through contact us form.

Fields

name
Type: string

Required: No
Here client should to enter his/her name.
email
Type: string

Required: Yes
Here, client should to enter his/her mail-id
subject
Type: string

Required: No
In this field, client should to enter valid subject of his/her query.
message
Type: string

Required: No
In this field, you should enter the description of your Query.
phone
Type: string

Required: No
In this field you have to mention your contact number.
created_on
Type: datetime
replies
Type: array
List GET /api/1/entity/ms.enquiries

List the records saved in the entity.

Example

list
GET

Example Request Json

var request = {
  entity: 'ms.enquiries'
}

Example Response Json

{
  status: 200,
  data: [
    {
      _id: '584650cc9031c40d44e20ce0',
      email: 'try@test.com',
      message: 'ssss',
      name: 'test',
      phone: '9461094395',
      replies: [],
      subject: 'test:subject',
      created_on: '2016-12-06T05:46:52.440Z'
    }
  ],
  messages: [
    {
      level: 'success',
      key: 'ms.entity.enquiries.list',
      message: ''
    }
  ],
  paging: {
    limit: 50,
    start: 0,
    count: 1,
    total: 1
  }
}
Add POST /api/1/entity/ms.enquiries

Add the record in the entity.

Example

add
POST

Example Request Json

var request = {
  entity: 'ms.enquiries',
  data: {
    email: "try@test.com",
    message: "ssss",
    name: "test",
    phone: "9461094395",
    replies: [],
    subject: "test:subject"
  }
}

Example Response Json

{
  status: 200,
  data: {
    _id: '584650cc9031c40d44e20ce0'
  },
  messages: [
    {
      level: 'success',
      key: 'ms.entity.enquiries.add',
      message: ''
    }
  ]
}
Update PUT /api/1/entity/ms.enquiries/#{_id}

Update the record in the entity.

Example

update
PUT

Example Request Json

var request = {
  entity: 'ms.enquiries',
  recordId: response.data._id,
  data: {
    email: "update@update.com",
  }
}

Example Response Json

{
  status: 200,
  data: 'updated successfully',
  messages: [
    {
      level: 'success',
      key: 'ms.entity.enquiries.edit',
      message: ''
    }
  ]
}
Delete DELETE /api/1/entity/ms.enquiries/:id

Delete the record from the entity.

Example

delete
DELETE

Example Request Json

var request ={
  entity: 'ms.enquiries',
  recordId: response.data._id
}

Example Response Json

{
  status: 200,
  data: 'updated successfully',
  messages: [
    {
      level: 'success',
      key: 'ms.entity.enquiries.delete',
      message: ''
    }
  ]
}{
  status: 200,
  data: 'updated successfully',
  messages: [
    {
      level: 'success',
      key: 'ms.entity.enquiries.delete',
      message: ''
    }
  ]
}
ReplyEnquiry /api/1/entity/_/replyEnquiry

SendEnquiry /api/1/entity/_/sendEnquiry

Example

sendEnquiry

Example Request Json

var request = {
  entity: 'ms.enquiries',
  data: {
    email: "yash.jain@test.com",
    message: "ssss",
    name: "test",
    phone: "9461094395",
    replies: [],
    subject: "test:subject"
  }
}

Example Response Json

{
  status: 200,
  messages: [
    {
      level: 'success',
      key: 'ms.entity.enquiries.sendEnquiry',
      message: 'Thank you for contacting us. We will get back to you shortly.'
    }
  ]
}

Forms
(ms.forms)

Some of the forms are reserved for store for storehippo.
But user can  override those form if required but can't define the new form with reservered form name.
 

Fields

form_name This contain the name of form to be used as reference/unique key while  getting structure of form. 
fields
Type: array

Read Only: No

Required: No
It is an array of  object contain folling fields

Name :  name for the field (should be unique).

Data_type : data type weather the value will be string or file or number etc.

Settings
        display_type:   It defines the input type of field:  
                                   Values might vary depending  upon the data_type of field. 

        validation:         It is an array containing various validations

        required:            It is a flag weather its required or not.

        hidden:              Field will not be shown while rendering the form id it is true.
                                   default value will be assigned (if present).

        default:              It contain the default value for field

        placeholder:      It is place holder for input if (applicable)
Get GET /api/v1.0/forms.json

Query Parameters

Code Message
name It is name of form to be rendered. ( If given only single form will be sent as response else all forms)

Partial Fulfillments
(ms.fulfillments)

Fulfillments allows the user to split an order into multiple fulfillments. The main purpose of splitting an order is to enable to user to ship different items (and their varying quantity) independently.

All fulfillments created by a store are stores in Fulfillments

Fields

oid
Type: string
OID of the associated order
Add POST /api/1/entity/ms.fuflillments

This API adds a new fulfillment

Example

creating a fulfillment using item id
POST /api/1/entity/ms.fuflillments

Example Request Json

{
  "order_id": "583ff1f3c662a22250caba9f",
  "items": [
    {
      "_id": "583ff1004002e3e23e48e906",
      "quantity": 1
    }
  ]
}

Example Response

The fulfillment has been successfully created

Example Response Json

{
  "_id": "592cebff5d934d2c41a0a701"
}
creating a fulfillment using product sku
POST /api/1/entity/ms.fuflillments

Example Request Json

{
  "order_id": "583ff1f3c662a22250caba9f",
  "items": [
    {
      "sku": "sku123",
      "quantity": 1
    }
  ]
}

Example Response

The fulfillment has been successfully created

Example Response Json

{
  "_id": "592cebff5d934d2c41a0a701"
}

Message

Code Message
ms.msg.fulfillments.add Data added successfully
ms.entity.fulfillments.invalid_item Invalid item in fulfillment
ms.entity.fulfillments.invalid_item_quantity Invalid item quantity
ms.msg.invalid_order Order does not exists
ms.msg.invalid_request Invalid request
ms.msg.order_fulfilled This order is already fulfilled
Cancel PUT /api/1/entity/ms.fulfillments/:id/_/cancel

This API cancels a shipments i.e. updates its status to "cancelled".
If the fulfillment has a shipment associated with it then  it calls the "cancel" command of ms.shipment to cancel the corresponding shipment as well

Example

Cancelling a fulfillment
PUT /api/1/entity/ms.fuflillments/572b569a942eb2d8312c7351/_/cancel

Message

Code Message
ms.entity.fulfillments.cancel The fulfillment has been successfully cancelled
ms.msg.invalid_request Invalid request
ms.msg.fulfillments.fulfillment_fulfilled This fulfillment has been fulfilled
ms.msg.fulfillments.fulfillment_cancelled This fulfillment has been cancelled
MarkAsDelivered PUT /api/1/entity/ms.fulfillments/:_id/_/markAsDelivered

This API updates the tracking status of a fulfillment with given value

Example

Marking a fulfillment as delivered
PUT /api/1/entity/ms.fuflillments/572b569a942eb2d8312c7351/_/markAsDelivered

Example Request Json

{ order_id: '593e926361497b4e31126bc3',
     tracking_status: 'Delivered' }

Message

Code Message
ms.entity.ms.fulfillments.markAsDelivered Fulfillment is successfully marked as delivered
ms.msg.fulfillments.invalid_request Invalid request
MarkAsShipped PUT /api/1/entity/ms.fuflillments/:_id/_/markAsShipped

This method updates the tracking status of a fulfillment as "Shipped" and also generates a shipping label with the details provided to the command, such as tracking number and logistics company name.

Example

Marking a fulfillment as shipped
PUT /api/1/entity/ms.fuflillments/572b569a942eb2d8312c7351/_/markAsShipped

Example Request Json

{
  "tracking_number": "test12345",
  "tracking_status": "shipped",
  "tracking_company": "testCompany",
  "email": "test@test.com",
  "generate_shipping_label": true,
  "send_mail": true
}

Example Response Json

{ shipment_id: '593e88a7d0c2e9763baa339d',
     shipping_label: '//cdn.storehippo.com/s/57aaca10964eb5eb1362cb19/ms.shipping/593e88a56c52db2d22b40e3apackagingSlip.pdf' }

Message

Code Message
ms.entity.ms.fulfillments.markAsShipped This fulfillment has been successfully marked as shipped
ms.msg.fulfillments.fulfillment_fulfilled This fulfillment has been fulfilled
ms.msg.fulfillments.fulfillment_cancelled This fulfillment has been cancelled
Ship PUT /api/1/entity/ms.fuflillments/:id/_/ship

This function creates a new shipment for given fulfillment and changes its status to Shipped.

This function internally calls create on shipping_providers

Example

Shipping a fulfillment
PUT /api/1/entity/ms.fuflillments/572b569a942eb2d8312c7351/_/ship

Example Request Json

{
  "level": "level1",
  "method": "ecomexpress",
  "pickupAddress": {
    "address": "House Number, Street, Locality",
    "city": "New Delhi",
    "country": "India",
    "email": "test@gmail.com",
    "phone": "9411548977",
    "state": "Delhi",
    "title": "Store Address",
    "zip_code": "110085"
  },
  "provider_id": "584123f083e573d70f6f59c6",
  "selected_date": {
    "readyPickup": "2016/11/10"
  },
  "selected_service": {
    "name": "ecomexpress",
    "title": "Ecom Express",
    "method": "regular",
    "rate": "standard"
  },
  "selected_time": "12:00"
}

Example Response

The fulfillment is successfully shipped

Imports
(ms.imports)

Import CSV file for bulk uploading of products in your store

Fields

name
Type: string

Read Only: No

Required: No
"name of csv file uploaded by client"
path Path where CSV file is stored.
size size of CSV file in Bytes
type it describes the type of CSV file i.e (text/csv) .If type of file does not matches,file will not be uploaded
status
Type: string

Read Only: No

Required: No
It describes the status of processing of CSV file . Status will be "uploaded" by default when we upload  a CSV. It will keep on changing till the CSV processing is completed.
 Various stages of CSV are decided by its status : -
  • UPLOADED : Initially when we upload a CSV,its status is "uploaded",its processing doesn't starts till.
  • PENDING_PARSE : file is under parsing phase,it will create new categories,collections,brands mentioned in products in file & check any syntax,manual or CSV format error in this phase. 
  • PARSED : file will separate ROWS and RECORDS from file and save in ms.imports entity.
  • RUNNING : records start converting into products in batch of 10 at a time and insert products in ms.products entity
  • COMPLETED : CSV file is completed with records having "processed","unprocessed" or "error" status which we will describe soon.
uploaded_by
Type: string

Read Only: No

Required: No
It describes the email ID of the person who uploaded the CSV file.
Rows
Type: array

Read Only: No

Required: No
It describes the information about each row of the CSV file uploaded 
It contains various variables :-
  • _id : each row has its unique id
  • line_number : it decribes the serial number of row.
  • record_id : it describes the id of record to which this row belongs.one record may conatin more than one rows 
  • row : it contains all the data mentioned in that particular row
  • status : it describes the status of that particular row.initially it is "unprocessed" & after processing its status changed to "processed". 
Records
Type: array

Read Only: No

Required: No
It describes the information about each product/record of the CSV file uploaded.  
It contains various variables :-
  • _id : each record has its unique id 
  • record : it contains all the data mentioned in that particular record
  • status : it describes the status of that particular record.initially it is "unprocessed" & after processing its status changed to "processed" or unprocessed with some errors in error field.

Related Resources

ms.imports
It contains the list of CSV files uploaded in the store with "uploaded by" and its various status
ms.products
This contains the list of all products.products are imported into this entity
ms.delivery_pincodes
if we want to import delivery_pincodes into a store.we will import CSV file into this entity .
Deleting entry of particular CSV DELETE /entity/ms.imports/{#_id}

It will delete the entry of particular CSV from ms.imports entity.

Example

Delete single Import
DELETE /entity/ms.imports/53b256e9b3af14aa15e451a5

Example Request Json

{
    "entity":"ms.imports",
    "recordId":"53b256e9b3af14aa15e451a5"
}

Example Response Json

{
    "data":"Deleted Successfully"
}

Query Parameters

Code Message
_Id Unique Identifier of the import to be deleted
Start Parsing of CSV file GET entity/ms.products/_/parseimport

This command will get the data of requested Id from ms.imports & start parsing the CSV file uploaded by user.it will insert new categories,brands,collections entered in the CSV into the store & will convert CSV data into RECORDS and save this data in ms.imports entity after parsing is finished. Logically it will Analyse CSV file into logical syntactic components called PRODUCTS.  

Example

Parse Import
GET

Example Request Json

data = {
                    entityName: ms.products,
                    executeHooks: true,                  
                    data: {
                        _id: "55bef9159cad703e28e43b5e"
                    }                    
                }

Example Response Json

{ data: 'parsed',
  status: 200,
  messages: 
   [ { name: 'ms.entity.products.parseImport',
       level: 'success',
        } ] }

Message

Code Message
200 success
406 With specific error message

Query Parameters

Code Message
entityName Name of the entity on which file is imported.It can be any entity which support "import" functionality.
data._id Unique Identifier of the import to be updated
Start importing products into store after parsing GET entity/ms.products/_/startImport

This command will get the data from requested ID & get records  in batch of 10 from ms.imports entity and will start putting products in ms.products and updating status of records after each batch process. Initially all records have "unprocessed" status. After processing their status are updated to "processed" or "unprocessed with error"
After all products are processed ,it will change the status of CSV file from running to "completed"

Example

Start import
GET

Example Request Json

data = {
                    entityName: ms.products,                   
                    data: {
                        _id: "55bef9159cad703e28e43b5e"
                    }                   
                }

Example Response Json

{ data: true,
  status: 200,
  messages: 
   [ { name: 'ms.entity.products.startImport',
       level: 'success',
        } ] }

Message

Code Message
200 success
406 With specific error message

Query Parameters

Code Message
entityName Name of the entity on which file is imported.It can be any entity which support "import" functionality.
data._id Unique Identifier of the import to be updated
Import a CSV file POST /entity/ms.imports/

When CSV is  imported,file will get save on server and on submit, file data along with unique ID and import ID will get save in ms.imports entity with status "UPLOADED"

Example

Uploading a csv
POST

Example Request Json

entity: "ms.products",
  file: {
name: "try1.csv",
path: "tmp/56659513f39863bf67276b0a/try1.csv",
size: 365,
type: "text/csv"
uploadType: "tmp"
},
status: "uploaded",
uploaded_by: "mmittal265@manusis.com"

Example Response Json

_id: "566695a8dc95054a27a0b75c"

Query Parameters

Code Message
entity Name of the entity where import will be performed
name Name of the CSV file with '.csv' extension.
path Path where CSV file is stored .
size size of CSV file in Bytes
type It describes the type of CSV file i.e (text/csv) .If type of file does not matches,file will not be uploaded
uploadType It can be 'tmp' , 'local' according to the type of CSV file and its path from where it is uploaded. 1) tmp - if file is stored at temporary location on server. 2) local - if file is stored at local path .
status It describes the status of file to be uploaded.when we upload a CSV its status should be "uploaded"
uploaded_by It describes the email ID of the person who uploaded the CSV file.

Notifications
(ms.notifications)

This entity is used to send different types of notifications like: -

  • Email
  • Sms
  • Push
  • Browser

Fields

_id The unique identifier for the orders. This one is used for API purposes. 

{ "_id" : "54b8bbf73e2dfb0a0b640c5e" }

Read Only