从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/ ,如需转载,请注明出处,否则将追究法律责任。