About Webshop

This document serves as the usage guide for the Webshop METRO public APIs. External companies or developers that have been provided the necessary access can use this guide to understand METRO Webshop APIs that have been made available for consumption by METRO.

Before You Start

If you’re new to the Webshop API, we recommend our guide, Quick Start, for more information about how to interact with Webshop APIs.

Customer Login

POST /login/user

This API provides customer JWT and Customer Data as response This call will return multiple delivery addresses of the customer.

Sample response:

JSON
                      { 
                        customer-JWT: "ldslkfjdsalkfjasdlkfjaslxxxx"
                        customerId: "27611123456"
                        customerName1: "Max Juergen"
                        deliveryAdresses: [{
                            addressLine2: ""
                            addressNumber: "1"
                            buildingName: ""
                            city: "Berlin"
                            country: ""
                            storeId: "00529"
                            district: ""
                            hash: "27611000724994-48VE8QYA"
                            house2Num: ""
                            houseNumber: "14"
                            integrationId: "27611000724994-48VE8QYA"
                            state: ""
                            street: "TestStreet"
                            zipcode: "35398" },...]
                      }
                    

Search for Articles

GET /explore.publicapi.v1/search

Valid Url parameters like,

  • storeId: 00529
  • customerId: 27611000724
  • language: de-DE
  • country: DE
  • query: Aro
  • rows: 10
  • page: 1

This API will get the list of articles with details like article description, selling price, weight, etc. for particular store.

Sample response:

JSON
                      {
                        "amount": 1828,
                        "page": 1,
                        "query": "Aro",
                        "rows": 10,
                        "totalPages": 183,
                        "results": [
                          {
                            "bettyVariantId": "BTY-X1781540032",
                            "name": "Aro Backpulver 6 Stück",
                            "imageUrl": "https://metro.scene7.com/is/image/metroDE/DE_PIM_178112001001_01",
                            "bundles": [
                              {
                                "bettyBundleId": "BTY-X17815400320021",
                                "description": "Aro Backpulver 6 Stück",
                                "isWeightArticle": false,
                                "longDescription": "Aro Backpulver in Tütchen zu 15 g – ausreichend für volle 500 g Mehl. Das Backpulver hält sich aufgrund der Einzelportionierung trocken und frisch. Produkte von Aro überzeugen mit guter Qualität und einem perfekten Preis-Leistungsverhältnis.",
                                "sellingPriceInfo": {
                                  "articleGross": 0.4,
                                  "articleNet": 0.37,
                                  "articleVatAmount": 0.03,
                                  "currency": "EUR"
                                }
                              },
                              "..."
                            ]
                          },
                          "..."
                        ]
                      }
                    

Article Details

GET /explore.publicapi.v1/articlevariant/{country}/{locale}/{storeid}/ {customerId}/{bettyVariantId}

Valid url parameters like,

  • {country}=DE
  • {locale}=de-DE
  • {storeId}=STORE-3
  • {customerId}= customer_id_01
  • {bettyVariantId}=BTY-X1781540032

This API gets the article details based on the bettyVariantId which is unique article id. These article details are fetched for specific store in the country.

Sample response:

JSON
                      {
                        "bettyVariantId": "BTY-X1781540032",
                        "name": "Aro Backpulver 6 Stück",
                        "imageUrl": "https://metro.scene7.com/is/image/metroDE/DE_PIM_178112001001_01",
                        "bundles": [
                          {
                            "bettyBundleId": "BTY-X17815400320021",
                            "description": "Aro Backpulver 6 Stück",
                            "isWeightArticle": false,
                            "longDescription": "Aro Backpulver in Tütchen zu 15 g – ausreichend für volle 500 g Mehl. Das Backpulver hält sich aufgrund der Einzelportionierung trocken und frisch. Produkte von Aro überzeugen mit guter Qualität und einem perfekten Preis-Leistungsverhältnis.",
                            "sellingPriceInfo": {
                              "articleGross": 0.4,
                              "articleNet": 0.37,
                              "articleVatAmount": 0.03,
                              "currency": "EUR"
                            }
                          },
                          "..."
                        ]
                      }
                    

Shopping Cart - Add Item

POST /shoppingcarts/additem

To add Items to a shoppingCart do a POST to /explore.publicapi.v1/shoppingcarts/{country}/{storeId}/{customerId}/addItem

Valid url parameters like,

  • {country}=DE
  • {storeId}=STORE-3
  • {customerId}= customer_id_01

The body of the POST request describe the article which will be added to the shopping cart.

JSON
                      {   
                        bettyBundleId: "BTY-X17815400320021",
                        amount: 1
                      }
                    

Shopping Cart - Get Basket

GET /shoppingcarts/getBasket

To get the state of a shoppingCart, do a GET to /explore.publicapi.v1/shoppingcarts/{country}/{storeId}/{customerId}/getBasket

  • Valid url parameters like,
  • {country}=DE
  • {storeId}=STORE-3
  • {customerId}= customer_id_01

The response will provide the list of items in the shopping cart with the price details of each item and the total price.

Sample response:

JSON
                      {
                          items: [
                              {
                                  article: BTY-Z4200320021,
                                  amount: 10.0,
                                  price: {
                                      netTotal: {
                                          amount: 13.42
                                          currency: EUR
                                      },
                                      grossTotal: {
                                          amount: 14.42
                                          currency: EUR
                                      },
                                      vatTotal: {
                                          amount: 1.00
                                          currency: EUR
                                      },
                                      articleNet: {
                                          amount: 13.42
                                          currency: EUR
                                      },
                                      articleGross: {
                                          amount: 14.42
                                          currency: EUR
                                      },
                                      articleVATAmount: {
                                          amount: 1.00
                                          currency: EUR
                                      },
                                      emptiesNet: {
                                          amount: 0.00
                                          currency: EUR
                                      },
                                      emptiesGross: {
                                          amount: 0.00
                                          currency: EUR
                                      },
                                      emptiesVATAmount: {
                                          amount: 0.00
                                          currency: EUR
                                      }
                                  }
                              },
                              ...
                          ],
                          total_price: {
                              netTotal: {
                                  amount: 13.42
                                  currency: EUR
                              },
                              grossTotal: {
                                  amount: 14.42
                                  currency: EUR
                              },
                              vatTotal: {
                                  amount: 1.00
                                  currency: EUR
                              },
                              articleNetTotal: {
                                  amount: 13.42
                                  currency: EUR
                              },
                              articleGrossTotal: {
                                  amount: 14.42
                                  currency: EUR
                              },
                              articleVatTotal: {
                                  amount: 1.00
                                  currency: EUR
                              },
                              emptiesNet: {
                                  amount: 0.00
                                  currency: EUR
                              },
                              emptiesGross: {
                                  amount: 0.00
                                  currency: EUR
                              },
                              emptiesVATAmount: {
                                  amount: 0.00
                                  currency: EUR
                              }
                          }
                      }
                    

Personal Lists

GET /list/personal/country/{country}/customerid/{customerId}

  • Valid url parameters like,
  • {country}=DE
  • {customerId}= customer_id_01

This API provides the list of all personal lists of given user.

Sample Response:

JSON
                      {
                          "userId": "2761100014101295",
                          "lists": [
                              {
                                  "storeId": "00529",
                                  "listId": "73f49d5c-8715-4e37-b10f-e52923b81d3b"
                              },
                              {
                                  "storeId": "00529",
                                  "listId": "35d05467-2921-4771-b979-904940f944e8"
                              }
                          ]
                      }
                    

Customer Item list

GET /list/personal/country/{country}/list/{listid}/locale/{locale}

  • Valid url parameters are like
  • {country}= DE
  • {listid}= 73f49d5c-8715-4e37-b10f-e52923b81d3b
  • {locale}=de-DE

This API call will provide list of items for one customer.

Sample Response:

JSON
                      {
                          "name": "Name of my fancy list",
                          "userId": "2761100014101295",
                          "storeId": "00529",
                          "listId": "fceb762a-0c87-42ac-8ccf-cf9c7a3ed01f",
                          "items": [
                              {
                                  "article": {
                                      "bettyVariantId": "BTY-Z420032",
                                      "name": "Tomaten 6kg",
                                      "imageUrl": "https://metro.scene7.com/is/image/metroDE/DE_PIM_267697001001_01",
                                      "bundles": [
                                          {
                                              "bettyBundleId": "BTY-Z4200320021",
                                              "description": "Tomaten 6kg",
                                              "longDescription": "Saftige Tomaten dürfen in keiner Profi-Küche fehlen. ...",
                                              "weightArticle": true,
                                              "bundleSize": "1",
                                              "sellingPriceInfo": {
                                                  "articleGross": 0.4,
                                                  "articleNet": 0.37,
                                                  "articleVatAmount": 0.03,
                                                  "currency": "EUR"
                                              }
                                          }
                                      ]
                                  }
                              }
                          ]
                      }