Documentation for SmartStore.NET 2.2
More Examples
Get all payment methods
Example
GET http://localhost:1260/api/v1/Payments/Methods
Note that this request returns providers rather than entities and therefore we must use the /api/v1/
service here.
Get return requests for customer with ID 1
Example
GET http://localhost:1260/odata/v1/Customers(1)/ReturnRequests?$top=25&$inlinecount=allpages
Note the inlinecount option which tells OData to return an odata.count value with the total count of matching entities in the response.
Get e-mail address of customer with ID 1
Example
GET http://localhost:1260/odata/v1/Customers(1)/Email
Partially update address with ID 1
Example
The example uses the SmNetFulfillCountry and SmNetFulfillStateProvince options to update the country (USA) and province (New York). This avoids extra querying of country and province records and passing its IDs in the request body.
Get ID of store with name my nice store
Example
Note the select option, which tells OData just to return the Id property.
Getting localized property values
Example
This is where the OData filter enters the equation. That request filters all English property values for a product with the ID 224. LocaleKeyGroup is typically the entity name (Product, Category, Manufacturer, ProductBundleItem, DeliveryTime etc.). The result looks like this:
Example
LocaleKey is the context property name (the name and full description of the product entity). LocaleValue offers the localized value.