适用于客户的magento android APP

时间:2014-03-10 10:26:58

标签: android magento

我正在开发一个与magento合作的Android应用程序,我想有选择登录客户,他们可以添加项目到购物车,查看他们在购物车中的东西和购买的东西,但我能找到的只是你的东西可以查看所有客户,查看所有订单,找不到如何为客户登录以及如何将商品添加到购物车并购买。

感谢您的帮助。

1 个答案:

答案 0 :(得分:0)

为了使用rest api获取客户的购物车详细信息首先使用api“POST / V1 / integration / customer / token”获取客户令牌。

curl -X POST“http://example.com/rest/V1/integration/customer/token

-H“Content-Type:application / json” -d'{“username”:“username”,“password”:“password”}'

这将返回一个令牌。您可以在标头中使用此令牌以访问客户资源

喜欢购物车详情

让令牌为XXXXXXXXXXXXXXXXXXXXXXXXX

卷曲-X GET“http://domainname.com/rest/V1/carts/mine”\ -H“授权:承载XXXXXXXXXXXXXXXXXXXXXXXXX”