Grocery API
Introduction
Getting Started

Getting Started

Opening a Grocery API account is done on https://dashboard.foodin.ai where companies can open an account. Usually they contact our sales team that can evaluate what is the best package.

Setting up an account

On https://dashboard.foodin.ai, click sign up. Fill out the registration form with your personal information, including your name, email address, and desired password You have to purchase a package depending on how many groceries you need to include in an app.

Generating an API key

Once your account is set up, log in to the Foodin developer portal. In the developer portal, navigate to the API Keys section and click on the Generate API Key button. Enter a name for your API key and select the scope of access you need for your application. Click on the "Generate" button to create your API key. Your new API key will be displayed, copy and safe it in a secure place, you will need it to authenticate your API requests. You can use this API key to make API calls and access the data provided by the Foodin Grocery API.

const axios = require("axios");
 
async function getGroceries() {
  try {
    const apiKey = "YOUR_API_KEY";
    const endpoint = "https://api.foodin.ai/groceries";
    const res = await axios.get(endpoint, {
      headers: {
        Authorization: `Bearer ${apiKey}`,
      },
    });
    console.log(res.data);
  } catch (err) {
    console.log(err);
  }
}
 
getGroceries();