Ms.shipping_rates

This API provide the different shipping charges to be applied on orders.

It enable the admin to charge shipping cost according to his/her wish.

Fields

_id This field is unique identifer of records.
name
Type: string

Read Only: No

Required: No
This tells the mane of shipping method . It will be visible everywhere on cart as well as on order.
price It is charges of the shipping.
Applicable only in case of manual shipping
method This field tells weather the condition is based upon  total weight of order or total amount of order.

It is an object 
      criteria :  order_based/ weight_based
      criteria_options : This also an object having fields: 
                             min :  minimum value
                             max : maximum value
   
enabled
Type: string

Read Only: No

Required: No
It is a check weather the shipping method is enabled or not .

values:
 '1'
 '0'
options This is an array of object . Used to specify prices according to states.

fields of option 
    state : State name
    price : price to be used for mentioned state
countries It is an array of string contain the ISO-2 country codes

This tells that this shipping method is applicable on which countries.
Delete Shipping Methods DELETE /entity/ms.shipping_methods/{#_id}

Example

Delete Single Record
DELETE /entity/ms.shipping_methods/528961a249adb7740b000001

Example Response Json

{
   "data":"Data deleted successfully"
}

Message

Code Message
401 Unauthorized
406 Something went wrong
Add Shipping Method POST /entity/ms.shipping_methods

Example

Add Shipping Method
POST /entity/ms.shipping_methods

Example Request Json

{
    "data":{
        "ship_through": "manually",
        "options": [
        ],
        "enabled": "1",
        "method": {
            "criteria": "order_based",
            "criteria_options": {
                "min": "1",
                "max": "500"
            }
        },
        "_metadata": {
            "method": {
                "order_based": {
                    "min": "0",
                    "max": "10000"
                }
            }
        },
        "name": "Delivery Charges",
        "price": 49,
        "countries": [
            "IN"
        ],
        "alias": "method-1"
    }
}

Example Response Json

{
   "data":{
           "_id":"54f3fe54e8e5022a0edeebda"
   }
}

Message

Code Message
401 Unauthorized
406 Something went wrong
Update Shipping Method PUT /entity/ms.shipping_methods/{#_id}

Example

Update Shipping Method
PUT /entity/ms.shipping_methods/555065f48d3b90e43b45ec40

Example Request Json

{
    "data":{
        "_id": "555065f48d3b90e43b45ec40",
        "ship_through": "manually",
        "options": [
        ],
        "enabled": "1",
        "method": {
            "criteria": "order_based",
            "criteria_options": {
                "min": "1",
                "max": "500"
            }
        },
        "_metadata": {
            "method": {
                "order_based": {
                    "min": "0",
                    "max": "10000"
                }
            }
        },
        "name": "Delivery Charges",
        "price": 49,
        "countries": [
            "IN"
        ],
        "alias": "method-1"
    }
}

Example Response Json

{
     "data":"Data Updated Successfully"
}

Message

Code Message
401 Unauthorized
406 Something went wrong
Get Shipping Methods GET /entity/ms.shipping_methods/{#_id}

Example

Get Single Shipping Method
GET /entity/ms.shipping_methods/555065f48d3b90e43b45ec40

Example Response Json

{
    "data":{
        "_id": "555065f48d3b90e43b45ec40",
        "ship_through": "manually",
        "options": [
        ],
        "enabled": "1",
        "method": {
            "criteria": "order_based",
            "criteria_options": {
                "min": "1",
                "max": "500"
            }
        },
        "_metadata": {
            "method": {
                "order_based": {
                    "min": "0",
                    "max": "10000"
                }
            }
        },
        "name": "Delivery Charges",
        "price": 49,
        "countries": [
            "IN"
        ],
        "alias": "method-1",
        "created_on": "2015-05-11T08:19:00.738Z",
        "_created_by": "5497b4fec6270c5843b2dae6",
        "updated_on": "2015-06-15T08:21:31.347Z",
        "_updated_by": "5487e40c76a8efdb2fcf1f21"
    }
}

Message

Code Message
401 Not Authorized
406 Something went wrong
List Shipping Methods GET /entity/ms.shipping_methods

Example

List Shipping Methods
GET /entity/ms.shipping_methods

Example Response Json

{
    "data":{
        "total": 1,
        "count": 1,
        "limit": 50,
        "start": 0,
        "records": [
            {
                "_id": "555065f48d3b90e43b45ec40",
                "ship_through": "manually",
                "options": [
                ],
                "enabled": "1",
                "method": {
                    "criteria": "order_based",
                    "criteria_options": {
                        "min": "1",
                        "max": "500"
                    }
                },
                "_metadata": {
                    "method": {
                        "order_based": {
                            "min": "0",
                            "max": "10000"
                        }
                    }
                },
                "name": "Delivery Charges",
                "price": 49,
                "countries": [
                    "IN"
                ],
                "alias": "method-1",
                "created_on": "2015-05-11T08:19:00.738Z",
                "_created_by": "5497b4fec6270c5843b2dae6",
                "updated_on": "2015-06-15T08:21:31.347Z",
                "_updated_by": "5487e40c76a8efdb2fcf1f21"
            }
        ]
    }
}

Message

Code Message
401 Not Authorized
406 Something went wrong
Get Shipping Methods Applicable on given cart GET /entity/ms.shipping_methods/_/getShippingMethods

Example

get applicable shipping methods on cart
GET /entity/ms.shipping_methods/_/getShippingMethods

Example Request Json

{
    "data":{
        "cart":{
            "_id": "55c860198a63607d2a0da356",
            "additional_charges": [
            ],
            "available_wallets": [
            ],
            "billing_address": {
            },
            "client_details": {
            },
            "currency": {
                "name": "INR",
                "conversion_rate": "1"
            },
            "currency_code": "INR",
            "currency_rate": "1",
            "coupon_code": null,
            "discounts": [
            ],
            "discounts_total": 0,
            "discounts_percentage": 0,
            "discount_total": 0,
            "ecoupon": {
            },
            "wallets": [
            ],
            "email_id": null,
            "gift_cards": [
            ],
            "gift_card_total": 0,
            "item_count": 0,
            "items": [
            ],
            "language": "EN",
            "metafields": {
            },
            "options": {
            },
            "sub_total": 0,
            "total": 0,
            "payment_method": {
            },
            "shipping_address": {
            },
            "shipping_method": {
            },
            "shipping_method_name": null,
            "status": "initial",
            "shipping_total": 0,
            "taxes": [
            ],
            "taxes_total": 0,
            "total_weight": 0,
            "user_id": null,
            "version": "ms.0.3.0",
            "prices_are": "inclusive",
            "valid_email_id": false,
            "valid_shipping_address": false,
            "valid_billing_address": false,
            "valid_shipping_method": false,
            "valid_payment_method": false,
            "created_on": "2015-08-10T08:26:01.131Z"
        }
    }
}

Example Response Json

{
    "data":{
        "count": 1,
        "start": 0,
        "records": [
            {
                "_id": "555065f48d3b90e43b45ec40",
                "name": "Delivery Charges",
                "price": 49

            }
        ]
    }

}