Products

Products

8OAS 3.0

Information about products.

More general information can be found on the Wiki.

More information about how to use these endpoints can be found in in the wiki.

Prices on products

By default, only the currently valid price is shown on products. This is available in the property price.
The currently valid price depends on the current date and the region specified in the query parameter region.
If no query parameter region was specified, national is used.

This should contain all relevant information to be able to display the currently valid price for a product.
If the product is currently discounted, the information about the discount is also available in the property price.discount.
Additionally there might be the property price.item.original_price depending on the type of discount.

Price objects without an actual price are expected. These should have the property price.no_price_hint set.
The text of this property should be displayed instead of a price in such cases.

This basically means that a product doesn’t have a fixed price in the specified region, but is different in various stores.

You still can get a price for these products with specifying the query parameter regional_prices=all.

If a price object has an actual price, it can be found in the property price.item with additional information.
This corresponds to the price the product has in a store.
The flag varying_quantity means that the actual quantity and price for that product in the store can vary.
In this case the value of the property display_quantity can be displayed next to the price (not underneath).

A second price might be available in the property price.base which represents the base price used for comparisons by customers.

If you need the prices for a product in all regions or also need prices that become valid in the future, you can pass the query parameter region=all.
This additionally shows the property regional_information on the products where you have access to prices per region.

If for a certain region there is no data available, you should fall back to national.
The structure for each region is the same, they contain product prices in the property prices and discounted prices in the property discounted_prices.
You should use the discounted prices first, if available, and otherwise fall back to the product prices.
Additionally you need to check the validity of the prices to display the correct one.

On products, there are never store prices exposed. You’ll only find national and regional prices.

API Base URL
  • Server 1:https://api.migros.ch

    Public Kong Gateway URL

Security
Kong-Api-Key (apiKey)

Kong key-auth authentication

basicAuth (http)

Basic authentication is a simple authentication scheme built into the HTTP protocol.
To use it, send your HTTP requests with an Authorization header that contains the word Basic
followed by a space and a base64-encoded string username:password.

Example: Authorization: Basic ZGVtbzpwQDU1dzByZA==

Additional Information
Contact MGB-UDP-Products-Services (arg_mgb-udp-products-services@mgb.ch)

Products

Returns a paged list of products and provides search functionality.

While the limit is 2000, we recommend using lower numbers for paging detail or full verbosity lists,
to avoid having huge responses.

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

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

facetsstring

Selected facet terms as readable string or indexed array by facet name, e.g. ?facets[facet_name][]=123&facets[facet_name][]=456.

facet_sizeinteger

Maximum number of terms for each facet to include in the response. -1 returns no facets at all and 0 returns all terms.

extra_facetsstring

Defines additional facets that should be returned. Possible values: ‘category’. Example: ?extra_facets[]=category

sortstring

The sorting criteria.

Allowed values:scorepricecategoryidnameratingrating_roundedrating_rounded_tenthreviewsupdated_atboss_numberbrand_namepim_status

Default:score

orderstring

The ordering direction.

Allowed values:ascdesc

Default:asc

rootsstring

When sorting by category the sorting will be done by the children of the categories passed in this parameter. For each product the first category matching from the bottom will be taken. The following two formats are valid for this parameter: ?roots=code1,code2 or ?roots[]=code1&roots[]=code2.

regionstring

Get the price for this region. Output in the ‘price’ field and used for sorting by price. If you specify ‘all’, prices for all regions are additionally output in ‘regional_information’.

Allowed values:nationalgmaagmbsgmgegmlugmnfgmosgmtigmvdgmvsgmzhall

Default:national

regional_availablestring

Filter the list of products by their availability in the given region. Availability is based on supermarket stores (M, MM, MMM, Voi, Migros Partner), and assumes that the product is available in at least a percentage of those stores, see regional_available_min_percentage for default value.

Allowed values:gmaagmbsgmgegmlugmnfgmosgmtigmvdgmvsgmzhnational

regional_available_min_percentageinteger

Specify the minimum percentage of the availability in the region to be used. This parameter can be used only with the regional_available. Default value is 60% for the product search. Note: 1% means that the product is available at least in one store

>= 1<= 100

price_sourcestring

Use a different source to use for prices than the default PriceRepo system. To get shop prices, specify the price_channel. You can’t specify both this and price_channel in the same request.

Allowed values:pim

price_channelstring

Get the shop prices for the specified channel. Only national prices will be available in regional_information. You can’t specify both this and price_source in the same request. When using this parameter, price boosting, filtering by discounts, discount_campaigns, discount_events or discount_types and sorting by price uses the price repo prices, and not the specified shop price. Visibility will look at the price repository price, not the shop price of the specified channel.

Allowed values:01020304050607080910111299

regional_pricesstring

Set to ‘all’ to output regional prices in the regional_information field if available.

Allowed values:all

updated_sincestring

The date and time used to only get products updated since a certain timestamp. The format is according to ISO 8601 and can include a time zone offset, e.g. 2018-01-01T06:00:00+01:00 (careful about the plus getting properly percent-encoded when passed). Default time zone is Swiss time.

discountstring

Display only products which belong to the specified discount. This filter still works, but is deprecated as of version 2.

discountsstring

Display only products which belong to the specified discounts. This filter respects the region parameter, so the discount has be in the given region or national. Note: A discount sometimes applies to many products, you need to do paging in case the limit is hit (see limit parameter).

discount_campaignsstring

Display only products which belong to the specified discount campaign. This will also return the specific discount on the product.

discount_eventsstring

Display only products which belong to the specified discount event. This will also return the specific discount on the product.

discount_typesstring

Display only products which have a discount with the given discount_type_id. Multiple can be given, seperated by a comma. Product must have at least one of the specified discount types to pass the filter. Will respect the region parameter if set and use that in addition to national discounts.

gtinsstring

A comma separated list or an array of gtins for filtering the products. The order of the gtins has no effect on the order of the returned products.

tagsstring

A comma separated list or an array of tags for filtering the products. The products must contain one of the specified tags.

storestring

A single store id. If set, the result is limited to products available at that store.

supplieridsstring

A comma separated list or an array of supplier ids for filtering the products.

recipe_ingredientstring

The RecipeIngredient ID to filter the products for. Only a single id is supported, as otherwise it would be impossible from the result to know which products belongs to which ingredient id.

idsstring

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

boss_number_prefixesstring

A comma separated list of boss_numbers prefixes to filter products for.

online_relevantstring

Filter for only products in this online channel. e.g. MO, MGB (for supermarket), MYM or ALN. A comma separated list or an array

viewstring

Return specific set of products. Either ‘all’ (active and inactive/incomplete products), ‘browse’ (active products excluding Alnatura products), or ‘browseallretailers’ (active products including Alnatura products).

Allowed values:allbrowsebrowseallretailers

Default:browse

verbositystring

Verbosity of output. If not specified, outputs information usually needed on product lists. You can output a flat list of product ids with ‘id’ or show all details as in the product detail route with ‘detail’.

Allowed values:idlistdetailfull

alternate_scoringboolean

Enable alternate scoring system, for A/B search testing

search_modestring

Use the given search mode (warning: changing the search_mode is meant only for specific cases).

Allowed values:defaultabtestingartikelabfragecustomized

search_fieldsstring

A comma separated list or an array of fields where the search should be executed in (only valid with search_mode=customized). This is meant for testing purposes only.

search_within_idsstring

A comma separated list or an array of product IDs to search in (sort is not altered by this filter). Take care of the request size when passing a huge number of IDs

custom_imageboolean

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

Default:false

is_variantboolean

Whether to output products that are variants. If this parameter is omitted, it returns both variants and base products.

one_catalog_idsstring

A comma separated list of one catalog ids for filtering the products.

price_levelinteger

Filter for prive_level property (1=tiefpreis)

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

ProductCollection

A collection of Product 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.

facetsobjectDEPRECATED

Facets array.

productsarray[object]required

Represents a product in the API.

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