Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/magento/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在Magento 2中使用REST API获取产品的产品商店URL_Rest_Magento_Magento2 - Fatal编程技术网

在Magento 2中使用REST API获取产品的产品商店URL

在Magento 2中使用REST API获取产品的产品商店URL,rest,magento,magento2,Rest,Magento,Magento2,我正在尝试使用RESTAPI获取产品信息 GET/V1/products 但是,这并没有给出产品的产品商店URL 如何使用magento2中的REST API获取映射到产品sku或id的产品url?查看自定义属性数组,其中项属性=url\u键 例如,如果我对http://localhost/~harrym/Magento/rest/V1/products/TestTEST。我在http://localhost/~harrym/Magento/testabc.html <?xml versi

我正在尝试使用RESTAPI获取产品信息

GET/V1/products

但是,这并没有给出产品的产品商店URL


如何使用magento2中的REST API获取映射到产品sku或id的产品url?

查看
自定义属性
数组,其中
属性
=
url\u键

例如,如果我对
http://localhost/~harrym/Magento/rest/V1/products/TestTEST
。我在
http://localhost/~harrym/Magento/testabc.html

<?xml version="1.0"?>
<response>
  <id>164</id>
  <sku>TestTEST</sku>
  ...
  <custom_attributes>
    <item>
      <attribute_code>meta_title</attribute_code>
      <value>Test</value>
    </item>
    ...
    <item>
      <attribute_code>url_key</attribute_code>
      <value>testabc</value>
    </item>
  </custom_attributes>
</response>

164
测试
...
元标题
试验
...
url\u键
testabc