Skip to content

Reading entities

Reading entities

The Admin API is designed in such a way that all entities of the system can be read in the same way. Once an entity is registered in the system, it can be written and read via API - this also applies to your custom entities. The appropriate routes for the entity are generated automatically and follow the REST pattern.

INFO

Example

  • The ManufacturerEntity is registered as product_manufacturer in the system and can be read api/v{version}/product-manufacturer.
  • The ProductEntity has an association with the property name manufacturer, which refers to the ManufacturerEntity.
  • The manufacturer of a product can then be read over api/v1/product/{productId}/manufacturer.

Generated Endpoints

For an entity object, the system automatically creates the following routes through which the entity object can be read:

NameMethodRouteUsage
api.customer_group.listGET/api/v{version}/customer-groupFetch a list of entities
api.customer_group.detailGET/api/v{version}/customer-group/Fetch a single entity
api.customer_group.searchPOST/api/v{version}/search/customer-groupPerform a more sophisticated search
api.customer_group.search-idsPOST/api/v{version}/search-ids/customer-groupPerform a more sophisticated search and fetching only matching ids

Search Endpoint

The Admin API supports a wide range of filtering, aggregation and sorting capabilities. However, according to the REST definition, data should only be read via GET, we have provided the /api/v3/search/* route for this.

The behaviour of that endpoint follows the concepts described in the Search Criteria article.