美文网首页
Marketplace Api Router

Marketplace Api Router

作者: KainAltion | 来源:发表于2016-05-30 15:58 被阅读0次

    分类 Category

    'Method = GET'// 获取所有分类
    http://www.foowala.com/marketplace/category
    
    // 获取单个分类信息
    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'// 获取单个商品
    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}
    
    // 通过地址筛选商品
    http://www.foowala.com/marketplace/product/{category}/origin/{origin}
    {category} : 商品分类Id
    {origin}  : 地区名字
    
    // 获取商品的所有地区
    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,必须和系统提供的 category._id 相同
      img      : String,  // 商品图片
      price    : Number,  // 商品价格
      spec    : String    // 商品简介
    }
    
    'Mothod = delete'
    // 删除商品http://www.foowala.com/marketplace/product/{id}
    

    购物车 Shopping Cart

    'Mothod = Get'
    // 获取购物车信息
    http://www.foowala.com/marketplace/shoppingcart
    
    'Mothod = Post'
    // 修改购物车Item
    http://www.foowala.com/marketplace/shoppingcart/{id}/item
    // 添加购物车 Item
    http://www.foowala.com/marketplace/shoppingcart/item
    post {
      product_id  : String,   // 商品id,必须是系统内商品的 Product._id
      number      : Number    // 购买数量
    }
    
    'Mothod = Delete'
    // 删除购物车 Item
    http://www.foowala.com/marketplace/shoppingcart/{id}/item
    

    服务评价

    'Mothod = Get'
    // 获取订单评价
    http://www.foowala.com/marketplace/evaluation/{order_id}
    // 获取所有服务评价(用户个人)
    http://www.foowala.com/marketplace/evaluation
    
    'Mothod = Post'
    // 添加评价
    http://www.foowala.com/marketplace/evaluation
    post {
    order_id :String,  // 订单ID
    grade    : Number,  // 评分
    suggest  : String    // 留言
    }
    

    地址薄

    'Mothod = Get'
    // 获取默认地址
    http://www.foowala.com/marketplace/address
    // 获取所有地址
    http://www.foowala.com/marketplace/address/all
    // 修改默认地址
    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,  // 详细地址
      phone    : String,  // 联系电话
      recipients: String  // 收货人
    }
    

    Order 订单

    'Mothod = Get'
    // 获取所有订单
    http://www.foowala.com/marketplace/order
    // 获取订单详情
    http://www.foowala.com/marketplace/order/{order_id}
    // 获取不同状态的订单
    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,    // 联系人
      contactPhone : String,    // 联系电话
      remark      : String,    // 备注
      payment      : Number    // 付款方式,0:现付, 1: 30天付款
    }
    //修改评论状态,调用将订单状态修改为待评论
    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
    

    相关文章

      网友评论

          本文标题:Marketplace Api Router

          本文链接:https://www.haomeiwen.com/subject/hafcdttx.html