我可以检索客户吗?
有一个当前客户API - https://developer.bigcommerce.com/api-docs/customers/current-customer-api,但它只返回有关客户的以下位。
"customer": {
"id": 4927,
"email": "[email protected]",
"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": "[email protected]",
"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"
}
]
}
这是一个有趣的功能请求。当前客户API的目的是以安全的方式验证登录客户的身份,这就是有效负载如此之小的原因(了解您可能会根据需要对完整的客户记录进行请求)。 id返回)。
我们计划在店面上显示客户属性数据,这听起来像是为您的用例解决。我们很快就会添加Handlebars支持,并且我们还有一个店面GraphQL API。您可以在我们的博客文章中阅读更多内容: