Order - 友好速搭 -- 开发文档

友好速搭

开放 API
使用说明 获取授权 全部 API 特殊 API 开放功能

Order

Order

#Order 一个 Order 可以拥有多个 Payment(但同时只能有一个有效)和多个 Shipment、一个(或没有)Customer

Order 对象支持 WebhookMetafields

Order 相关API

GET /orders获取 Order 列表GET /orders/count获取Order数量GET /orders/#{id}获取单个OrderPUT /orders/#{id}修改 Order,现只能修改 Order.total_amount

Order 属性

    • address
    •   {
              "address": {
                  "city": "深圳市",
                  "city_code": "440300",
                  "complete_address": "中国,广东省,深圳市,南山区,科技园新西路7号兰光科技园B801",
                  "country": "中国",
                  "country_code": "CN",
                  "district": "南山区",
                  "district_code": "440305",
                  "email": "",
                  "mobile": "0755-83051027",
                  "name": "友好速搭",
                  "province": "广东省",
                  "province_code": "440000",
                  "telephone": "",
                  "zipcode": null
              }
      }
      
      Object 类型,Order 的配送地址,可参考 CustomerAddress
    • auto_total_amount
    •   {  "auto_total_amount": 0.01 }
      
      Price 类型,Order 的订单原总金额(订单生成时计算)。
    • closed_at
    •   { "closed_at": "2014-09-01T00:00:01.987+08:00" }
      
      Datetime 类型,Order 的关闭时间(顾客取消订单、商户退单、订单完成时录入关闭时间)。
    • created_at
    •   { "created_at": "2014-09-01T00:00:01.987+08:00" }
      
      Datetime 类型,Order 的创建时间。
    • customer
    • {     
      "customer": {
                  "addresses": [
                      {
                          "city": "深圳市",
                          "city_code": "440300",
                          "completed_address": "中国,广东省,深圳市,南山区,科技园新西路7号兰光科技园B801",
                          "country": "中国",
                          "country_code": "CN",
                          "created_at": "2015-04-29T23:09:41.167+08:00",
                          "detail": "科技园新西路7号兰光科技园B801",
                          "district": "南山区",
                          "district_code": "440305",
                          "email": "",
                          "id": 1597,
                          "is_default": true,
                          "mobile": "0755-83051027",
                          "name": "友好速搭",
                          "province": "广东省",
                          "province_code": "440000",
                          "telephone": "",
                          "updated_at": "2015-04-29T23:09:41.167+08:00",
                          "zipcode": null
                      }
                  ],
                  "avatar": null,
                  "created_at": "2015-04-29T23:08:13.665+08:00",
                  "id": 4028,
                  "name": "test",
                  "notify_email": "test@yeezon.com",
                  "notify_phone": "",
                  "reg_identity": "test@yeezon.com",
                  "reg_type": "email",
                  "updated_at": "2015-04-29T23:08:27.770+08:00"
              }
      }
      
      Object 类型,Order 的下单顾客(可为null),可参考 Customer
    • customer_remarks
    •   { "customer_remarks": "" }
      
      String 类型,Order 的顾客订单备注。
    • discount_amount
    •   { "discount_amount": 0 }
      
      Price 类型,Order 的订单优惠金额。
    • id
    •   { "id": 1093 }
      
      Number 类型,Order 的唯一整型标识。
    • item_amount
    •   { "item_amount": 100.01 }
      
      Price 类型,Order 的订单商品金额。
    • items
    •   {
      "items": [
          {
              "barcode": "SPC00001",
              "created_at": "2015-04-29T23:09:51.200+08:00",
              "id": 2877,
              "image": {
                  "alt": "",
                  "created_at": "2015-04-12T15:57:31.263+08:00",
                  "file_name": "80.jpeg",
                  "id": 12720,
                  "position": 1,
                  "product_id": 3531,
                  "src": "https://asset.ibanquan.com/image/552a256b8757db62920001ed/s.jpeg?v=1428825451",
                  "updated_at": "2015-04-12T15:57:31.263+08:00",
                  "variant_ids": [
                      12177
                  ]
              },
              "name": "梵·SCP200",
              "options_desc": "尺码:白色,颜色:M",
              "price": 0.01,
              "quantity": 1,
              "updated_at": "2015-04-29T23:09:51.200+08:00",
              "volume": 0,
              "weight": 0.2
              "variant_id": 12177
              "product_id": 3531
          }
      ]
      }
      
      Array 类型,Order 的订单商品列表。
    • notes
    • {
      "notes":[
      {
          "account": "lavandachen1",
          "created_at": "2015-04-29T22:23:15.968+08:00",
          "id": 44,
          "note": "测试笔记。"
      }
      ]
      }
      
      Array 类型,Order 的订单笔记列表。
    • order_no
    •   { "order_no": "2015012578265148" }
      
      String 类型,Order 的唯一编号。
    • payment_method
    •   {
       "payment_method": {
                  "gateway": "alipay",
                  "id": 364,
                  "name": "支付宝(即时到帐) - 自主配置",
                  "pay_type": "alipay"
              }
      }
      
      Object 类型,Order 的支付方式,可参考 PaymentMethod
    • payment_method_type
    •   { "payment_method_type": "online" }
      
      String 类型,Order 的支付方式类型,包括:
      • online:线上支付
      • offline:线下支付
    • payment_status
    •   { payment_status": "pending" }
      
      String 类型,Order 的支付状态,包括:
      • pending:等待支付
      • paid:支付完成
      • expired:支付超时
    • payments
    •   {
       "payments": [
                  {
                      "amount": 0.03,
                      "bank_code": "",
                      "created_at": "2015-04-29T23:09:51.200+08:00",
                      "exipired_at": "2015-05-01T03:00:00.000+08:00",
                      "gateway_payment_no": "2015042900001000020050455019",
                      "id": 2288,
                      "mode": "online",
                      "payment_method": {
                          "gateway": "alipay",
                          "id": 364,
                          "name": "支付宝(即时到帐) - 自主配置",
                          "pay_type": "alipay"
                      },
                      "status": "paid",
                      "updated_at": "2015-04-29T23:10:34.741+08:00"
                  }
              ]
      }
      
      Array 类型,Order 的支付信息列表,可参考 Payment
    • processed_at
    •   { "updated_at": "2015-01-25T22:29:20.409+08:00" }
      
      Datetime 类型,Order 的生成时间。可在订单创建或修改时指定,用于订单同步导入。
    • processing_method
    •   { "processing_method": "direct" }
      
      String 类型,Order 的生成方式,包括:
      • direct:顾客下单生成
      • manual:API或后台手工生成
    • purchase_ip
    •   { purchase_ip": "192.168.2.120" }
      
      String 类型,Order 的顾客下单所在 IP。
    • shipment_amount
    •   { "shipment_amount": 8 }
      
      Price 类型,Order 的订单运费金额。
    • shipment_status
    •   { shipment_status": "pending" }
      
      String 类型,Order 的配送状态,包括:
      • pending:等待发货
      • partial:部分发货
      • sending:已发货
      • recieved:已签收
    • shipments
    •   {
       "shipments": [
                  {
                      "amount": 0,
                      "auto_received_at": "2015-05-29T03:00:00.000+08:00",
                      "created_at": "2015-04-29T23:09:51.200+08:00",
                      "id": 2316,
                      "items": [
                          {
                              "barcode": "SPC00001",
                              "created_at": "2015-04-29T23:09:51.200+08:00",
                              "id": 2877,
                              "image": {
                                  "alt": "",
                                  "created_at": "2015-04-12T15:57:31.263+08:00",
                                  "file_name": "80.jpeg",
                                  "id": 12720,
                                  "position": 1,
                                  "product_id": 3531,
                                  "src": "https://asset.ibanquan.com/image/552a256b8757db62920001ed/s.jpeg?v=1428825451",
                                  "updated_at": "2015-04-12T15:57:31.263+08:00",
                                  "variant_ids": [
                                      12177
                                  ]
                              },
                              "name": "梵·SCP200",
                              "options_desc": "尺码:白色,颜色:M",
                              "price": 0.01,
                              "quantity": 1,
                              "updated_at": "2015-04-29T23:09:51.200+08:00",
                              "volume": 0,
                              "weight": 0.2
                          },
                          {
                              "barcode": "SPC00002",
                              "created_at": "2015-04-29T23:09:51.200+08:00",
                              "id": 2878,
                              "image": {
                                  "alt": "",
                                  "created_at": "2015-04-12T15:57:31.263+08:00",
                                  "file_name": "80.jpeg",
                                  "id": 12720,
                                  "position": 1,
                                  "product_id": 3531,
                                  "src": "https://asset.ibanquan.com/image/552a256b8757db62920001ed/s.jpeg?v=1428825451",
                                  "updated_at": "2015-04-12T15:57:31.263+08:00",
                                  "variant_ids": [
                                      12177
                                  ]
                              },
                              "name": "梵·SCP200",
                              "options_desc": "尺码:白色,颜色:L",
                              "price": 0.02,
                              "quantity": 1,
                              "updated_at": "2015-04-29T23:09:51.200+08:00",
                              "volume": 0,
                              "weight": 0.2
                          }
                      ],
                      "serial_number": "01",
                      "ship_no": "",
                      "ship_type": "express",
                      "shipment_supplier": null,
                      "status": "pending",
                      "updated_at": "2015-04-29T23:09:51.200+08:00"
                  }
              ]
      }
      
      Object 类型,Order 的配送信息列表,可参考 Shipment
    • status
    •   { status": "processing" }
      
      String 类型,Order 的订单状态,包括:
      • processing:处理中
      • achieved:已完成
      • cancel:顾客取消订单
      • expired:支付过期
      • refunding:顾客申请退单中
      • refunded:已退单
    • total_amount
    •   { "total_amount": 1000.01 }
      
      Price 类型,Order 的订单总金额(实际需支付的金额,改价后会影响)。
    • updated_at
    •   { "updated_at": "2015-01-25T22:31:06.155+08:00" }
      
      Datetime 类型,Order 的最近一次修改时间。
    • preferential_records
    •   { "preferential_records": [
                  {
                      "amount": 1,
                      "coupon_code": "9ICNG2",
                      "created_at": "2016-12-29T14:40:46.517+08:00",
                      "customer_level_id": null,
                      "customer_level_name": "",
                      "delivery_type": 0,
                      "id": 27939,
                      "promotion_id": null,
                      "promotion_name": "",
                      "shipment_id": null,
                      "type": "coupon",
                      "updated_at": "2016-12-29T14:40:46.517+08:00"
                  }
              ] }
      
      Array 类型,Order 的优惠信息列表。 根据type的不一样来判断是什么活动
      • promotion:营销活动
      • customer_level:顾客会员等级折扣
      • coupon:优惠券
      • reward_point:积分抵现
    • refunds
    •   { "refunds": [
                  {
                    "id": 266,
                    "payment_method_id": 160789,
                    "payment_id": 139615,
                    "amount": 1,
                    "status": "success",
                    "gateway_trade_no": "2018050221001004660591803156",
                    "trade_no": "2018050215059198245",
                    "site_id": "e4030053391f4e9db5d498b25b8c05fa",
                    "batch_no": "20180503152531776794429",
                    "reason": "商家直接退款",
                    "is_dealing": false,
                    "created_at": "2018-05-03T11:22:46.996+08:00",
                    "updated_at": "2018-05-03T11:22:47.366+08:00",
                    "pay_type": "alipay",
                    "payment_no": "2018050215059198245",
                    "account_id": 11836,
                    "fail_reason": null,
                    "trade_item_id": 23254
                  }
              ] }
      
      Array 类型,Refunds返回指定订单的所有退款项
      • amount:退款金额,单位:分
      • status:退款状态
      • trade_no:友好订单号
      • gateway_trade_no:第三方支付订单号
    • invoice
    •   { "invoice": 
                  {
                    "type": 1,
                    "title": "公司名称",
                    "tax_number": 12345566778,
                    "invoice_style": 1,
                    "invoice_content": 0,
                    "e_invoice_mobile": "13888888888",
                    "e_invoice_email": "example@xx.com"
                  }
              }
      
      Object 类型,invoice返回指定订单开票信息
      • type:发票类型 1 个人 2 企业 3 增值税专用发票
      • title:发票抬头
      • tax_number:发票纳税人识别号
      • invoice_style:发票方式 0 电子发票 1 纸质发票
      • invoice_content:发票内容 0 商品明细 1 商品类型
      • e_invoice_mobile:电子发票接收手机号码
      • e_invoice_email:电子发票接收邮箱

GET /orders

获取 Order 列表

    • limit
    • 显示条数(默认10,最大50)
    • page
    • 显示页码(默认1)
    • since_id
    • 筛选id大于since_id的Order
    • fields
    • ,拼接Response显示的字段
    • customer_id
    • 查询指定customer_id
    • id
    • 查询指定id
    • ids
    • ,拼接要显示的id范围
    • order_no
    • 缺省筛选包含输入order_no值的Order
    • created_at_min
    • 缺省筛选创建时间在指定日期时间之后的Order(格式2014-09-01T01:00:01)
    • created_at_max
    • 缺省筛选创建时间在指定日期时间之前的Order(格式2014-09-01T01:00:01)
    • updated_at_min
    • 缺省筛选更新时间在指定日期时间之后的Order(格式2014-09-01T01:00:01)
    • updated_at_max
    • 缺省筛选更新时间在指定日期时间之前的Order(格式2014-09-01T01:00:01)
    • 获取Order列表
    • GET /orders
    • HTTP/1.1 200 OK

      {
      "orders": [
          {
              "address": {
                  "city": "深圳市",
                  "city_code": "440300",
                  "complete_address": "中国,广东省,深圳市,南山区,科技园新西路7号兰光科技园B801",
                  "country": "中国",
                  "country_code": "CN",
                  "district": "南山区",
                  "district_code": "440305",
                  "email": "",
                  "mobile": "0755-83051027",
                  "name": "友好速搭",
                  "province": "广东省",
                  "province_code": "440000",
                  "telephone": "",
                  "zipcode": null
              },
              "auto_total_amount": 0.03,
              "closed_at": null,
              "created_at": "2015-04-29T23:09:51.200+08:00",
              "customer": {
                  "addresses": [
                      {
                          "city": "深圳市",
                          "city_code": "440300",
                          "completed_address": "中国,广东省,深圳市,南山区,科技园新西路7号兰光科技园B801",
                          "country": "中国",
                          "country_code": "CN",
                          "created_at": "2015-04-29T23:09:41.167+08:00",
                          "detail": "科技园新西路7号兰光科技园B801",
                          "district": "南山区",
                          "district_code": "440305",
                          "email": "",
                          "id": 1597,
                          "is_default": true,
                          "mobile": "0755-83051027",
                          "name": "友好速搭",
                          "province": "广东省",
                          "province_code": "440000",
                          "telephone": "",
                          "updated_at": "2015-04-29T23:09:41.167+08:00",
                          "zipcode": null
                      }
                  ],
                  "avatar": null,
                  "created_at": "2015-04-29T23:08:13.665+08:00",
                  "id": 4028,
                  "name": "test",
                  "notify_email": "test@yeezon.com",
                  "notify_phone": "",
                  "reg_identity": "test@yeezon.com",
                  "reg_type": "email",
                  "updated_at": "2015-04-29T23:08:27.770+08:00"
              },
              "customer_remarks": "",
              "discount_amount": 0,
              "id": 2331,
              "item_amount": 0.03,
              "items": [
                  {
                      "barcode": "SPC00001",
                      "created_at": "2015-04-29T23:09:51.200+08:00",
                      "id": 2877,
                      "image": {
                          "alt": "",
                          "created_at": "2015-04-12T15:57:31.263+08:00",
                          "file_name": "80.jpeg",
                          "id": 12720,
                          "position": 1,
                          "product_id": 3531,
                          "src": "https://asset.ibanquan.com/image/552a256b8757db62920001ed/s.jpeg?v=1428825451",
                          "updated_at": "2015-04-12T15:57:31.263+08:00",
                          "variant_ids": [
                              12177
                          ]
                      },
                      "name": "梵·SCP200",
                      "options_desc": "尺码:白色,颜色:M",
                      "price": 0.01,
                      "quantity": 1,
                      "updated_at": "2015-04-29T23:09:51.200+08:00",
                      "volume": 0,
                      "weight": 0.2
                  },
                  {
                      "barcode": "SPC00002",
                      "created_at": "2015-04-29T23:09:51.200+08:00",
                      "id": 2878,
                      "image": {
                          "alt": "",
                          "created_at": "2015-04-12T15:57:31.263+08:00",
                          "file_name": "80.jpeg",
                          "id": 12720,
                          "position": 1,
                          "product_id": 3531,
                          "src": "https://asset.ibanquan.com/image/552a256b8757db62920001ed/s.jpeg?v=1428825451",
                          "updated_at": "2015-04-12T15:57:31.263+08:00",
                          "variant_ids": [
                              12177
                          ]
                      },
                      "name": "梵·SCP200",
                      "options_desc": "尺码:白色,颜色:L",
                      "price": 0.02,
                      "quantity": 1,
                      "updated_at": "2015-04-29T23:09:51.200+08:00",
                      "volume": 0,
                      "weight": 0.2
                  }
              ],
              "notes": [
              ],
              "order_no": "2015042948782651",
              "payment_method": {
                  "gateway": "alipay",
                  "id": 364,
                  "name": "支付宝(即时到帐) - 自主配置",
                  "pay_type": "alipay"
              },
              "payment_method_type": "online",
              "payment_status": "paid",
              "payments": [
                  {
                      "amount": 0.03,
                      "bank_code": "",
                      "created_at": "2015-04-29T23:09:51.200+08:00",
                      "exipired_at": "2015-05-01T03:00:00.000+08:00",
                      "gateway_payment_no": "2015042900001000020050455019",
                      "id": 2288,
                      "mode": "online",
                      "payment_method": {
                          "gateway": "alipay",
                          "id": 364,
                          "name": "支付宝(即时到帐) - 自主配置",
                          "pay_type": "alipay"
                      },
                      "status": "paid",
                      "updated_at": "2015-04-29T23:10:34.741+08:00"
                  }
              ],
              "processed_at": "2015-04-29T23:09:51.200+08:00",
              "processing_method": "direct",
              "purchase_ip": "113.88.197.83",
              "shipment_amount": 0,
              "shipment_status": "pending",
              "shipments": [
                  {
                      "amount": 0,
                      "auto_received_at": "2015-05-29T03:00:00.000+08:00",
                      "created_at": "2015-04-29T23:09:51.200+08:00",
                      "id": 2316,
                      "items": [
                          {
                              "barcode": "SPC00001",
                              "created_at": "2015-04-29T23:09:51.200+08:00",
                              "id": 2877,
                              "image": {
                                  "alt": "",
                                  "created_at": "2015-04-12T15:57:31.263+08:00",
                                  "file_name": "80.jpeg",
                                  "id": 12720,
                                  "position": 1,
                                  "product_id": 3531,
                                  "src": "https://asset.ibanquan.com/image/552a256b8757db62920001ed/s.jpeg?v=1428825451",
                                  "updated_at": "2015-04-12T15:57:31.263+08:00",
                                  "variant_ids": [
                                      12177
                                  ]
                              },
                              "name": "梵·SCP200",
                              "options_desc": "尺码:白色,颜色:M",
                              "price": 0.01,
                              "quantity": 1,
                              "updated_at": "2015-04-29T23:09:51.200+08:00",
                              "volume": 0,
                              "weight": 0.2
                          },
                          {
                              "barcode": "SPC00002",
                              "created_at": "2015-04-29T23:09:51.200+08:00",
                              "id": 2878,
                              "image": {
                                  "alt": "",
                                  "created_at": "2015-04-12T15:57:31.263+08:00",
                                  "file_name": "80.jpeg",
                                  "id": 12720,
                                  "position": 1,
                                  "product_id": 3531,
                                  "src": "https://asset.ibanquan.com/image/552a256b8757db62920001ed/s.jpeg?v=1428825451",
                                  "updated_at": "2015-04-12T15:57:31.263+08:00",
                                  "variant_ids": [
                                      12177
                                  ]
                              },
                              "name": "梵·SCP200",
                              "options_desc": "尺码:白色,颜色:L",
                              "price": 0.02,
                              "quantity": 1,
                              "updated_at": "2015-04-29T23:09:51.200+08:00",
                              "volume": 0,
                              "weight": 0.2
                          }
                      ],
                      "serial_number": "01",
                      "ship_no": "",
                      "ship_type": "express",
                      "shipment_supplier": null,
                      "status": "pending",
                      "updated_at": "2015-04-29T23:09:51.200+08:00"
                  }
              ],
              "status": "processing",
              "total_amount": 0.03,
              "updated_at": "2015-04-29T23:09:51.200+08:00"
          },
          {
              "address": {
                  "city": "深圳市",
                  "city_code": "440300",
                  "complete_address": "中国,广东省,深圳市,南山区,科技园新西路7号兰光科技园B801",
                  "country": "中国",
                  "country_code": "CN",
                  "district": "南山区",
                  "district_code": "440305",
                  "email": "",
                  "mobile": "0755-83051027",
                  "name": "友好速搭",
                  "province": "广东省",
                  "province_code": "440000",
                  "telephone": "",
                  "zipcode": null
              },
              "auto_total_amount": 0.06,
              "closed_at": "2015-04-29T23:10:57.778+08:00",
              "created_at": "2015-04-29T23:10:57.778+08:00",
              "customer": {
                  "addresses": [
                      {
                          "city": "深圳市",
                          "city_code": "440300",
                          "completed_address": "中国,广东省,深圳市,南山区,科技园新西路7号兰光科技园B801",
                          "country": "中国",
                          "country_code": "CN",
                          "created_at": "2015-04-29T23:09:41.167+08:00",
                          "detail": "科技园新西路7号兰光科技园B801",
                          "district": "南山区",
                          "district_code": "440305",
                          "email": "",
                          "id": 1597,
                          "is_default": true,
                          "mobile": "0755-83051027",
                          "name": "友好速搭",
                          "province": "广东省",
                          "province_code": "440000",
                          "telephone": "",
                          "updated_at": "2015-04-29T23:09:41.167+08:00",
                          "zipcode": null
                      }
                  ],
                  "avatar": null,
                  "created_at": "2015-04-29T23:08:13.665+08:00",
                  "id": 4028,
                  "name": "test",
                  "notify_email": "test@yeezon.com",
                  "notify_phone": "",
                  "reg_identity": "test@yeezon.com",
                  "reg_type": "email",
                  "updated_at": "2015-04-29T23:08:27.770+08:00"
              },
              "customer_remarks": "",
              "discount_amount": 0,
              "id": 2332,
              "item_amount": 0.06,
              "items": [
                  {
                      "barcode": "SPC00001",
                      "created_at": "2015-04-29T23:10:57.778+08:00",
                      "id": 2879,
                      "image": {
                          "alt": "",
                          "created_at": "2015-04-12T15:57:31.263+08:00",
                          "file_name": "80.jpeg",
                          "id": 12720,
                          "position": 1,
                          "product_id": 3531,
                          "src": "https://asset.ibanquan.com/image/552a256b8757db62920001ed/s.jpeg?v=1428825451",
                          "updated_at": "2015-04-12T15:57:31.263+08:00",
                          "variant_ids": [
                              12177
                          ]
                      },
                      "name": "梵·SCP200",
                      "options_desc": "尺码:白色,颜色:L",
                      "price": 0.02,
                      "quantity": 3,
                      "updated_at": "2015-04-29T23:10:57.778+08:00",
                      "volume": 0,
                      "weight": 0.2
                  }
              ],
              "notes": [
              ],
              "order_no": "2015042948963282",
              "payment_method": {
                  "gateway": "wppay",
                  "id": 11756,
                  "name": "微信支付 - 代收",
                  "pay_type": "wppay"
              },
              "payment_method_type": "online",
              "payment_status": "paid",
              "payments": [
                  {
                      "amount": 0.06,
                      "bank_code": "",
                      "created_at": "2015-04-29T23:10:57.778+08:00",
                      "exipired_at": "2015-05-01T03:00:00.000+08:00",
                      "gateway_payment_no": "1001760211201504290098766161",
                      "id": 2289,
                      "mode": "online",
                      "payment_method": {
                          "gateway": "wppay",
                          "id": 11756,
                          "name": "微信支付 - 代收",
                          "pay_type": "wppay"
                      },
                      "status": "paid",
                      "updated_at": "2015-04-29T23:13:32.897+08:00"
                  }
              ],
              "processed_at": "2015-04-29T23:10:57.778+08:00",
              "processing_method": "direct",
              "purchase_ip": "113.88.197.83",
              "shipment_amount": 0,
              "shipment_status": "recieved",
              "shipments": [
                  {
                      "amount": 0,
                      "auto_received_at": "2015-05-13T03:00:00.000+08:00",
                      "created_at": "2015-04-29T23:10:57.778+08:00",
                      "id": 2317,
                      "items": [
                          {
                              "barcode": "SPC00001",
                              "created_at": "2015-04-29T23:10:57.778+08:00",
                              "id": 2879,
                              "image": {
                                  "alt": "",
                                  "created_at": "2015-04-12T15:57:31.263+08:00",
                                  "file_name": "80.jpeg",
                                  "id": 12720,
                                  "position": 1,
                                  "product_id": 3531,
                                  "src": "https://asset.ibanquan.com/image/552a256b8757db62920001ed/s.jpeg?v=1428825451",
                                  "updated_at": "2015-04-12T15:57:31.263+08:00",
                                  "variant_ids": [
                                      12177
                                  ]
                              },
                              "name": "梵·SCP200",
                              "options_desc": "尺码:白色,颜色:L",
                              "price": 0.02,
                              "quantity": 3,
                              "updated_at": "2015-04-29T23:10:57.778+08:00",
                              "volume": 0,
                              "weight": 0.2
                          }
                      ],
                      "serial_number": "01",
                      "ship_no": "204997145429",
                      "ship_type": "express",
                      "shipment_supplier": {
                          "id": 2,
                          "code": "shunfeng",
                          "name": "顺丰速递"
                      },
                      "status": "recieve",
                      "updated_at": "2015-04-29T23:15:06.909+08:00"
                  }
              ],
              "status": "achieved",
              "total_amount": 0.06,
              "updated_at": "2015-04-29T23:10:57.778+08:00"
          },
          {
              "address": {
                  "city": "深圳市",
                  "city_code": "440300",
                  "complete_address": "中国,广东省,深圳市,南山区,科技园新西路7号兰光科技园B801",
                  "country": "中国",
                  "country_code": "CN",
                  "district": "南山区",
                  "district_code": "440305",
                  "email": "",
                  "mobile": "0755-83051027",
                  "name": "友好速搭",
                  "province": "广东省",
                  "province_code": "440000",
                  "telephone": "",
                  "zipcode": null
              },
              "auto_total_amount": 0.01,
              "closed_at": null,
              "created_at": "2015-04-29T23:11:18.926+08:00",
              "customer": {
                  "addresses": [
                      {
                          "city": "深圳市",
                          "city_code": "440300",
                          "completed_address": "中国,广东省,深圳市,南山区,科技园新西路7号兰光科技园B801",
                          "country": "中国",
                          "country_code": "CN",
                          "created_at": "2015-04-29T23:09:41.167+08:00",
                          "detail": "科技园新西路7号兰光科技园B801",
                          "district": "南山区",
                          "district_code": "440305",
                          "email": "",
                          "id": 1597,
                          "is_default": true,
                          "mobile": "0755-83051027",
                          "name": "友好速搭",
                          "province": "广东省",
                          "province_code": "440000",
                          "telephone": "",
                          "updated_at": "2015-04-29T23:09:41.167+08:00",
                          "zipcode": null
                      }
                  ],
                  "avatar": null,
                  "created_at": "2015-04-29T23:08:13.665+08:00",
                  "id": 4028,
                  "name": "test",
                  "notify_email": "test@yeezon.com",
                  "notify_phone": "",
                  "reg_identity": "test@yeezon.com",
                  "reg_type": "email",
                  "updated_at": "2015-04-29T23:08:27.770+08:00"
              },
              "customer_remarks": "",
              "discount_amount": 0,
              "id": 2333,
              "item_amount": 0.01,
              "items": [
                  {
                      "barcode": "SPC00001",
                      "created_at": "2015-04-29T23:11:18.926+08:00",
                      "id": 2880,
                      "image": {
                          "alt": "",
                          "created_at": "2015-04-12T15:57:31.263+08:00",
                          "file_name": "80.jpeg",
                          "id": 12720,
                          "position": 1,
                          "product_id": 3531,
                          "src": "https://asset.ibanquan.com/image/552a256b8757db62920001ed/s.jpeg?v=1428825451",
                          "updated_at": "2015-04-12T15:57:31.263+08:00",
                          "variant_ids": [
                              12177
                          ]
                      },
                      "name": "梵·SCP200",
                      "options_desc": "尺码:白色,颜色:M",
                      "price": 0.01,
                      "quantity": 1,
                      "updated_at": "2015-04-29T23:11:18.926+08:00",
                      "volume": 0,
                      "weight": 0.2
                  }
              ],
              "notes": [
              ],
              "order_no": "2015042948862351",
              "payment_method": {
                  "gateway": "alipay",
                  "id": 7911,
                  "name": "支付宝(网银直联) - 代收",
                  "pay_type": "alipay_bank"
              },
              "payment_method_type": "online",
              "payment_status": "pending",
              "payments": [
                  {
                      "amount": 0.01,
                      "bank_code": "中国建设银行",
                      "created_at": "2015-04-29T23:11:18.926+08:00",
                      "exipired_at": "2015-05-01T03:00:00.000+08:00",
                      "gateway_payment_no": null,
                      "id": 2290,
                      "mode": "online",
                      "payment_method": {
                          "gateway": "alipay",
                          "id": 7911,
                          "name": "支付宝(网银直联) - 代收",
                          "pay_type": "alipay_bank"
                      },
                      "status": "pending",
                      "updated_at": "2015-04-29T23:11:18.926+08:00"
                  }
              ],
              "processed_at": "2015-04-29T23:11:18.926+08:00",
              "processing_method": "direct",
              "purchase_ip": "113.88.197.83",
              "shipment_amount": 0,
              "shipment_status": "pending",
              "shipments": [
                  {
                      "amount": 0,
                      "auto_received_at": "2015-05-29T03:00:00.000+08:00",
                      "created_at": "2015-04-29T23:11:18.926+08:00",
                      "id": 2318,
                      "items": [
                          {
                              "barcode": "SPC00001",
                              "created_at": "2015-04-29T23:11:18.926+08:00",
                              "id": 2880,
                              "image": {
                                  "alt": "",
                                  "created_at": "2015-04-12T15:57:31.263+08:00",
                                  "file_name": "80.jpeg",
                                  "id": 12720,
                                  "position": 1,
                                  "product_id": 3531,
                                  "src": "https://asset.ibanquan.com/image/552a256b8757db62920001ed/s.jpeg?v=1428825451",
                                  "updated_at": "2015-04-12T15:57:31.263+08:00",
                                  "variant_ids": [
                                      12177
                                  ]
                              },
                              "name": "梵·SCP200",
                              "options_desc": "尺码:白色,颜色:M",
                              "price": 0.01,
                              "quantity": 1,
                              "updated_at": "2015-04-29T23:11:18.926+08:00",
                              "volume": 0,
                              "weight": 0.2
                          }
                      ],
                      "serial_number": "01",
                      "ship_no": "",
                      "ship_type": "express",
                      "shipment_supplier": null,
                      "status": "pending",
                      "updated_at": "2015-04-29T23:11:18.926+08:00"
                  }
              ],
              "status": "processing",
              "total_amount": 0.01,
              "updated_at": "2015-04-29T23:11:18.926+08:00"
          }
      ]
      }
      
    • 获取指定id范围的Order列表
    • GET /orders?ids=2332,2333
    • HTTP/1.1 200 OK

      {
      "orders": [
          {
              "address": {
                  "city": "深圳市",
                  "city_code": "440300",
                  "complete_address": "中国,广东省,深圳市,南山区,科技园新西路7号兰光科技园B801",
                  "country": "中国",
                  "country_code": "CN",
                  "district": "南山区",
                  "district_code": "440305",
                  "email": "",
                  "mobile": "0755-83051027",
                  "name": "友好速搭",
                  "province": "广东省",
                  "province_code": "440000",
                  "telephone": "",
                  "zipcode": null
              },
              "auto_total_amount": 0.06,
              "closed_at": "2015-04-29T23:10:57.778+08:00",
              "created_at": "2015-04-29T23:10:57.778+08:00",
              "customer": {
                  "addresses": [
                      {
                          "city": "深圳市",
                          "city_code": "440300",
                          "completed_address": "中国,广东省,深圳市,南山区,科技园新西路7号兰光科技园B801",
                          "country": "中国",
                          "country_code": "CN",
                          "created_at": "2015-04-29T23:09:41.167+08:00",
                          "detail": "科技园新西路7号兰光科技园B801",
                          "district": "南山区",
                          "district_code": "440305",
                          "email": "",
                          "id": 1597,
                          "is_default": true,
                          "mobile": "0755-83051027",
                          "name": "友好速搭",
                          "province": "广东省",
                          "province_code": "440000",
                          "telephone": "",
                          "updated_at": "2015-04-29T23:09:41.167+08:00",
                          "zipcode": null
                      }
                  ],
                  "avatar": null,
                  "created_at": "2015-04-29T23:08:13.665+08:00",
                  "id": 4028,
                  "name": "test",
                  "notify_email": "test@yeezon.com",
                  "notify_phone": "",
                  "reg_identity": "test@yeezon.com",
                  "reg_type": "email",
                  "updated_at": "2015-04-29T23:08:27.770+08:00"
              },
              "customer_remarks": "",
              "discount_amount": 0,
              "id": 2332,
              "item_amount": 0.06,
              "items": [
                  {
                      "barcode": "SPC00001",
                      "created_at": "2015-04-29T23:10:57.778+08:00",
                      "id": 2879,
                      "image": {
                          "alt": "",
                          "created_at": "2015-04-12T15:57:31.263+08:00",
                          "file_name": "80.jpeg",
                          "id": 12720,
                          "position": 1,
                          "product_id": 3531,
                          "src": "https://asset.ibanquan.com/image/552a256b8757db62920001ed/s.jpeg?v=1428825451",
                          "updated_at": "2015-04-12T15:57:31.263+08:00",
                          "variant_ids": [
                              12177
                          ]
                      },
                      "name": "梵·SCP200",
                      "options_desc": "尺码:白色,颜色:L",
                      "price": 0.02,
                      "quantity": 3,
                      "updated_at": "2015-04-29T23:10:57.778+08:00",
                      "volume": 0,
                      "weight": 0.2
                  }
              ],
              "notes": [
              ],
              "order_no": "2015042948963282",
              "payment_method": {
                  "gateway": "wppay",
                  "id": 11756,
                  "name": "微信支付 - 代收",
                  "pay_type": "wppay"
              },
              "payment_method_type": "online",
              "payment_status": "paid",
              "payments": [
                  {
                      "amount": 0.06,
                      "bank_code": "",
                      "created_at": "2015-04-29T23:10:57.778+08:00",
                      "exipired_at": "2015-05-01T03:00:00.000+08:00",
                      "gateway_payment_no": "1001760211201504290098766161",
                      "id": 2289,
                      "mode": "online",
                      "payment_method": {
                          "gateway": "wppay",
                          "id": 11756,
                          "name": "微信支付 - 代收",
                          "pay_type": "wppay"
                      },
                      "status": "paid",
                      "updated_at": "2015-04-29T23:13:32.897+08:00"
                  }
              ],
              "processed_at": "2015-04-29T23:10:57.778+08:00",
              "processing_method": "direct",
              "purchase_ip": "113.88.197.83",
              "shipment_amount": 0,
              "shipment_status": "recieved",
              "shipments": [
                  {
                      "amount": 0,
                      "auto_received_at": "2015-05-13T03:00:00.000+08:00",
                      "created_at": "2015-04-29T23:10:57.778+08:00",
                      "id": 2317,
                      "items": [
                          {
                              "barcode": "SPC00001",
                              "created_at": "2015-04-29T23:10:57.778+08:00",
                              "id": 2879,
                              "image": {
                                  "alt": "",
                                  "created_at": "2015-04-12T15:57:31.263+08:00",
                                  "file_name": "80.jpeg",
                                  "id": 12720,
                                  "position": 1,
                                  "product_id": 3531,
                                  "src": "https://asset.ibanquan.com/image/552a256b8757db62920001ed/s.jpeg?v=1428825451",
                                  "updated_at": "2015-04-12T15:57:31.263+08:00",
                                  "variant_ids": [
                                      12177
                                  ]
                              },
                              "name": "梵·SCP200",
                              "options_desc": "尺码:白色,颜色:L",
                              "price": 0.02,
                              "quantity": 3,
                              "updated_at": "2015-04-29T23:10:57.778+08:00",
                              "volume": 0,
                              "weight": 0.2
                          }
                      ],
                      "serial_number": "01",
                      "ship_no": "204997145429",
                      "ship_type": "express",
                      "shipment_supplier": {
                          "id": 2,
                          "code": "shunfeng",
                          "name": "顺丰速递"
                      },
                      "status": "recieve",
                      "updated_at": "2015-04-29T23:15:06.909+08:00"
                  }
              ],
              "status": "achieved",
              "total_amount": 0.06,
              "updated_at": "2015-04-29T23:10:57.778+08:00"
          },
          {
              "address": {
                  "city": "深圳市",
                  "city_code": "440300",
                  "complete_address": "中国,广东省,深圳市,南山区,科技园新西路7号兰光科技园B801",
                  "country": "中国",
                  "country_code": "CN",
                  "district": "南山区",
                  "district_code": "440305",
                  "email": "",
                  "mobile": "0755-83051027",
                  "name": "友好速搭",
                  "province": "广东省",
                  "province_code": "440000",
                  "telephone": "",
                  "zipcode": null
              },
              "auto_total_amount": 0.01,
              "closed_at": null,
              "created_at": "2015-04-29T23:11:18.926+08:00",
              "customer": {
                  "addresses": [
                      {
                          "city": "深圳市",
                          "city_code": "440300",
                          "completed_address": "中国,广东省,深圳市,南山区,科技园新西路7号兰光科技园B801",
                          "country": "中国",
                          "country_code": "CN",
                          "created_at": "2015-04-29T23:09:41.167+08:00",
                          "detail": "科技园新西路7号兰光科技园B801",
                          "district": "南山区",
                          "district_code": "440305",
                          "email": "",
                          "id": 1597,
                          "is_default": true,
                          "mobile": "0755-83051027",
                          "name": "友好速搭",
                          "province": "广东省",
                          "province_code": "440000",
                          "telephone": "",
                          "updated_at": "2015-04-29T23:09:41.167+08:00",
                          "zipcode": null
                      }
                  ],
                  "avatar": null,
                  "created_at": "2015-04-29T23:08:13.665+08:00",
                  "id": 4028,
                  "name": "test",
                  "notify_email": "test@yeezon.com",
                  "notify_phone": "",
                  "reg_identity": "test@yeezon.com",
                  "reg_type": "email",
                  "updated_at": "2015-04-29T23:08:27.770+08:00"
              },
              "customer_remarks": "",
              "discount_amount": 0,
              "id": 2333,
              "item_amount": 0.01,
              "items": [
                  {
                      "barcode": "SPC00001",
                      "created_at": "2015-04-29T23:11:18.926+08:00",
                      "id": 2880,
                      "image": {
                          "alt": "",
                          "created_at": "2015-04-12T15:57:31.263+08:00",
                          "file_name": "80.jpeg",
                          "id": 12720,
                          "position": 1,
                          "product_id": 3531,
                          "src": "https://asset.ibanquan.com/image/552a256b8757db62920001ed/s.jpeg?v=1428825451",
                          "updated_at": "2015-04-12T15:57:31.263+08:00",
                          "variant_ids": [
                              12177
                          ]
                      },
                      "name": "梵·SCP200",
                      "options_desc": "尺码:白色,颜色:M",
                      "price": 0.01,
                      "quantity": 1,
                      "updated_at": "2015-04-29T23:11:18.926+08:00",
                      "volume": 0,
                      "weight": 0.2
                  }
              ],
              "notes": [
              ],
              "order_no": "2015042948862351",
              "payment_method": {
                  "gateway": "alipay",
                  "id": 7911,
                  "name": "支付宝(网银直联) - 代收",
                  "pay_type": "alipay_bank"
              },
              "payment_method_type": "online",
              "payment_status": "pending",
              "payments": [
                  {
                      "amount": 0.01,
                      "bank_code": "中国建设银行",
                      "created_at": "2015-04-29T23:11:18.926+08:00",
                      "exipired_at": "2015-05-01T03:00:00.000+08:00",
                      "gateway_payment_no": null,
                      "id": 2290,
                      "mode": "online",
                      "payment_method": {
                          "gateway": "alipay",
                          "id": 7911,
                          "name": "支付宝(网银直联) - 代收",
                          "pay_type": "alipay_bank"
                      },
                      "status": "pending",
                      "updated_at": "2015-04-29T23:11:18.926+08:00"
                  }
              ],
              "processed_at": "2015-04-29T23:11:18.926+08:00",
              "processing_method": "direct",
              "purchase_ip": "113.88.197.83",
              "shipment_amount": 0,
              "shipment_status": "pending",
              "shipments": [
                  {
                      "amount": 0,
                      "auto_received_at": "2015-05-29T03:00:00.000+08:00",
                      "created_at": "2015-04-29T23:11:18.926+08:00",
                      "id": 2318,
                      "items": [
                          {
                              "barcode": "SPC00001",
                              "created_at": "2015-04-29T23:11:18.926+08:00",
                              "id": 2880,
                              "image": {
                                  "alt": "",
                                  "created_at": "2015-04-12T15:57:31.263+08:00",
                                  "file_name": "80.jpeg",
                                  "id": 12720,
                                  "position": 1,
                                  "product_id": 3531,
                                  "src": "https://asset.ibanquan.com/image/552a256b8757db62920001ed/s.jpeg?v=1428825451",
                                  "updated_at": "2015-04-12T15:57:31.263+08:00",
                                  "variant_ids": [
                                      12177
                                  ]
                              },
                              "name": "梵·SCP200",
                              "options_desc": "尺码:白色,颜色:M",
                              "price": 0.01,
                              "quantity": 1,
                              "updated_at": "2015-04-29T23:11:18.926+08:00",
                              "volume": 0,
                              "weight": 0.2
                          }
                      ],
                      "serial_number": "01",
                      "ship_no": "",
                      "ship_type": "express",
                      "shipment_supplier": null,
                      "status": "pending",
                      "updated_at": "2015-04-29T23:11:18.926+08:00"
                  }
              ],
              "status": "processing",
              "total_amount": 0.01,
              "updated_at": "2015-04-29T23:11:18.926+08:00"
          }
      ]
      }
      
    • 获取Order列表,只显示部分字段
    • GET /orders?fields=id,order_no,payment_status
    • HTTP/1.1 200 OK

      {
      "orders": [
          {
              "id": 2331,
              "order_no": "2015042948782651",
              "payment_status": "paid"
          },
          {
              "id": 2332,
              "order_no": "2015042948963282",
              "payment_status": "paid"
          },
          {
              "id": 2333,
              "order_no": "2015042948862351",
              "payment_status": "pending"
          }
      ]
      }
      
    • 获取模糊匹配order_no的Order列表
    • GET /orders?order_no=948862351
    • HTTP/1.1 200 OK

      {
      "orders": [
          {
              "address": {
                  "city": "深圳市",
                  "city_code": "440300",
                  "complete_address": "中国,广东省,深圳市,南山区,科技园新西路7号兰光科技园B801",
                  "country": "中国",
                  "country_code": "CN",
                  "district": "南山区",
                  "district_code": "440305",
                  "email": "",
                  "mobile": "0755-83051027",
                  "name": "友好速搭",
                  "province": "广东省",
                  "province_code": "440000",
                  "telephone": "",
                  "zipcode": null
              },
              "auto_total_amount": 0.01,
              "closed_at": null,
              "created_at": "2015-04-29T23:11:18.926+08:00",
              "customer": {
                  "addresses": [
                      {
                          "city": "深圳市",
                          "city_code": "440300",
                          "completed_address": "中国,广东省,深圳市,南山区,科技园新西路7号兰光科技园B801",
                          "country": "中国",
                          "country_code": "CN",
                          "created_at": "2015-04-29T23:09:41.167+08:00",
                          "detail": "科技园新西路7号兰光科技园B801",
                          "district": "南山区",
                          "district_code": "440305",
                          "email": "",
                          "id": 1597,
                          "is_default": true,
                          "mobile": "0755-83051027",
                          "name": "友好速搭",
                          "province": "广东省",
                          "province_code": "440000",
                          "telephone": "",
                          "updated_at": "2015-04-29T23:09:41.167+08:00",
                          "zipcode": null
                      }
                  ],
                  "avatar": null,
                  "created_at": "2015-04-29T23:08:13.665+08:00",
                  "id": 4028,
                  "name": "test",
                  "notify_email": "test@yeezon.com",
                  "notify_phone": "",
                  "reg_identity": "test@yeezon.com",
                  "reg_type": "email",
                  "updated_at": "2015-04-29T23:08:27.770+08:00"
              },
              "customer_remarks": "",
              "discount_amount": 0,
              "id": 2333,
              "item_amount": 0.01,
              "items": [
                  {
                      "barcode": "SPC00001",
                      "created_at": "2015-04-29T23:11:18.926+08:00",
                      "id": 2880,
                      "image": {
                          "alt": "",
                          "created_at": "2015-04-12T15:57:31.263+08:00",
                          "file_name": "80.jpeg",
                          "id": 12720,
                          "position": 1,
                          "product_id": 3531,
                          "src": "https://asset.ibanquan.com/image/552a256b8757db62920001ed/s.jpeg?v=1428825451",
                          "updated_at": "2015-04-12T15:57:31.263+08:00",
                          "variant_ids": [
                              12177
                          ]
                      },
                      "name": "梵·SCP200",
                      "options_desc": "尺码:白色,颜色:M",
                      "price": 0.01,
                      "quantity": 1,
                      "updated_at": "2015-04-29T23:11:18.926+08:00",
                      "volume": 0,
                      "weight": 0.2
                  }
              ],
              "notes": [
              ],
              "order_no": "2015042948862351",
              "payment_method": {
                  "gateway": "alipay",
                  "id": 7911,
                  "name": "支付宝(网银直联) - 代收",
                  "pay_type": "alipay_bank"
              },
              "payment_method_type": "online",
              "payment_status": "pending",
              "payments": [
                  {
                      "amount": 0.01,
                      "bank_code": "中国建设银行",
                      "created_at": "2015-04-29T23:11:18.926+08:00",
                      "exipired_at": "2015-05-01T03:00:00.000+08:00",
                      "gateway_payment_no": null,
                      "id": 2290,
                      "mode": "online",
                      "payment_method": {
                          "gateway": "alipay",
                          "id": 7911,
                          "name": "支付宝(网银直联) - 代收",
                          "pay_type": "alipay_bank"
                      },
                      "status": "pending",
                      "updated_at": "2015-04-29T23:11:18.926+08:00"
                  }
              ],
              "processed_at": "2015-04-29T23:11:18.926+08:00",
              "processing_method": "direct",
              "purchase_ip": "113.88.197.83",
              "shipment_amount": 0,
              "shipment_status": "pending",
              "shipments": [
                  {
                      "amount": 0,
                      "auto_received_at": "2015-05-29T03:00:00.000+08:00",
                      "created_at": "2015-04-29T23:11:18.926+08:00",
                      "id": 2318,
                      "items": [
                          {
                              "barcode": "SPC00001",
                              "created_at": "2015-04-29T23:11:18.926+08:00",
                              "id": 2880,
                              "image": {
                                  "alt": "",
                                  "created_at": "2015-04-12T15:57:31.263+08:00",
                                  "file_name": "80.jpeg",
                                  "id": 12720,
                                  "position": 1,
                                  "product_id": 3531,
                                  "src": "https://asset.ibanquan.com/image/552a256b8757db62920001ed/s.jpeg?v=1428825451",
                                  "updated_at": "2015-04-12T15:57:31.263+08:00",
                                  "variant_ids": [
                                      12177
                                  ]
                              },
                              "name": "梵·SCP200",
                              "options_desc": "尺码:白色,颜色:M",
                              "price": 0.01,
                              "quantity": 1,
                              "updated_at": "2015-04-29T23:11:18.926+08:00",
                              "volume": 0,
                              "weight": 0.2
                          }
                      ],
                      "serial_number": "01",
                      "ship_no": "",
                      "ship_type": "express",
                      "shipment_supplier": null,
                      "status": "pending",
                      "updated_at": "2015-04-29T23:11:18.926+08:00"
                  }
              ],
              "status": "processing",
              "total_amount": 0.01,
              "updated_at": "2015-04-29T23:11:18.926+08:00"
          }
      ]
      }
      
    • 获取指定id之后的Order列表
    • GET /orders?since_id=2331
    • HTTP/1.1 200 OK

      {
      "orders": [
          {
              "address": {
                  "city": "深圳市",
                  "city_code": "440300",
                  "complete_address": "中国,广东省,深圳市,南山区,科技园新西路7号兰光科技园B801",
                  "country": "中国",
                  "country_code": "CN",
                  "district": "南山区",
                  "district_code": "440305",
                  "email": "",
                  "mobile": "0755-83051027",
                  "name": "友好速搭",
                  "province": "广东省",
                  "province_code": "440000",
                  "telephone": "",
                  "zipcode": null
              },
              "auto_total_amount": 0.06,
              "closed_at": "2015-04-29T23:10:57.778+08:00",
              "created_at": "2015-04-29T23:10:57.778+08:00",
              "customer": {
                  "addresses": [
                      {
                          "city": "深圳市",
                          "city_code": "440300",
                          "completed_address": "中国,广东省,深圳市,南山区,科技园新西路7号兰光科技园B801",
                          "country": "中国",
                          "country_code": "CN",
                          "created_at": "2015-04-29T23:09:41.167+08:00",
                          "detail": "科技园新西路7号兰光科技园B801",
                          "district": "南山区",
                          "district_code": "440305",
                          "email": "",
                          "id": 1597,
                          "is_default": true,
                          "mobile": "0755-83051027",
                          "name": "友好速搭",
                          "province": "广东省",
                          "province_code": "440000",
                          "telephone": "",
                          "updated_at": "2015-04-29T23:09:41.167+08:00",
                          "zipcode": null
                      }
                  ],
                  "avatar": null,
                  "created_at": "2015-04-29T23:08:13.665+08:00",
                  "id": 4028,
                  "name": "test",
                  "notify_email": "test@yeezon.com",
                  "notify_phone": "",
                  "reg_identity": "test@yeezon.com",
                  "reg_type": "email",
                  "updated_at": "2015-04-29T23:08:27.770+08:00"
              },
              "customer_remarks": "",
              "discount_amount": 0,
              "id": 2332,
              "item_amount": 0.06,
              "items": [
                  {
                      "barcode": "SPC00001",
                      "created_at": "2015-04-29T23:10:57.778+08:00",
                      "id": 2879,
                      "image": {
                          "alt": "",
                          "created_at": "2015-04-12T15:57:31.263+08:00",
                          "file_name": "80.jpeg",
                          "id": 12720,
                          "position": 1,
                          "product_id": 3531,
                          "src": "https://asset.ibanquan.com/image/552a256b8757db62920001ed/s.jpeg?v=1428825451",
                          "updated_at": "2015-04-12T15:57:31.263+08:00",
                          "variant_ids": [
                              12177
                          ]
                      },
                      "name": "梵·SCP200",
                      "options_desc": "尺码:白色,颜色:L",
                      "price": 0.02,
                      "quantity": 3,
                      "updated_at": "2015-04-29T23:10:57.778+08:00",
                      "volume": 0,
                      "weight": 0.2
                  }
              ],
              "notes": [
              ],
              "order_no": "2015042948963282",
              "payment_method": {
                  "gateway": "wppay",
                  "id": 11756,
                  "name": "微信支付 - 代收",
                  "pay_type": "wppay"
              },
              "payment_method_type": "online",
              "payment_status": "paid",
              "payments": [
                  {
                      "amount": 0.06,
                      "bank_code": "",
                      "created_at": "2015-04-29T23:10:57.778+08:00",
                      "exipired_at": "2015-05-01T03:00:00.000+08:00",
                      "gateway_payment_no": "1001760211201504290098766161",
                      "id": 2289,
                      "mode": "online",
                      "payment_method": {
                          "gateway": "wppay",
                          "id": 11756,
                          "name": "微信支付 - 代收",
                          "pay_type": "wppay"
                      },
                      "status": "paid",
                      "updated_at": "2015-04-29T23:13:32.897+08:00"
                  }
              ],
              "processed_at": "2015-04-29T23:10:57.778+08:00",
              "processing_method": "direct",
              "purchase_ip": "113.88.197.83",
              "shipment_amount": 0,
              "shipment_status": "recieved",
              "shipments": [
                  {
                      "amount": 0,
                      "auto_received_at": "2015-05-13T03:00:00.000+08:00",
                      "created_at": "2015-04-29T23:10:57.778+08:00",
                      "id": 2317,
                      "items": [
                          {
                              "barcode": "SPC00001",
                              "created_at": "2015-04-29T23:10:57.778+08:00",
                              "id": 2879,
                              "image": {
                                  "alt": "",
                                  "created_at": "2015-04-12T15:57:31.263+08:00",
                                  "file_name": "80.jpeg",
                                  "id": 12720,
                                  "position": 1,
                                  "product_id": 3531,
                                  "src": "https://asset.ibanquan.com/image/552a256b8757db62920001ed/s.jpeg?v=1428825451",
                                  "updated_at": "2015-04-12T15:57:31.263+08:00",
                                  "variant_ids": [
                                      12177
                                  ]
                              },
                              "name": "梵·SCP200",
                              "options_desc": "尺码:白色,颜色:L",
                              "price": 0.02,
                              "quantity": 3,
                              "updated_at": "2015-04-29T23:10:57.778+08:00",
                              "volume": 0,
                              "weight": 0.2
                          }
                      ],
                      "serial_number": "01",
                      "ship_no": "204997145429",
                      "ship_type": "express",
                      "shipment_supplier": {
                          "id": 2,
                          "code": "shunfeng",
                          "name": "顺丰速递"
                      },
                      "status": "recieve",
                      "updated_at": "2015-04-29T23:15:06.909+08:00"
                  }
              ],
              "status": "achieved",
              "total_amount": 0.06,
              "updated_at": "2015-04-29T23:10:57.778+08:00"
          },
          {
              "address": {
                  "city": "深圳市",
                  "city_code": "440300",
                  "complete_address": "中国,广东省,深圳市,南山区,科技园新西路7号兰光科技园B801",
                  "country": "中国",
                  "country_code": "CN",
                  "district": "南山区",
                  "district_code": "440305",
                  "email": "",
                  "mobile": "0755-83051027",
                  "name": "友好速搭",
                  "province": "广东省",
                  "province_code": "440000",
                  "telephone": "",
                  "zipcode": null
              },
              "auto_total_amount": 0.01,
              "closed_at": null,
              "created_at": "2015-04-29T23:11:18.926+08:00",
              "customer": {
                  "addresses": [
                      {
                          "city": "深圳市",
                          "city_code": "440300",
                          "completed_address": "中国,广东省,深圳市,南山区,科技园新西路7号兰光科技园B801",
                          "country": "中国",
                          "country_code": "CN",
                          "created_at": "2015-04-29T23:09:41.167+08:00",
                          "detail": "科技园新西路7号兰光科技园B801",
                          "district": "南山区",
                          "district_code": "440305",
                          "email": "",
                          "id": 1597,
                          "is_default": true,
                          "mobile": "0755-83051027",
                          "name": "友好速搭",
                          "province": "广东省",
                          "province_code": "440000",
                          "telephone": "",
                          "updated_at": "2015-04-29T23:09:41.167+08:00",
                          "zipcode": null
                      }
                  ],
                  "avatar": null,
                  "created_at": "2015-04-29T23:08:13.665+08:00",
                  "id": 4028,
                  "name": "test",
                  "notify_email": "test@yeezon.com",
                  "notify_phone": "",
                  "reg_identity": "test@yeezon.com",
                  "reg_type": "email",
                  "updated_at": "2015-04-29T23:08:27.770+08:00"
              },
              "customer_remarks": "",
              "discount_amount": 0,
              "id": 2333,
              "item_amount": 0.01,
              "items": [
                  {
                      "barcode": "SPC00001",
                      "created_at": "2015-04-29T23:11:18.926+08:00",
                      "id": 2880,
                      "image": {
                          "alt": "",
                          "created_at": "2015-04-12T15:57:31.263+08:00",
                          "file_name": "80.jpeg",
                          "id": 12720,
                          "position": 1,
                          "product_id": 3531,
                          "src": "https://asset.ibanquan.com/image/552a256b8757db62920001ed/s.jpeg?v=1428825451",
                          "updated_at": "2015-04-12T15:57:31.263+08:00",
                          "variant_ids": [
                              12177
                          ]
                      },
                      "name": "梵·SCP200",
                      "options_desc": "尺码:白色,颜色:M",
                      "price": 0.01,
                      "quantity": 1,
                      "updated_at": "2015-04-29T23:11:18.926+08:00",
                      "volume": 0,
                      "weight": 0.2
                  }
              ],
              "notes": [
              ],
              "order_no": "2015042948862351",
              "payment_method": {
                  "gateway": "alipay",
                  "id": 7911,
                  "name": "支付宝(网银直联) - 代收",
                  "pay_type": "alipay_bank"
              },
              "payment_method_type": "online",
              "payment_status": "pending",
              "payments": [
                  {
                      "amount": 0.01,
                      "bank_code": "中国建设银行",
                      "created_at": "2015-04-29T23:11:18.926+08:00",
                      "exipired_at": "2015-05-01T03:00:00.000+08:00",
                      "gateway_payment_no": null,
                      "id": 2290,
                      "mode": "online",
                      "payment_method": {
                          "gateway": "alipay",
                          "id": 7911,
                          "name": "支付宝(网银直联) - 代收",
                          "pay_type": "alipay_bank"
                      },
                      "status": "pending",
                      "updated_at": "2015-04-29T23:11:18.926+08:00"
                  }
              ],
              "processed_at": "2015-04-29T23:11:18.926+08:00",
              "processing_method": "direct",
              "purchase_ip": "113.88.197.83",
              "shipment_amount": 0,
              "shipment_status": "pending",
              "shipments": [
                  {
                      "amount": 0,
                      "auto_received_at": "2015-05-29T03:00:00.000+08:00",
                      "created_at": "2015-04-29T23:11:18.926+08:00",
                      "id": 2318,
                      "items": [
                          {
                              "barcode": "SPC00001",
                              "created_at": "2015-04-29T23:11:18.926+08:00",
                              "id": 2880,
                              "image": {
                                  "alt": "",
                                  "created_at": "2015-04-12T15:57:31.263+08:00",
                                  "file_name": "80.jpeg",
                                  "id": 12720,
                                  "position": 1,
                                  "product_id": 3531,
                                  "src": "https://asset.ibanquan.com/image/552a256b8757db62920001ed/s.jpeg?v=1428825451",
                                  "updated_at": "2015-04-12T15:57:31.263+08:00",
                                  "variant_ids": [
                                      12177
                                  ]
                              },
                              "name": "梵·SCP200",
                              "options_desc": "尺码:白色,颜色:M",
                              "price": 0.01,
                              "quantity": 1,
                              "updated_at": "2015-04-29T23:11:18.926+08:00",
                              "volume": 0,
                              "weight": 0.2
                          }
                      ],
                      "serial_number": "01",
                      "ship_no": "",
                      "ship_type": "express",
                      "shipment_supplier": null,
                      "status": "pending",
                      "updated_at": "2015-04-29T23:11:18.926+08:00"
                  }
              ],
              "status": "processing",
              "total_amount": 0.01,
              "updated_at": "2015-04-29T23:11:18.926+08:00"
          }
      ]
      }
      

GET /orders/count

获取Order数量

    • customer_id
    • 查询指定customer_id
    • order_no
    • 缺省筛选包含输入order_no值的Order
    • created_at_min
    • 缺省筛选创建时间在指定日期时间之后的Product(格式2014-09-01T01:00:01)
    • created_at_max
    • 缺省筛选创建时间在指定日期时间之前的Product(格式2014-09-01T01:00:01)
    • updated_at_min
    • 缺省筛选更新时间在指定日期时间之后的Product(格式2014-09-01T01:00:01)
    • updated_at_max
    • 缺省筛选更新时间在指定日期时间之前的Product(格式2014-09-01T01:00:01)
    • 获取Order数量
    • GET /orders/count
    • HTTP/1.1 200 OK

      {
      "count": 3
      }
      
    • 获取模糊匹配order_no的Order数量
    • GET /orders/count?order_no=948862351
    • HTTP/1.1 200 OK

      {
      "count": 2
      }
      

GET /orders/#{id}

获取单个Order

    • fields
    • ,拼接Response显示的字段
    • 获取单个Order
    • GET /orders/#{id}
    • HTTP/1.1 200 OK

      {
      "order": {
          "address": {
              "city": "深圳市",
              "city_code": "440300",
              "complete_address": "中国,广东省,深圳市,南山区,科技园新西路7号兰光科技园B801",
              "country": "中国",
              "country_code": "CN",
              "district": "南山区",
              "district_code": "440305",
              "email": "",
              "mobile": "0755-83051027",
              "name": "友好速搭",
              "province": "广东省",
              "province_code": "440000",
              "telephone": "",
              "zipcode": null
          },
          "auto_total_amount": 0.06,
          "closed_at": "2015-04-29T23:10:57.778+08:00",
          "created_at": "2015-04-29T23:10:57.778+08:00",
          "customer": {
              "addresses": [
                  {
                      "city": "深圳市",
                      "city_code": "440300",
                      "completed_address": "中国,广东省,深圳市,南山区,科技园新西路7号兰光科技园B801",
                      "country": "中国",
                      "country_code": "CN",
                      "created_at": "2015-04-29T23:09:41.167+08:00",
                      "detail": "科技园新西路7号兰光科技园B801",
                      "district": "南山区",
                      "district_code": "440305",
                      "email": "",
                      "id": 1597,
                      "is_default": true,
                      "mobile": "0755-83051027",
                      "name": "友好速搭",
                      "province": "广东省",
                      "province_code": "440000",
                      "telephone": "",
                      "updated_at": "2015-04-29T23:09:41.167+08:00",
                      "zipcode": null
                  }
              ],
              "avatar": null,
              "created_at": "2015-04-29T23:08:13.665+08:00",
              "id": 4028,
              "name": "test",
              "notify_email": "test@yeezon.com",
              "notify_phone": "",
              "reg_identity": "test@yeezon.com",
              "reg_type": "email",
              "updated_at": "2015-04-29T23:08:27.770+08:00"
          },
          "customer_remarks": "",
          "discount_amount": 0,
          "id": 2332,
          "item_amount": 0.06,
          "items": [
              {
                  "barcode": "SPC00001",
                  "created_at": "2015-04-29T23:10:57.778+08:00",
                  "id": 2879,
                  "image": {
                      "alt": "",
                      "created_at": "2015-04-12T15:57:31.263+08:00",
                      "file_name": "80.jpeg",
                      "id": 12720,
                      "position": 1,
                      "product_id": 3531,
                      "src": "https://asset.ibanquan.com/image/552a256b8757db62920001ed/s.jpeg?v=1428825451",
                      "updated_at": "2015-04-12T15:57:31.263+08:00",
                      "variant_ids": [
                          12177
                      ]
                  },
                  "name": "梵·SCP200",
                  "options_desc": "尺码:白色,颜色:L",
                  "price": 0.02,
                  "quantity": 3,
                  "updated_at": "2015-04-29T23:10:57.778+08:00",
                  "volume": 0,
                  "weight": 0.2
              }
          ],
          "notes": [
          ],
          "order_no": "2015042948963282",
          "payment_method": {
              "gateway": "wppay",
              "id": 11756,
              "name": "微信支付 - 代收",
              "pay_type": "wppay"
          },
          "payment_method_type": "online",
          "payment_status": "paid",
          "payments": [
              {
                  "amount": 0.06,
                  "bank_code": "",
                  "created_at": "2015-04-29T23:10:57.778+08:00",
                  "exipired_at": "2015-05-01T03:00:00.000+08:00",
                  "gateway_payment_no": "1001760211201504290098766161",
                  "id": 2289,
                  "mode": "online",
                  "payment_method": {
                      "gateway": "wppay",
                      "id": 11756,
                      "name": "微信支付 - 代收",
                      "pay_type": "wppay"
                  },
                  "status": "paid",
                  "updated_at": "2015-04-29T23:13:32.897+08:00"
              }
          ],
          "processed_at": "2015-04-29T23:10:57.778+08:00",
          "processing_method": "direct",
          "purchase_ip": "113.88.197.83",
          "shipment_amount": 0,
          "shipment_status": "recieved",
          "shipments": [
              {
                  "amount": 0,
                  "auto_received_at": "2015-05-13T03:00:00.000+08:00",
                  "created_at": "2015-04-29T23:10:57.778+08:00",
                  "id": 2317,
                  "items": [
                      {
                          "barcode": "SPC00001",
                          "created_at": "2015-04-29T23:10:57.778+08:00",
                          "id": 2879,
                          "image": {
                              "alt": "",
                              "created_at": "2015-04-12T15:57:31.263+08:00",
                              "file_name": "80.jpeg",
                              "id": 12720,
                              "position": 1,
                              "product_id": 3531,
                              "src": "https://asset.ibanquan.com/image/552a256b8757db62920001ed/s.jpeg?v=1428825451",
                              "updated_at": "2015-04-12T15:57:31.263+08:00",
                              "variant_ids": [
                                  12177
                              ]
                          },
                          "name": "梵·SCP200",
                          "options_desc": "尺码:白色,颜色:L",
                          "price": 0.02,
                          "quantity": 3,
                          "updated_at": "2015-04-29T23:10:57.778+08:00",
                          "volume": 0,
                          "weight": 0.2
                      }
                  ],
                  "serial_number": "01",
                  "ship_no": "204997145429",
                  "ship_type": "express",
                  "shipment_supplier": {
                      "id": 2,
                      "code": "shunfeng",
                      "name": "顺丰速递"
                  },
                  "status": "recieve",
                  "updated_at": "2015-04-29T23:15:06.909+08:00"
              }
          ],
          "refunds":[
              {
              "id": 266,
              "payment_method_id": 160789,
              "payment_id": 139615,
              "amount": 1,
              "status": "success",
              "gateway_trade_no": "2018050221001004660591803156",
              "trade_no": "2018050215059198245",
              "site_id": "e4030053391f4e9db5d498b25b8c05fa",
              "batch_no": "20180503152531776794429",
              "reason": "1111",
              "is_dealing": false,
              "created_at": "2018-05-03T11:22:46.996+08:00",
              "updated_at": "2018-05-03T11:22:47.366+08:00",
              "pay_type": "alipay",
              "payment_no": "2018050215059198245",
              "account_id": 11836,
              "fail_reason": null
              }
          ],   
          "status": "achieved",
          "total_amount": 0.06,
          "updated_at": "2015-04-29T23:10:57.778+08:00"
      }
      }
      
    • 获取单个Order,只显示部分字段
    • GET /ordres/#{id}?fields=id,order_no,payment_status
    • HTTP/1.1 200 OK

      {
      "order": {
          "id": 2332,
          "order_no": "2015042948963282",
          "payment_status": "paid"
      }
      }
      

PUT /orders/#{id}

修改 Order,现只能修改 Order.total_amount

    • 修改 Order 的订单价格,当且仅当 Order.payment_status 为 pending 时可修改,
      否则会返回以下错误
    • PUT /orders/#{id}
        {
            "order": {
                "total_amount": 63.8
            }
        }
      
    • HTTP/1.1 200 OK

      {
      "code": 422,
      "errors": [
          "订单状态不支持编辑"
      ]
      }
      
免费领取15天试用
立即注册
联系客服
微信咨询
微信二维码

领取免费试用资格

姓名 *

电话 *

公司名称

所在地区

意向产品

提交

提交成功

你好, XXX女士/先生 ,你的需求已提交成功,后续会有专门的客户经理与你电话联系。谢谢!