Products
Get a product with name "iPhone"
GET http://localhost:59318/odata/v1/Products?$top=1&$filter=Name eq 'iPhone'Get child products of grouped product with ID 210
GET http://localhost:59318/odata/v1/Products?$filter=ParentGroupedProductId eq 210Calculate the final price of a product
POST http://localhost:59318/odata/v1/Products(123)/CalculatePrice
{ "forListing": false, "quantity": 1 }{
"@odata.context": "http://localhost:59318/odata/v1/$metadata
#Smartstore.Web.Api.Models.Catalog.CalculatedProductPrice",
"ProductId": 123,
"CurrencyId": 5,
"CurrencyCode": "EUR",
"FinalPrice": 43.07800000,
"RegularPrice": null,
"RetailPrice": 47.58810000,
"OfferPrice": null,
"ValidUntilUtc": null,
"PreselectedPrice": null,
"LowestPrice": null,
"DiscountAmount": 0,
"Saving": {
"HasSaving": true,
"SavingPrice": 47.58810000,
"SavingPercent": 9,
"SavingAmount": 4.51010000
}
}Assign category with ID 9 to product with ID 1
Assign manufacturer with ID 12 to product with ID 1
Delete assignment of image 66 to product 1
Update display order of image assignment 66 at product 1
Upload product images
Multiple images can be uploaded for a product by a single multipart form data POST request. The product ID can be 0 and the product can be identified by query string parameter sku, gtin or mpn.
It is also possible to update or replace an existing image. To do so simply add the file identifier as the fileId attribute in the content disposition header of the file. The example updates the picture entity with the Id 6166.
Managing attributes
You can use the following endpoints: ProductAttributes (types of attributes), ProductVariantAttributes (attribute types mapped to a product), ProductVariantAttributeValues (attribute values assigned to a product) and optionally ProductVariantAttributeCombinations (additional information for particular attribute combinations). Because managing attributes that way can lead to some extra work, there is an action method ManageAttributes that sums up the most important steps.
The request configures a product with the ID 211 with two attributes Color and Size, and its values: Red, Green, Blue and Large, X-Large. If synchronize is set to false, only missing attributes and attribute values are inserted. If set to true, existing records are also updated and values not included in the request body are removed from the database. If you pass an empty value array, the attribute and all its values are removed from the product.
Create attribute combinations
This creates all possible attribute combinations for a product with the ID 211. As a first step, this action always deletes all existing attribute combinations for the given product.
Search products
Searches the catalog for products with the term notebook. The API expects the same query string parameters used for searching in the frontend of the shop. See Search query for a complete list of all query string parameters.
Last updated
Was this helpful?