# createInventory(JSON dataInventory)

Al invocar este método, se esta registrando en base de datos un nuevo inventario para uso de onDelivery

<details class="mb-m" id="bkmrk-body-parametersparam"><summary class="text-muted">Esta función recibe como parámetro un objeto JSON con los siguientes atributos:</summary>

<div></div><div><table class="table" style="height: 246px; width: 619px;" width="811"><tbody><tr style="height: 41px;"><td style="width: 320px; height: 41px;">Atributos  
</td><td style="width: 301px; height: 41px;">Definición</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**idzona\_od**</td><td style="width: 301px; height: 41px;">ID de la zona registrada para el inventario y con la que se identifica en el sistema de onDelivery</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**idalmacen\_od**</td><td style="width: 301px; height: 41px;">ID del almacén con el que se identifica en el sistema de onDelivery

</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**idproducto\_od**</td><td style="width: 301px; height: 41px;">ID del producto con el que se identifica en el sistema de onDelivery</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**cantidad**</td><td style="width: 301px; height: 41px;">Cantidad del producto en el inventario</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**idmoneda**</td><td style="width: 301px; height: 41px;">ID de la moneda con el que se identifica en el sistema</td></tr></tbody></table>

</div></details><div id="bkmrk-"></div><div id="bkmrk--0"></div><div id="bkmrk-ejemplo-de-json%3A"><span style="color: #bbbbbb; font-size: 1.4em; font-weight: 400;">Ejemplo de JSON:</span></div>```JavaScript
let dataInventory = {
'idzona_od':'0',
'idalmacen_od':'38',
'idproducto_od':'1',
'cantidad':'0',
'idmoneda':'0'
}
```

<div id="bkmrk--1"></div><div id="bkmrk-ejemplo-de-solicitud"><span style="color: #bbbbbb; font-size: 1.4em; font-weight: 400;">Ejemplo de solicitud en JS:</span></div>```JavaScript
try {
      const inventory  = await _gpsApiv2.createInventory(dataInventory); 
 	} catch (error) {
	  console.error(error);
	}
```

##### Los atributos de respuesta:

<div id="bkmrk-id_inventory%3Aid-del-"><div>- **id\_inventory:**ID del nuevo inventario creado en onDelivery
- **status:** Código Estatus que devuelve la solicitud / 200-&gt;'OK' - OtherCode-&gt;'Error'

</div></div>##### Respuesta de ejemplo:

```JSON
{
	 status:'200',
	 data:''
}
```