// JavaScript Example: Reading Entities
// Filterable fields: name, description, price, category, is_favorite
async function fetchProductEntities() {
const response = await fetch(`https://app.base44.com/api/apps/68fdbe13b59aabd6a0a571ef/entities/Product`, {
headers: {
'api_key': 'ed777f277d9349b8a5bf88fde3925f59', // or use await User.me() to get the API key
'Content-Type': 'application/json'
}
});
const data = await response.json();
console.log(data);
}
// JavaScript Example: Updating an Entity
// Filterable fields: name, description, price, category, is_favorite
async function updateProductEntity(entityId, updateData) {
const response = await fetch(`https://app.base44.com/api/apps/68fdbe13b59aabd6a0a571ef/entities/Product/${entityId}`, {
method: 'PUT',
headers: {
'api_key': 'ed777f277d9349b8a5bf88fde3925f59', // or use await User.me() to get the API key
'Content-Type': 'application/json'
},
body: JSON.stringify(updateData)
});
const data = await response.json();
console.log(data);
}
top of page
Create Your First Project
Start adding your projects to your portfolio. Click on "Manage Projects" to get started
L'épicerie
Nous vous proposons une large gamme de produits, des confitures maison, flûtes au sel, mais également une gamme de vin, à offrir ou simplement pour accompagner votre dessert.