Best Answer Marcus Gesing , 29 September 2023 - 19:05
You can use OData $expand to include navigation properties
$expand=SpecificationAttributeOption($expand=SpecificationAttribute)Go to the full post
Best Answer Marcus Gesing , 29 September 2023 - 19:05
You can use OData $expand to include navigation properties
$expand=SpecificationAttributeOption($expand=SpecificationAttribute)Go to the full post
Geschrieben: 27 September 2023 - 14:01
Hello,
I am using Smartstore V5 web api and I would like to read a single product specification attributes. I know product id information for filtering.
I failed to find an example for that. Is it possible to do using web api?
Thanks & Regards,
Ertan
Geschrieben: 28 September 2023 - 20:51
/odata/v1/ProductSpecificationAttributes?$filter=ProductId eq your_product_id
/odata/v1/Products(your_product_id)/ProductSpecificationAttributes
Marcus Gesing
Smartstore AG
Geschrieben: 29 September 2023 - 14:44
/odata/v1/ProductSpecificationAttributes?$filter=ProductId eq your_product_id
Hi,
Thanks for your reply.
Above web api returns json which does not have all columns that I can see in Smartstore web page. I cannot post pictures for better understanding but it basically does not include "Attribute" and "Attribute option" columns.
What I receive is below
{ "@odata.context": "http://www.some_site.com/odata/v1/$metadata#ProductSpecificationAttributes", "value": [ { "SpecificationAttributeOptionId": 152, "ProductId": 140542, "AllowFiltering": null, "ShowOnProductPage": null, "DisplayOrder": 0, "Id": 48875 }, { "SpecificationAttributeOptionId": 904, "ProductId": 140542, "AllowFiltering": null, "ShowOnProductPage": null, "DisplayOrder": 0, "Id": 48876 }, { "SpecificationAttributeOptionId": 337, "ProductId": 140542, "AllowFiltering": null, "ShowOnProductPage": null, "DisplayOrder": 0, "Id": 48877 } ] }
Is it possible to receive a json so it include above two columns? Or, is there a way that I can read them using another web api?
Thanks & Regards,
Ertan
Geschrieben: 29 September 2023 - 19:05 Best Answer
You can use OData $expand to include navigation properties
$expand=SpecificationAttributeOption($expand=SpecificationAttribute)
Marcus Gesing
Smartstore AG
Geschrieben: 29 September 2023 - 21:27
This gave me the data I need in one single request.
Thank you.
Smartstore (Deutsch) →
Allgemein Smartstore →
Depending Prices über Web API abfragenEröffnet von lisa - 13 Sep 2023 depending prices, web api |
|
|
||
Web API
Willkommen in der Smartstore Community →
Mitteilungen →
Smartstore 5.0.2 inklusive Web API 5.0.2 verfügbarEröffnet von stefanmueller - 10 Jan 2023 Web API |
|
|
||
Web API
Smartstore (Deutsch) →
Anpassen & Erweitern Smartstore →
Web API wie aktivieren?Eröffnet von stefanmueller - 24 Nov 2020 Web API |
|
|
||
Smartstore (English) →
Installation & Setup Smartstore →
Getting errror on WebAPIEröffnet von muthusamy - 25 Oct 2020 WebAPI, OData |
|
|
||
Smartstore (Deutsch) →
Anpassen & Erweitern Smartstore →
Web API unterstützt OData v4 ab SmartStore 4.1Eröffnet von stefanmueller - 09 Sep 2020 Web-APi, OData, webapi |
|
|