Crear o editar ingrediente

Crea o actualiza un ingrediente. Si se envía _id, se actualiza el registro. Los campos name y category son obligatorios.

Al editar se reemplazan todos los campos editables: los campos que no envíes quedan vacíos. Envía siempre el registro completo. Si al editar no envías locationsStock (o lo envías vacío), se reemplaza por una sola ubicación: la primera bodega del usuario, sin stock ni costos.

Autenticación requerida: Bearer Token.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
string

ID único del ingrediente

string

ID del negocio al que pertenece el ingrediente

string
required

ID de la categoría del ingrediente

string
required

Nombre del ingrediente

string

Descripción del ingrediente

string

Unidad de medida

string

Código de barras

number

Stock actual

number

Stock mínimo

number

Precio del ingrediente

boolean

Si el ingrediente está activo

boolean

Si el registro es ingrediente

boolean

Si el ingrediente está eliminado

locationsStock
array of objects

Configuración por ubicación de stock

locationsStock
date-time

Fecha de última modificación

date-time

Fecha de creación

Responses

Language
Credentials
Bearer
JWT
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json