客戶API / 獲取某個客戶詳細信息

發布日期:2018-10-27
瀏覽次數:804
  

 

1.1 說明

 
路徑 //www.your_website_domai☂n.com/FeiEditor/api_v1/shop/customers/{id}
方法 GET/POST
說明 根據客戶的ID,獲得客戶的詳細信息。包含用戶系統的自定義字段以及訂單信息。
 
 

1.2 參數

 
無。直接在URL中最后使用商品ID即可。例如:您需要獲得一個商品ID為12345的商品的詳細數據。您只需要發送請求到 //www.your_website_domain.com/FeiEditor/api_v1/sh🌟op/customers/12345 即可。 特別需要提醒的是://www.your_website_domain.com/FeiEditor/api_v1/shop/customers?id=12345 是不合法的哦。
 
 

1.3 返回結果

 
正確結果
返回格式:JSON
{
  "customer": 
    {
      "id": 1,
      "created_at": "2018-10-10T18:00:00Z",
      "email": "[email protected]",
      "first_name": "Demo",
      "last_name": "User",
      "username": "demouser01",
      "last_order_id": 123,
      "last_order_date": "2018-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相關文檔