ETASCOM CRM V3 - Documentation API
    Preparing search index...
    • Parameters

      • request: NextRequest

      Returns Promise<
          | NextResponse<{ error: string }>
          | NextResponse<
              {
                  locations: {
                      _count: { stockMovementsFrom: number; stockMovementsTo: number };
                      stockMovementsFrom: (
                          {
                              finishedProduct: { code: ...; id: ...; name: ... }
                              | null;
                              rawMaterial: { code: ...; id: ...; name: ... } | null;
                              stockLot: (...) & (...) | null;
                          } & {}
                      )[];
                      stockMovementsTo: (
                          {
                              finishedProduct: { code: ...; id: ...; name: ... }
                              | null;
                              rawMaterial: { code: ...; id: ...; name: ... } | null;
                              stockLot: (...) & (...) | null;
                          } & {}
                      )[];
                      warehouse: { code: string; id: string; name: string };
                      status: "empty" | "occupied" | "unavailable" | "maintenance";
                      currentStock: number;
                      maxCapacity: number;
                      fillPercentage: number;
                      lastMovementDate: null;
                      product: any;
                      productType: null;
                      stockMovements: (
                          {
                              finishedProduct: { code: ...; id: ...; name: ... }
                              | null;
                              rawMaterial: { code: ...; id: ...; name: ... } | null;
                              stockLot: (...) & (...) | null;
                          } & {}
                      )[];
                  }[];
                  rackStructure: Record<string, Record<string, any[]>>;
                  stats: {
                      total: number;
                      empty: number;
                      occupied: number;
                      unavailable: number;
                      maintenance: number;
                      totalStockValue: number;
                  };
              },
          >,
      >