Restaurant - Ingredients
Import ingredients from file (CSV, Excel, or JSON)
POST
/restaurant/ingredients/import
const url = 'https://api.inspow.tech/api/v1/restaurant/ingredients/import';const form = new FormData();form.append('file', 'file');form.append('format', 'csv');form.append('skipErrorRows', 'true');form.append('dryRun', 'false');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.inspow.tech/api/v1/restaurant/ingredients/import \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: multipart/form-data' \ --form file=@file \ --form format=csv \ --form skipErrorRows=true \ --form dryRun=falseAuthorizations
Sección titulada «Authorizations »Request Body required
Sección titulada «Request Body required » Media type multipart/form-data
object
file
required
string format: binary
format
required
string
skipErrorRows
boolean
dryRun
boolean
Responses
Sección titulada « Responses »Import result