---
url: "https://developer.migros.ch/apis/categories-8/versions/c52b807c-f583-4cb5-9293-3a0befc40a44"
---

OpenAPI specification document.

```json
{"components":{"parameters":{"Accept-Language":{"description":"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.","in":"header","name":"Accept-Language","schema":{"default":"de","enum":["de","fr","it","en"],"type":"string"}},"custom_image":{"description":"Whether to output the custom image format with placeholders for width and height.","in":"query","name":"custom_image","schema":{"default":false,"type":"boolean"}},"lang":{"description":"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.","in":"query","name":"lang","schema":{"default":"de","enum":["de","fr","it","en"],"type":"string"}},"limit":{"description":"Maximum number of results (max 2000).","in":"query","name":"limit","required":false,"schema":{"default":10,"maximum":2000,"minimum":0,"type":"integer"}},"offset":{"description":"Result set offset.","in":"query","name":"offset","required":false,"schema":{"default":0,"minimum":0,"type":"integer"}},"order":{"description":"The ordering direction.","in":"query","name":"order","schema":{"default":"asc","enum":["asc","desc"],"type":"string"}},"search":{"description":"Simple search string which is fault-tolerant for user-entered text.","in":"query","name":"search","required":false,"schema":{"type":"string"}}},"responses":{"400":{"description":"If the request parameters are invalid."},"404":{"description":"Returned when the requested resource could not be not found."}},"schemas":{"AbstractCollection":{"description":"A generic collection of elements."},"AbstractSearchResultCollection":{"allOf":[{"$ref":"#/components/schemas/AbstractCollection"},{"properties":{"ids":{"description":"Ids only.\n\nIs filled instead of the usual property for content, with only the ids when a call is made with verbosity=id on a\nroute that supports it.","items":{"type":"string"},"type":"array"},"total_hits":{"description":"The total hits may exceed the actual count of results in the collection.\n\nIt represents the total number of results of a search and not only the\npotentially paginated subset.","nullable":true,"type":"integer"}},"type":"object"}],"description":"A collection of search result instances.","type":"object"},"BaseCategory":{"description":"Represents the category basic information.","properties":{"abstract":{"description":"A short, plain text description, e.g. suitable for the page meta element.","nullable":true,"type":"string"},"code":{"description":"ID of the category.","type":"string"},"headline":{"description":"The caption to the description.","nullable":true,"type":"string"},"image":{"description":"Image of the category.","nullable":true,"oneOf":[{"$ref":"#/components/schemas/Image"}]},"keywords":{"description":"Keywords, e.g. suitable for the page meta element.","items":{"type":"string"},"nullable":true,"type":"array"},"level":{"description":"Category level.","type":"integer"},"name":{"type":"string"},"parent_code":{"description":"Parent category ID.","nullable":true,"type":"string"},"slug":{"description":"Unique user-friendly ID.","type":"string"},"title":{"description":"The title, e.g. suitable for the page title element.","nullable":true,"type":"string"},"visible":{"description":"Whether the category should be shown to users.","type":"boolean"}},"required":["code","name","slug"],"type":"object"},"Category":{"allOf":[{"$ref":"#/components/schemas/BaseCategory"},{"properties":{"ancestors":{"description":"Collection of ancestor categories.","items":{"$ref":"#/components/schemas/BaseCategory"},"nullable":true,"type":"array"},"children":{"description":"Collection of child categories.\n\nChildren include only direct children (categories of the next level).","items":{"$ref":"#/components/schemas/BaseCategory"},"nullable":true,"type":"array"},"generic_products":{"description":"List of generic product BoSS numbers.\n\nThe BoSS number from the BoSS/BeSS mapping, so that the app can query for categories by BoSS number.","items":{"type":"string"},"nullable":true,"type":"array"},"google_product_categories":{"description":"List of google taxonomy IDs this category maps to.\n\nSee https://support.google.com/merchants/answer/6324436?hl=en and https://www.google.com/basepages/producttype/taxonomy-with-ids.de-CH.txt\nIt's based on the field \"googletaxonomy\" coming from PEx.","items":{"type":"string"},"nullable":true,"type":"array"},"slugs":{"$ref":"#/components/schemas/Slugs"},"updated_at":{"description":"Time when category was last indexed (or partially updated) with modifications in Elasticsearch.\n\nWhen a category did not change after mapping, it is not re-indexed and thus the timestamp is not updated as well.","format":"date-time","nullable":true,"type":"string"},"visible_navigation":{"description":"If set to false, the category should not be displayed in navigation, but may still be displayed in\nsearch suggestions or similiar (e.g. 'Fussball EM 2016').\n\nIt's based on the same field coming from PEx.","type":"boolean"},"visible_shop":{"description":"If set to false, the category should not be displayed anywhere (e.g. 'Dienstleistungen').\n\nIt's based on the same field coming from PEx.","type":"boolean"}},"type":"object"}],"description":"Represents the category information including its ancestors and children.","required":["code","name","slug","slugs","updated_at"],"type":"object"},"CategoryCollection":{"allOf":[{"$ref":"#/components/schemas/AbstractSearchResultCollection"},{"properties":{"categories":{"items":{"$ref":"#/components/schemas/Category"},"type":"array"}},"type":"object"}],"description":"A collection of category instances.","required":["categories","total_hits"],"type":"object"},"CategoryNode":{"description":"Recursive element of the category tree.\n\nThis is an alternate representation of categories instead of Category & BaseCategory to output the tree structure\non the dedicated API end point.","properties":{"code":{"description":"ID of the category.","type":"string"},"name":{"type":"string"}},"type":"object"},"CategoryStoreOrderCollection":{"allOf":[{"$ref":"#/components/schemas/CategoryCollection"},{"properties":{"store":{"description":"The store for which the categories are ordered.\n\nIf no data has been available for the requested store, the value of this field is \"default\".","type":"string"}},"type":"object"}],"description":"A collection of category instances for a store order.","required":["categories","total_hits"],"type":"object"},"Image":{"description":"An image and its properties.","properties":{"code":{"deprecated":true,"description":"Code for the image, useful for pictograms.","nullable":true,"type":"string"},"custom":{"deprecated":true,"description":"Image URL with placeholders for {width} and {height}.","type":"string"},"description":{"deprecated":true,"description":"Image description, useful for example as alt attribute.","nullable":true,"type":"string"},"end_date":{"deprecated":true,"description":"End date of the validity.","format":"date-time","nullable":true,"type":"string"},"hash":{"deprecated":true,"description":"Sha1 hash of original image.","nullable":true,"type":"string"},"original":{"deprecated":true,"description":"Full size image.","type":"string"},"source":{"deprecated":true,"description":"Source where the image comes from originally.","nullable":true,"type":"string"},"stack":{"deprecated":true,"description":"Image URL with a placeholder for a Rokka {stack}.","type":"string"},"start_date":{"deprecated":true,"description":"Start date of the validity.","format":"date-time","nullable":true,"type":"string"},"tags":{"deprecated":true,"items":{"type":"string"},"type":"array"}},"type":"object"},"Slugs":{"description":"Represents a list of multilingual slugs.","properties":{"de":{"description":"Slug in English.","type":"string"},"en":{"type":"string"},"fr":{"type":"string"},"it":{"type":"string"}},"required":["de","fr","it","en"],"type":"object"}},"securitySchemes":{"Kong-Api-Key":{"description":"Kong key-auth authentication","in":"header","name":"X-Api-Key","type":"apiKey"},"basicAuth":{"scheme":"basic","type":"http"}}},"info":{"contact":{"email":"arg_mgb-udp-products-services@mgb.ch","name":"MGB-UDP-Products-Services"},"description":"Product categories like supermarket and alnatura and its sub-categories. <a href=\"https://wiki.migros.net/display/MAPI/Products\">See Wiki</a>","title":"Categories","version":"8"},"openapi":"3.0.0","paths":{"/migros/products/v8/categories":{"get":{"description":"Returns a paged list of categories and provides search functionality.","operationId":"get-categories","parameters":[{"$ref":"#/components/parameters/search"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"description":"The sorting criteria.","in":"query","name":"sort","schema":{"default":"score","enum":["score","code","category","name"],"type":"string"}},{"$ref":"#/components/parameters/order"},{"description":"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.","in":"query","name":"ids","schema":{"type":"string"}},{"description":"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.","in":"query","name":"view","schema":{"default":"browse","enum":["browse","browseallretailers"],"type":"string"}},{"$ref":"#/components/parameters/custom_image"},{"$ref":"#/components/parameters/lang"},{"$ref":"#/components/parameters/Accept-Language"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryCollection"}}},"description":"Returned when successful"},"400":{"$ref":"#/components/responses/400"}},"summary":"Returns a paged list of categories and provides search functionality.","tags":["Categories"]}},"/migros/products/v8/categories/store-order":{"get":{"description":"Returns categories sorted by pre-defined \"store order\", which is the order that customers often walk in stores.","operationId":"get-categories-in-store-order","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryStoreOrderCollection"}}},"description":"Returned when successful"}},"summary":"Returns categories sorted by pre-defined \"store order\", which is the order that customers often walk in stores.","tags":["Categories"]}},"/migros/products/v8/categories/{id}":{"get":{"description":"Returns information about a single category by ID or slug.","operationId":"get-category-by-id-or-slug","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"^(?!store-order)[a-zA-Z0-9\\-_/]+$","type":"string"}},{"description":"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.","in":"query","name":"view","schema":{"default":"browse","enum":["browse","browseallretailers"],"type":"string"}},{"$ref":"#/components/parameters/custom_image"},{"$ref":"#/components/parameters/lang"},{"$ref":"#/components/parameters/Accept-Language"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Category"}}},"description":"Returned when successful"},"404":{"$ref":"#/components/responses/404"}},"summary":"Returns information about a single category by ID or slug.","tags":["Categories"]}},"/migros/products/v8/category-tree/{id}":{"get":{"description":"Get the category tree starting from the specified root node.","operationId":"get-category-tree","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"^[a-zA-Z0-9\\-_/]+$","type":"string"}},{"description":"Depth of levels from the root node","in":"query","name":"depth","schema":{"default":3,"type":"integer"}},{"$ref":"#/components/parameters/lang"},{"$ref":"#/components/parameters/Accept-Language"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryNode"}}},"description":"Returned when successful"},"404":{"$ref":"#/components/responses/404"}},"summary":"Get the category tree starting from the specified root node.","tags":["Categories"]}}},"security":[{"Kong-Api-Key":[],"basicAuth":[]}],"servers":[{"description":"Public Kong Gateway URL","url":"https://api.migros.ch"}],"tags":[{"name":"Categories"},{"name":"mapi"}],"x-active-from":"01-01-2024","x-company":"migros","x-edm-domain":"products","x-eol":"31-12-2049","x-headmatter":{"readable_by":"*"},"x-kong-route-defaults":{"protocols":["https"],"strip_path":false},"x-kong-service-defaults":{"connect_timeout":5000,"read_timeout":15000,"retries":1,"write_timeout":5000},"x-leanix-id":"350641a5-55a2-4641-8332-76d32846eb56","x-link-get-access":"https://forms.office.com/e/zhzbEqAQ26","x-link-get-support":"https://teams.microsoft.com/l/channel/19%3Aa7851e50d0194268ba0c7a0d7a63403b%40thread.tacv2/2.%20Support%20%F0%9F%92%A1?groupId=58b919a5-7d36-47f3-a77a-03cfd051098a&tenantId=35aa8c5b-ac0a-4b15-9788-ff6dfa22901f"}
```
