Reporte de Inventarios

Puedes hacer uso de la API para solicitar la información general de uno o de todos los inventarios registrados. También podrás filtrar por id de inventario, encargado, fechas entre otros.

api/reports/inventories (GET)

Método para obtener listado de datos de inventarios de acuerdo a parámetros definidos, para esto es necesario realizar una llamada GET a la siguiente url:
http://143.198.48.117/api/reports/inventories


PARÁMETROS DE CONSULTA

Parámetros que pueden ser agregados a la solicitud para filtrar qué registros se desean obtener. Los parametros posibles son:

Campo Tipo Descripción
inventory_id Integer Id único del inventario.
responsible_id Integer Id del usuario encargado del inventario.
date_from Date Fecha de inventario para inicial de búsqueda (Formato: Y-m-d)
date_to Date Fecha de inventario para termino de búsqueda (Formato: Y-m-d)
branch_id Integer Id único de la sucursal.
page Integer Número de página. Por defecto = 1
result_per_page Integer Número de resultados por solicitud. Por defecto = 10000 (máximo 10000)

Ejemplo

A continuación se muestra un ejemplo usando el método reports/inventories de la API de Inventory.


        METHOD GET
        curl "http://143.198.48.117/api/reports/inventories?page=1&date_from=2024-01-01&date_to=2024-09-17' -X GET \
        -H 'Authorization: Bearer <token>' -H 'Accept: application/json'
        

RESULTADO

El resultado ejemplo para esta llamada se muestra a continuación:


   {
    "data": [
        {
            "id": "209",
            "date_inventory": "2024-05-03",
            "observation": "test",
            "total_expected_inventory": "3",
            "total_expected_valued_inventory": "0",
            "total_inventory": "3",
            "total_valued_inventory": "0",
            "created_at": "2024-05-03 05:55:45",
            "user_created": "48",
            "user_updated": "48",
            "updated_at": "2024-05-03 05:55:45",
            "user_end_inventory": "48",
            "end_inventory_at": "2024-05-03 05:57:39",
            "user_cancel_inventory": null,
            "cancel_inventory_at": null,
            "reason_cancellation": null,
            "branch": "GENERICO",
            "responsible_inventory": "Fernado Rosas",
            "status_inventory": "Finalizado",
            "details": [
                {
                    "id": "3498",
                    "inventory_id": "209",
                    "product_id": "2055",
                    "purchase_price": "0",
                    "sale_price": "0",
                    "quantity_expected": "1",
                    "quantity_inventoried": "1",
                    "difference": "0",
                    "user_created": "48",
                    "created_at": "2024-05-03 05:55:50",
                    "user_updated": "48",
                    "updated_at": "2024-05-03 05:57:37",
                    "updated_stock": "1",
                    "updated_at_stock": "2024-05-03 05:57:38",
                    "has_serie": "0",
                    "has_location": "0",
                    "serial_number": "swss11111",
                    "departament_id": "6",
                    "floor_id": "15",
                    "office_id": "15",
                    "responsible_id": "180",
                    "bar_code": "1000813",
                    "product": "PRODUCTO TEST",
                    "departament": "CASA ADMINISTRATIVA",
                    "floor": "PISO 1",
                    "office": "3B",
                    "responsible": "Dpto TIC"
                },
                {
                    "id": "3499",
                    "inventory_id": "209",
                    "product_id": "2055",
                    "purchase_price": "0",
                    "sale_price": "0",
                    "quantity_expected": "1",
                    "quantity_inventoried": "1",
                    "difference": "0",
                    "user_created": "48",
                    "created_at": "2024-05-03 05:56:11",
                    "user_updated": "48",
                    "updated_at": "2024-05-03 05:57:30",
                    "updated_stock": "1",
                    "updated_at_stock": "2024-05-03 05:57:38",
                    "has_serie": "0",
                    "has_location": "0",
                    "serial_number": "swss11112",
                    "departament_id": "6",
                    "floor_id": "15",
                    "office_id": "15",
                    "responsible_id": "180",
                    "bar_code": "1000813",
                    "product": "PRODUCTO TEST",
                    "departament": "CASA ADMINISTRATIVA",
                    "floor": "PISO 1",
                    "office": "3B",
                    "responsible": "Dpto TIC"
                },
                {
                    "id": "3500",
                    "inventory_id": "209",
                    "product_id": "2055",
                    "purchase_price": "0",
                    "sale_price": "0",
                    "quantity_expected": "1",
                    "quantity_inventoried": "1",
                    "difference": "0",
                    "user_created": "48",
                    "created_at": "2024-05-03 05:56:17",
                    "user_updated": "48",
                    "updated_at": "2024-05-03 05:57:29",
                    "updated_stock": "1",
                    "updated_at_stock": "2024-05-03 05:57:38",
                    "has_serie": "0",
                    "has_location": "0",
                    "serial_number": "swss11113",
                    "departament_id": "6",
                    "floor_id": "15",
                    "office_id": "15",
                    "responsible_id": "180",
                    "bar_code": "1000813",
                    "product": "PRODUCTO TEST",
                    "departament": "CASA ADMINISTRATIVA",
                    "floor": "PISO 1",
                    "office": "3B",
                    "responsible": "Dpto TIC"
                }
            ]
        },
        {
            "id": "210",
            "date_inventory": "2024-05-09",
            "observation": null,
            "total_expected_inventory": "0",
            "total_expected_valued_inventory": "0",
            "total_inventory": "0",
            "total_valued_inventory": "0",
            "created_at": "2024-05-09 10:27:18",
            "user_created": "48",
            "user_updated": "48",
            "updated_at": "2024-05-09 10:27:18",
            "user_end_inventory": null,
            "end_inventory_at": null,
            "user_cancel_inventory": null,
            "cancel_inventory_at": null,
            "reason_cancellation": null,
            "branch": "GENERICO",
            "responsible_inventory": "Fernado Rosas",
            "status_inventory": "En curso",
            "details": [
                {
                    "id": "3501",
                    "inventory_id": "210",
                    "product_id": "107",
                    "purchase_price": null,
                    "sale_price": null,
                    "quantity_expected": null,
                    "quantity_inventoried": "1",
                    "difference": null,
                    "user_created": "48",
                    "created_at": "2024-05-09 10:28:20",
                    "user_updated": "48",
                    "updated_at": "2024-05-09 10:28:20",
                    "updated_stock": "0",
                    "updated_at_stock": null,
                    "has_serie": "0",
                    "has_location": "0",
                    "serial_number": "S10000005321",
                    "departament_id": null,
                    "floor_id": null,
                    "office_id": null,
                    "responsible_id": null,
                    "bar_code": "1000000",
                    "product": "MONITOR 22 PULGADAS",
                    "departament": null,
                    "floor": null,
                    "office": null,
                    "responsible": null
                },
                {
                    "id": "3502",
                    "inventory_id": "210",
                    "product_id": "107",
                    "purchase_price": null,
                    "sale_price": null,
                    "quantity_expected": null,
                    "quantity_inventoried": "1",
                    "difference": null,
                    "user_created": "48",
                    "created_at": "2024-05-09 10:28:30",
                    "user_updated": "48",
                    "updated_at": "2024-05-09 10:28:30",
                    "updated_stock": "0",
                    "updated_at_stock": null,
                    "has_serie": "0",
                    "has_location": "0",
                    "serial_number": "S10000005322",
                    "departament_id": null,
                    "floor_id": null,
                    "office_id": null,
                    "responsible_id": null,
                    "bar_code": "1000000",
                    "product": "MONITOR 22 PULGADAS",
                    "departament": null,
                    "floor": null,
                    "office": null,
                    "responsible": null
                },
                {
                    "id": "3503",
                    "inventory_id": "210",
                    "product_id": "107",
                    "purchase_price": null,
                    "sale_price": null,
                    "quantity_expected": null,
                    "quantity_inventoried": "1",
                    "difference": null,
                    "user_created": "48",
                    "created_at": "2024-05-09 10:28:40",
                    "user_updated": "48",
                    "updated_at": "2024-05-09 10:28:40",
                    "updated_stock": "0",
                    "updated_at_stock": null,
                    "has_serie": "0",
                    "has_location": "0",
                    "serial_number": "S10000005323",
                    "departament_id": null,
                    "floor_id": null,
                    "office_id": null,
                    "responsible_id": null,
                    "bar_code": "1000000",
                    "product": "MONITOR 22 PULGADAS",
                    "departament": null,
                    "floor": null,
                    "office": null,
                    "responsible": null
                }
            ]
        },
        {
            "id": "211",
            "date_inventory": "2024-05-09",
            "observation": null,
            "total_expected_inventory": "3",
            "total_expected_valued_inventory": "375000",
            "total_inventory": "3",
            "total_valued_inventory": "375000",
            "created_at": "2024-05-09 17:01:09",
            "user_created": "48",
            "user_updated": "48",
            "updated_at": "2024-05-09 17:01:09",
            "user_end_inventory": "48",
            "end_inventory_at": "2024-05-09 17:02:11",
            "user_cancel_inventory": null,
            "cancel_inventory_at": null,
            "reason_cancellation": null,
            "branch": "GENERICO",
            "responsible_inventory": "Fernado Rosas",
            "status_inventory": "Finalizado",
            "details": [
                {
                    "id": "3504",
                    "inventory_id": "211",
                    "product_id": "107",
                    "purchase_price": "125000",
                    "sale_price": "0",
                    "quantity_expected": "1",
                    "quantity_inventoried": "1",
                    "difference": "0",
                    "user_created": "48",
                    "created_at": "2024-05-09 17:01:18",
                    "user_updated": "48",
                    "updated_at": "2024-05-09 17:01:23",
                    "updated_stock": "1",
                    "updated_at_stock": "2024-05-09 17:02:11",
                    "has_serie": "0",
                    "has_location": "0",
                    "serial_number": "S100000016011",
                    "departament_id": "24",
                    "floor_id": "22",
                    "office_id": "41",
                    "responsible_id": "17",
                    "bar_code": "1000000",
                    "product": "MONITOR 22 PULGADAS",
                    "departament": "CPA",
                    "floor": "PISO PRUEBA",
                    "office": "3EMB",
                    "responsible": "ANDREA RODRIGUEZ"
                },
                {
                    "id": "3505",
                    "inventory_id": "211",
                    "product_id": "107",
                    "purchase_price": "125000",
                    "sale_price": "0",
                    "quantity_expected": "1",
                    "quantity_inventoried": "1",
                    "difference": "0",
                    "user_created": "48",
                    "created_at": "2024-05-09 17:01:32",
                    "user_updated": "48",
                    "updated_at": "2024-05-09 17:01:43",
                    "updated_stock": "1",
                    "updated_at_stock": "2024-05-09 17:02:11",
                    "has_serie": "0",
                    "has_location": "0",
                    "serial_number": "S100000016012",
                    "departament_id": "24",
                    "floor_id": "22",
                    "office_id": "42",
                    "responsible_id": "34",
                    "bar_code": "1000000",
                    "product": "MONITOR 22 PULGADAS",
                    "departament": "CPA",
                    "floor": "PISO PRUEBA",
                    "office": "3EMC",
                    "responsible": "ALVARO MARTINEZ"
                },
                {
                    "id": "3506",
                    "inventory_id": "211",
                    "product_id": "107",
                    "purchase_price": "125000",
                    "sale_price": "0",
                    "quantity_expected": "1",
                    "quantity_inventoried": "1",
                    "difference": "0",
                    "user_created": "48",
                    "created_at": "2024-05-09 17:01:50",
                    "user_updated": "48",
                    "updated_at": "2024-05-09 17:01:56",
                    "updated_stock": "1",
                    "updated_at_stock": "2024-05-09 17:02:11",
                    "has_serie": "0",
                    "has_location": "0",
                    "serial_number": "S100000016013",
                    "departament_id": "6",
                    "floor_id": "22",
                    "office_id": "38",
                    "responsible_id": "34",
                    "bar_code": "1000000",
                    "product": "MONITOR 22 PULGADAS",
                    "departament": "CASA ADMINISTRATIVA",
                    "floor": "PISO PRUEBA",
                    "office": "2EMB",
                    "responsible": "ALVARO MARTINEZ"
                }
            ]
        },
        {
            "id": "212",
            "date_inventory": "2024-05-09",
            "observation": "test",
            "total_expected_inventory": "5",
            "total_expected_valued_inventory": "0",
            "total_inventory": "9",
            "total_valued_inventory": "0",
            "created_at": "2024-05-09 17:09:47",
            "user_created": "48",
            "user_updated": "48",
            "updated_at": "2024-05-09 17:09:47",
            "user_end_inventory": "48",
            "end_inventory_at": "2024-05-09 17:11:19",
            "user_cancel_inventory": null,
            "cancel_inventory_at": null,
            "reason_cancellation": null,
            "branch": "GENERICO",
            "responsible_inventory": "Fernado Rosas",
            "status_inventory": "Finalizado",
            "details": [
                {
                    "id": "3507",
                    "inventory_id": "212",
                    "product_id": "107",
                    "purchase_price": "0",
                    "sale_price": "0",
                    "quantity_expected": "1",
                    "quantity_inventoried": "1",
                    "difference": "0",
                    "user_created": "48",
                    "created_at": "2024-05-09 17:09:52",
                    "user_updated": "48",
                    "updated_at": "2024-05-09 17:09:57",
                    "updated_stock": "1",
                    "updated_at_stock": "2024-05-09 17:11:19",
                    "has_serie": "0",
                    "has_location": "0",
                    "serial_number": "S100000057541",
                    "departament_id": "6",
                    "floor_id": "16",
                    "office_id": "17",
                    "responsible_id": "21",
                    "bar_code": "1000000",
                    "product": "MONITOR 22 PULGADAS",
                    "departament": "CASA ADMINISTRATIVA",
                    "floor": "PISO 2",
                    "office": "4A",
                    "responsible": "JAVIER FERNANDEZ"
                },
                {
                    "id": "3508",
                    "inventory_id": "212",
                    "product_id": "107",
                    "purchase_price": "0",
                    "sale_price": "0",
                    "quantity_expected": "1",
                    "quantity_inventoried": "1",
                    "difference": "0",
                    "user_created": "48",
                    "created_at": "2024-05-09 17:10:01",
                    "user_updated": "48",
                    "updated_at": "2024-05-09 17:10:11",
                    "updated_stock": "1",
                    "updated_at_stock": "2024-05-09 17:11:19",
                    "has_serie": "0",
                    "has_location": "0",
                    "serial_number": "S100000057542",
                    "departament_id": "6",
                    "floor_id": "19",
                    "office_id": "42",
                    "responsible_id": "34",
                    "bar_code": "1000000",
                    "product": "MONITOR 22 PULGADAS",
                    "departament": "CASA ADMINISTRATIVA",
                    "floor": "PISO 5",
                    "office": "3EMC",
                    "responsible": "ALVARO MARTINEZ"
                },
                {
                    "id": "3509",
                    "inventory_id": "212",
                    "product_id": "107",
                    "purchase_price": "0",
                    "sale_price": "0",
                    "quantity_expected": "1",
                    "quantity_inventoried": "1",
                    "difference": "0",
                    "user_created": "48",
                    "created_at": "2024-05-09 17:10:21",
                    "user_updated": "48",
                    "updated_at": "2024-05-09 17:10:34",
                    "updated_stock": "1",
                    "updated_at_stock": "2024-05-09 17:11:19",
                    "has_serie": "0",
                    "has_location": "0",
                    "serial_number": "S100000057543",
                    "departament_id": "10",
                    "floor_id": "19",
                    "office_id": "40",
                    "responsible_id": "34",
                    "bar_code": "1000000",
                    "product": "MONITOR 22 PULGADAS",
                    "departament": "CASA DEPORTES",
                    "floor": "PISO 5",
                    "office": "3EMA",
                    "responsible": "ALVARO MARTINEZ"
                },
                {
                    "id": "3510",
                    "inventory_id": "212",
                    "product_id": "107",
                    "purchase_price": "0",
                    "sale_price": "0",
                    "quantity_expected": "1",
                    "quantity_inventoried": "1",
                    "difference": "0",
                    "user_created": "48",
                    "created_at": "2024-05-09 17:10:22",
                    "user_updated": "48",
                    "updated_at": "2024-05-09 17:10:35",
                    "updated_stock": "1",
                    "updated_at_stock": "2024-05-09 17:11:19",
                    "has_serie": "0",
                    "has_location": "0",
                    "serial_number": "S100000057544",
                    "departament_id": "10",
                    "floor_id": "15",
                    "office_id": "19",
                    "responsible_id": "34",
                    "bar_code": "1000000",
                    "product": "MONITOR 22 PULGADAS",
                    "departament": "CASA DEPORTES",
                    "floor": "PISO 1",
                    "office": "4C",
                    "responsible": "ALVARO MARTINEZ"
                },
                {
                    "id": "3511",
                    "inventory_id": "212",
                    "product_id": "179",
                    "purchase_price": "0",
                    "sale_price": "0",
                    "quantity_expected": "1",
                    "quantity_inventoried": "5",
                    "difference": "4",
                    "user_created": "48",
                    "created_at": "2024-05-09 17:10:39",
                    "user_updated": "48",
                    "updated_at": "2024-05-09 17:11:15",
                    "updated_stock": "1",
                    "updated_at_stock": "2024-05-09 17:11:19",
                    "has_serie": "0",
                    "has_location": "0",
                    "serial_number": null,
                    "departament_id": "6",
                    "floor_id": "15",
                    "office_id": "17",
                    "responsible_id": null,
                    "bar_code": "1000070",
                    "product": "AC MOVIL",
                    "departament": "CASA ADMINISTRATIVA",
                    "floor": "PISO 1",
                    "office": "4A",
                    "responsible": null
                }
            ]
        }
    ],
    "totalPages": 1,
    "currentPage": "1",
    "totalRecords": 4
}