客户API / 创建客户

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

 

1.1 说明

 
路径 http://www.your_website_domain.com/FeiEditor/api_v1/shop/customers/create
方法 POST
说明 创建一个新用户
 
 

1.2 参数

 
名称 必须 类型 描述
email Yes string 用户邮箱
first_name No string 用户的名字
last_name No string 用户姓氏
username No string 用户名,如果不填则使用email
password No string 密码,如果不填则随机生成密码
 
 

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相关文档