Categories

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

AbstractCollection

A generic collection of elements.

AbstractSearchResultCollection

object

A collection of search result 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

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.

Example

BaseCategory

object

Represents the category basic information.

abstractstring

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

codestringrequired

ID of the category.

headlinestring

The caption to the description.

imageOne Of

Image of the category.

Imageobject

An image and its properties.

Show Child Parameters
keywordsarray[string]

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

levelinteger

Category level.

namestringrequired
parent_codestring

Parent category ID.

slugstringrequired

Unique user-friendly ID.

titlestring

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

visibleboolean

Whether the category should be shown to users.

Example