分類 Category
'Method = GET'// 獲取所有分類
http://www.foowala.com/marketplace/category
// 獲取單個(gè)分類信息
http://www.foowala.com/marketplace/category/{id}
'Method = Delete'
// 刪除分類
http://www.foowala.com/marketplace/category/{id}
'Method = Post'
//新增分類http://www.foowala.com/marketplace/category
post {
name :String
img :String
order:String
}
//修改分類
http://www.foowala.com/marketplace/category/{id}/editor
post {
name :String
img :String
}
商品 Product
'Method = Get'// 獲取單個(gè)商品
http://www.foowala.com/marketplace/product/{id}
// 獲取所有商品
http://www.foowala.com/marketplace/product
// 獲取分類商品
http://www.foowala.com/marketplace/product/{category}/category
// 搜索商品,模糊查詢
http://www.foowala.com/marketplace/product/seach/{name}
// 通過(guò)地址篩選商品
http://www.foowala.com/marketplace/product/{category}/origin/{origin}
{category} : 商品分類Id
{origin} : 地區(qū)名字
// 獲取商品的所有地區(qū)
http://www.foowala.com/marketplace/product/{category}/all
{category} :商品分類Id
'Method = Post'
// 新增商品
http://www.foowala.com/marketplace/product
// 修改商品
http://www.foowala.com/marketplace/product/{id}/editor
post {
name : String, // 商品名稱
category : String, // 商品分類ID,必須和系統(tǒng)提供的 category._id 相同
img : String, // 商品圖片
price : Number, // 商品價(jià)格
spec : String // 商品簡(jiǎn)介
}
'Mothod = delete'
// 刪除商品http://www.foowala.com/marketplace/product/{id}
購(gòu)物車(chē) Shopping Cart
'Mothod = Get'
// 獲取購(gòu)物車(chē)信息
http://www.foowala.com/marketplace/shoppingcart
'Mothod = Post'
// 修改購(gòu)物車(chē)Item
http://www.foowala.com/marketplace/shoppingcart/{id}/item
// 添加購(gòu)物車(chē) Item
http://www.foowala.com/marketplace/shoppingcart/item
post {
product_id : String, // 商品id煞额,必須是系統(tǒng)內(nèi)商品的 Product._id
number : Number // 購(gòu)買(mǎi)數(shù)量
}
'Mothod = Delete'
// 刪除購(gòu)物車(chē) Item
http://www.foowala.com/marketplace/shoppingcart/{id}/item
服務(wù)評(píng)價(jià)
'Mothod = Get'
// 獲取訂單評(píng)價(jià)
http://www.foowala.com/marketplace/evaluation/{order_id}
// 獲取所有服務(wù)評(píng)價(jià)(用戶個(gè)人)
http://www.foowala.com/marketplace/evaluation
'Mothod = Post'
// 添加評(píng)價(jià)
http://www.foowala.com/marketplace/evaluation
post {
order_id :String, // 訂單ID
grade : Number, // 評(píng)分
suggest : String // 留言
}
地址薄
'Mothod = Get'
// 獲取默認(rèn)地址
http://www.foowala.com/marketplace/address
// 獲取所有地址
http://www.foowala.com/marketplace/address/all
// 修改默認(rèn)地址
http://www.foowala.com/marketplace/address/{id}/default
'Mothod = Delete'
// 刪除地址
http://www.foowala.com/marketplace/address/{id}
'Mothod = Post'
// 新增地址
http://www.foowala.com/marketplace/address
// 修改地址
http://www.foowala.com/marketplace/address/{id}/editor
post {
province : String, // 省
city : String, // 市
address : String, // 詳細(xì)地址
phone : String, // 聯(lián)系電話
recipients: String // 收貨人
}
Order 訂單
'Mothod = Get'
// 獲取所有訂單
http://www.foowala.com/marketplace/order
// 獲取訂單詳情
http://www.foowala.com/marketplace/order/{order_id}
// 獲取不同狀態(tài)的訂單
http://www.foowala.com/marketplace/order/:status/status
'Mothod = Post'
http://www.foowala.com/marketplace/order/submitOrder
post {
finalAddress : {
province: String,
city : String,
district: String,
address : String
}, // 送貨地址
contactPerson: String, // 聯(lián)系人
contactPhone : String, // 聯(lián)系電話
remark : String, // 備注
payment : Number // 付款方式,0:現(xiàn)付, 1: 30天付款
}
//修改評(píng)論狀態(tài)酝豪,調(diào)用將訂單狀態(tài)修改為待評(píng)論
http://www.foowala.com/marketplace/order/{order_id}/status
{order_id} : String // 訂單 ID
// 修改訂單,用作管理員審核
http://www.foowala.com/marketplace/order/:order_id
{order_id} : String // 訂單 ID
post{
remark:String // 備注
}
// 取消訂單
http://www.foowala.com/marketplace/order/:order_id/cancel
{order_id} : String // 訂單 ID