ITPub博客

首页 > 应用开发 > IT综合 > 如何通过Restful API的方式读取SAP Commerce Cloud的Product Reference

如何通过Restful API的方式读取SAP Commerce Cloud的Product Reference

原创 IT综合 作者:i042416 时间:2019-11-05 08:25:34 0 删除 编辑

从SAP官网上找到api的说明:

https://api.sap.com/api/commerce_services/resource

api endpoint: /rest/v2/electronics/products/I042416/references

其中referenceType参数的值从枚举类ProductReferenceTypeEnum里获得:

下图是Hybris commerce On-Premises里对应的代码,当然也可以查询SAP帮助文档找到这些枚举值:

这种reference关系类似于CRM里的relationship,可以到表ProductReference里查询获得:

要调用这个API,必须创建一个grant_type为client_credentials的oauth client:

并且authorities要维护成ROLE_TRUSTED_CLIENT:

要获取更多Jerry的原创文章,请关注公众号"汪子熙":


来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/24475491/viewspace-2662636/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
测试

注册时间:2018-01-20

  • 博文量
    3822
  • 访问量
    1982153