【问题标题】:BigCommerce customer attributes from client/store来自客户/商店的 BigCommerce 客户属性
【发布时间】:2019-08-27 13:12:54
【问题描述】:

我可以检索客户的

有一个当前客户 API - https://developer.bigcommerce.com/api-docs/customers/current-customer-api,但它只返回有关客户的以下位。

"customer": {
   "id": 4927,
   "email": "john.doe@gmail.com",
   "group_id": "6"
}

我真的希望能够从 https://developer.bigcommerce.com/api-reference/customer-subscribers/v3-customers-api/customer-attributes/customersattributesget 作为 current-customer-api 的有效负载属性

/customer/current.jwt?app_client_id={appClientId}&attribute-ids:in=1,2,3

"customer": {
   "id": 4927,
   "email": "john.doe@gmail.com",
   "group_id": "6"
   "attributes": [
        {
          "id": 1,
          "name": "Age",
          "type": "string",
          "date_created": "2018-11-13T21:42:06Z",
          "date_modified": "2018-11-14T16:46:23Z"
        },
        {
          "id": 2,
          "name": "Shoe Size",
          "type": "number",
          "date_created": "2018-11-14T16:34:57Z",
          "date_modified": "2018-11-14T16:34:57Z"
        },
        {
          "id": 3,
          "name": "Date Joined",
          "type": "date",
          "date_created": "2019-02-19T19:13:21Z",
          "date_modified": "2019-02-19T19:13:21Z"
        }
    ]
}

【问题讨论】:

    标签: bigcommerce


    【解决方案1】:

    这是一个有趣的功能请求。当前客户 API 的目的是以安全的方式验证登录客户的身份,这就是有效负载如此之少的原因(要了解您可能会根据id 返回)。

    不过,我们计划在店面展示客户属性数据,这听起来可以解决您的用例。我们将很快添加对 Handlebars 的支持,并且我们也正在开发一个店面 GraphQL API。您可以在此处阅读我们的博文:

    https://medium.com/bigcommerce-developer-blog/customize-and-extend-your-customer-data-with-the-new-bigcommerce-v3-customers-api-8609903e102a

    【讨论】:

    • 是的,通过 REST 或 GraphQL 获取客户属性数据(可能还有客户表单字段)正是我所需要的。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-08-08
    • 2023-03-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多