Categories

Categories

Returns a paged list of categories and provides search functionality.

Returns a paged list of categories and provides search functionality.

get
https://api.migros.ch/migros/products/v8/categories

Query Parameters

searchstring

Simple search string which is fault-tolerant for user-entered text.

limitinteger

Maximum number of results (max 2000).

Default:10

>= 0<= 2000

offsetinteger

Result set offset.

Default:0

>= 0

sortstring

The sorting criteria.

Allowed values:scorecodecategoryname

Default:score

orderstring

The ordering direction.

Allowed values:ascdesc

Default:asc

idsstring

A comma separated list or an array of category ids defining the categories and the order in which the categories should be returned. If the ids parameter is provided all other filtering parameters are ignored.

viewstring

Show specific set of categories, where ‘browse’: limit to categories that should be shown, and ‘browseallretailers’: limit to categories that should be shown, but include additional retailers like Alnatura.

Allowed values:browsebrowseallretailers

Default:browse

custom_imageboolean

Whether to output the custom image format with placeholders for width and height.

Default:false

langstring

Defines the language (de/fr/it/en) for this request as query parameter. Either use the query param “lang” or header “Accept-Language”, not both.

Allowed values:defriten

Default:de

Headers

Accept-Languagestring

Defines the language (de/fr/it/en) for this request as request header. Either use the query param “lang” or header “Accept-Language”, not both.

Allowed values:defriten

Default:de

Response

application/json

Returned when successful

CategoryCollection

A collection of category instances.

idsarray[string]

Ids only.

Is filled instead of the usual property for content, with only the ids when a call is made with verbosity=id on a
route that supports it.

total_hitsinteger | nullrequired

The total hits may exceed the actual count of results in the collection.

It represents the total number of results of a search and not only the
potentially paginated subset.

categoriesarray[object]required

Represents the category information including its ancestors and children.

Show Child Parameters
get/migros/products/v8/categories
 
application/json

Returns categories sorted by pre-defined "store order", which is the order that customers often walk in stores.

Returns categories sorted by pre-defined “store order”, which is the order that customers often walk in stores.

get
https://api.migros.ch/migros/products/v8/categories/store-order

Response

200 application/json

Returned when successful

CategoryStoreOrderCollection

A collection of category instances for a store order.

idsarray[string]

Ids only.

Is filled instead of the usual property for content, with only the ids when a call is made with verbosity=id on a
route that supports it.

total_hitsinteger | nullrequired

The total hits may exceed the actual count of results in the collection.

It represents the total number of results of a search and not only the
potentially paginated subset.

categoriesarray[object]required

Represents the category information including its ancestors and children.

Show Child Parameters
storestring

The store for which the categories are ordered.

If no data has been available for the requested store, the value of this field is “default”.

get/migros/products/v8/categories/store-order
 
200 application/json

Returns information about a single category by ID or slug.

Returns information about a single category by ID or slug.

get
https://api.migros.ch/migros/products/v8/categories/{id}

Query Parameters

viewstring

Show specific set of categories, where ‘browse’: limit to categories that should be shown, and ‘browseallretailers’: limit to categories that should be shown, but include additional retailers like Alnatura.

Allowed values:browsebrowseallretailers

Default:browse

custom_imageboolean

Whether to output the custom image format with placeholders for width and height.

Default:false

langstring

Defines the language (de/fr/it/en) for this request as query parameter. Either use the query param “lang” or header “Accept-Language”, not both.

Allowed values:defriten

Default:de

Path Parameters

idstringrequired

Match pattern:^(?!store-order)[a-zA-Z0-9\-_/]+$

Headers

Accept-Languagestring

Defines the language (de/fr/it/en) for this request as request header. Either use the query param “lang” or header “Accept-Language”, not both.

Allowed values:defriten

Default:de

Response

application/json

Returned when successful

Category

Represents the category information including its ancestors and children.

abstractstring | null

A short, plain text description, e.g. suitable for the page meta element.

codestringrequired

ID of the category.

headlinestring | null

The caption to the description.

imageOne Of
Imageobject

An image and its properties.

Show Child Parameters
keywordsarray | null[string]

Keywords, e.g. suitable for the page meta element.

levelinteger

Category level.

namestringrequired
parent_codestring | null

Parent category ID.

slugstringrequired

Unique user-friendly ID.

titlestring | null

The title, e.g. suitable for the page title element.

visibleboolean

Whether the category should be shown to users.

ancestorsarray | null[object]

Represents the category basic information.

Show Child Parameters
childrenarray | null[object]

Represents the category basic information.

Show Child Parameters
generic_productsarray | null[string]

List of generic product BoSS numbers.

The BoSS number from the BoSS/BeSS mapping, so that the app can query for categories by BoSS number.

google_product_categoriesarray | null[string]

List of google taxonomy IDs this category maps to.

See https://support.google.com/merchants/answer/6324436?hl=en and https://www.google.com/basepages/producttype/taxonomy-with-ids.de-CH.txt
It’s based on the field “googletaxonomy” coming from PEx.

slugsobjectrequired

Represents a list of multilingual slugs.

Show Child Parameters
updated_atstring | null(date-time)required

Time when category was last indexed (or partially updated) with modifications in Elasticsearch.

When a category did not change after mapping, it is not re-indexed and thus the timestamp is not updated as well.

visible_navigationboolean

If set to false, the category should not be displayed in navigation, but may still be displayed in
search suggestions or similiar (e.g. ‘Fussball EM 2016’).

It’s based on the same field coming from PEx.

visible_shopboolean

If set to false, the category should not be displayed anywhere (e.g. ‘Dienstleistungen’).

It’s based on the same field coming from PEx.

get/migros/products/v8/categories/{id}
 
application/json

Get the category tree starting from the specified root node.

Get the category tree starting from the specified root node.

get
https://api.migros.ch/migros/products/v8/category-tree/{id}

Query Parameters

depthinteger

Depth of levels from the root node

Default:3

langstring

Defines the language (de/fr/it/en) for this request as query parameter. Either use the query param “lang” or header “Accept-Language”, not both.

Allowed values:defriten

Default:de

Path Parameters

idstringrequired

Match pattern:^[a-zA-Z0-9\-_/]+$

Headers

Accept-Languagestring

Defines the language (de/fr/it/en) for this request as request header. Either use the query param “lang” or header “Accept-Language”, not both.

Allowed values:defriten

Default:de

Response

application/json

Returned when successful

CategoryNode

Recursive element of the category tree.

This is an alternate representation of categories instead of Category & BaseCategory to output the tree structure
on the dedicated API end point.

codestring

ID of the category.

namestring
get/migros/products/v8/category-tree/{id}
 
application/json