General Query API information
Norce Commerce Query API uses ODAta v4 over REST. This enables queryable requests towards our database. This API is not cached but a window directly into our database. This also makes it necessary to understand our database model. Authorization is through OAuth in the same way as other APIs. You may read more about the OData standard here. Note that we only support read. You can not manipulate data via this API.
All components can be explored with the $metadata
request to find entities and data sets. Example:
https://norce-open-demo.api-se.playground.norce.tech/commerce/Query/2.0/Products/$metadata
When sending a query for a data set, the response will look something like this
{ "@odata.context": "https://norce-open-demo.api-se.playground.norce.tech/commerce/Query/2.0/Products/$metadata#Products", "value": [ { ... }, ... { ... } ], "@odata.nextLink": "https://norce-open-demo.api-se.playground.norce.tech/commerce/Query/2.0/Products/Products?$skip=500" }
Most SDKs for OData handles this in the response for you.
To protect the database and maintain performance some listings have paging like the example above where the nextlink points to the next page of data. There is also another limitation to how deep in the model you may expand an entity, usually three (3).
The models described in these reference pages omits the metadata for the endpoints returning lists. Endpoints returning a single entity, e.g. https://norce-open-demo.api-se.playground.norce.tech/commerce/Query/2.0/Products/ProductSkus('100011')?$expand=PriceLists($filter=IsActive eq true)
, does not include this metadata but returns only the model.
This API is not cached. There is a rate limit implemented to avoid abuse of the API and performance loss. 429 (Too many requests) will be the response if the limit is reached.