客户API / 获取某个客户详细信息

发布日期:2017-10-27
浏览次数:14
  

 

1.1 说明

 
路径 http://www.your_website_domain.com/FeiEditor/api_v1/shop/customers/{id}
方法 GET/POST
说明 根据客户的ID,获得客户的详细信息。包含用户系统的自定义字段以及订单信息。
 
 

1.2 参数

 
无。直接在URL中最后使用商品ID即可。例如:您需要获得一个商品ID为12345的商品的详细数据。您只需要发送请求到 http://www.your_website_domain.com/FeiEditor/api_v1/shop/customers/12345 即可。 特别需要提醒的是:http://www.your_website_domain.com/FeiEditor/api_v1/shop/customers?id=12345 是不合法的哦。
 
 

1.3 返回结果

 
正确结果
返回格式:JSON
{
  "customer": 
    {
      "id": 1,
      "created_at": "2017-10-10T18:00:00Z",
      "email": "demo@api.com",
      "first_name": "Demo",
      "last_name": "User",
      "username": "demouser01",
      "last_order_id": 123,
      "last_order_date": "2017-10-10T18:00:00Z",
      "orders_count": 10,
      "total_spent": "1034.58",
      "avatar_url": "",
      "billing_address": {
        "first_name": "",
        "last_name": "",
        "company": "",
        "address_1": "",
        "address_2": "",
        "city": "",
        "state": "",
        "postcode": "",
        "country": "",
        "email": "",
        "phone": ""
      },
      "shipping_address": {
        "first_name": "",
        "last_name": "",
        "company": "",
        "address_1": "",
        "address_2": "",
        "city": "",
        "state": "",
        "postcode": "",
        "country": ""
      }
    }
}
 

1.4 相关API

登录后即可发表评论,立即登录.

  API相关文档